Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> Seeking applications ...
Author Message
GanjaUK
Life Cycles Becoming CPU Cycles


Joined: Feb 14, 2004
Posts: 633
Location: England

PostPosted: Mon Feb 16, 2004 3:35 pm Reply with quote

I got this annoying internet explorer error that shows up in the bottom left of my browser when viewing my site.

Image

Its only visible on pages with only the left side of blocks, so I managed to track it down to my shoutbox on the right side because the error is gone when I disable the shoutbox.
I have had a look thru the "block-ShoutBlock" and I cant find anything wrong with it.

Is there any little apps out there that can find unterminated string constants? IE error box claims its at line 1770 char 19 but viewing in edit pad pro or notepad there is clearly nothing wrong with that line.

Maybe if someone has any app like this they could have a look at my page and tell me where error is. Only registered users can see links on this board! Get registered or login!

Thanks
 
View user's profile Send private message Visit poster's website
Raven
Site Admin/Owner


Joined: Aug 27, 2002
Posts: 17077

PostPosted: Mon Feb 16, 2004 4:21 pm Reply with quote

I looked at your page and the error is not there so I assume it's because the shoutbox is not active. What I would do is to activate the shoutbox. Then, after the error occurs, view the source in your browser. Copy and paste it into a good editor that shows line numbers. Look at line 1770 and 1 or 2 lines before it. If you can't see the error, then copy and paste it into your reply message, using the bbcode CODE tags.
 
View user's profile Send private message
GanjaUK
PostPosted: Mon Feb 16, 2004 4:24 pm Reply with quote

The shoutbox is active, its on the right hand side. Ahh I see the error is only there when logged in...
 
Raven
PostPosted: Mon Feb 16, 2004 4:30 pm Reply with quote

I have deleted your last post. Please just post the lines I requested. Thanks.
 
GanjaUK
PostPosted: Mon Feb 16, 2004 4:33 pm Reply with quote

Sorry about that, phpBB seems to have a limit on how much I could paste in 1 go, I uploaded it here, just right click and save target. Or you can still see the error when you follow the link with IE: Only registered users can see links on this board! Get registered or login!

Thanks


Last edited by GanjaUK on Mon Feb 16, 2004 4:40 pm; edited 1 time in total 
Raven
PostPosted: Mon Feb 16, 2004 4:40 pm Reply with quote

??? Right mouse click over your web page. Select View Source. Copy the source and paste it into a good text editor like TEXTPAD or something that will show line numbers of the source. Then, find the error line (you said it was 1770) and show ONLY line 1768, 1769, and 1770) into your next post.
 
GanjaUK
PostPosted: Mon Feb 16, 2004 4:42 pm Reply with quote

I understand what your saying, and i'm quite able to view the source of a web page, but the error is not where it says it is. This is why i save the whole page and saved it as a .txt file and uploaded it to my webshell.

Here is the lines around where the error is suppose to be:
Code:
<td>

<img src="themes/GanjaUK-DaRkSiDe-Productions/images/ganjauk_block_01.jpg" width="15" height="37" alt=""></td>
<td>
 
Raven
PostPosted: Mon Feb 16, 2004 4:58 pm Reply with quote

Your line editor is apparently not correct. Here is the source line in question
Code:
<table width="100%" border="0" cellspacing="0" cellpadding="0"><tr><td><script type="text/javascript">document.write(txt);</script></td></tr></table><table width="150" border="0" cellspacing="0" cellpadding="1"><form name="form1" method="post" action=""><tr><td colspan="2" align="center"><a href="Qshoutblock.html">Shout History</a>&nbsp;<a href="#" onMouseover="scrolldown()" onMouseout="copyspeed=marqueespeed"><img src="images/qshoutblock/down.gif" border="0" alt="" width="9" height="5"></a>&nbsp;<a href="#" onMouseover="scrolldoubleup()" onMouseout="copyspeed=marqueespeed"><img src="images/qshoutblock/up.gif" border="0" alt="" width="9" height="5"></a>&nbsp;<a href="#" onMouseover="copyspeed=pausespeed" onMouseout="copyspeed=marqueespeed"><img src="images/qshoutblock/pause.gif" border="0" alt="" width="9" height="5"></a><br /><input type="text" name="comment"></td></tr><tbody id="log1" style="display:show;"><tr><td align="center"><input type="submit" name="Submit" value="Shout"></td><td align="center"><span onClick="contract(log1);expand(log2);MM_swapImage('Image1','','images4/animatedfrpic2.gif',1)" class="newsbutton"><input type="button" value="Smilies"></span></td></tr></tbody> <tbody id="log2" style="display:none"><tr><td align="center"><input type="submit" name="Submit" value="Shout"></td><td align="center"><span onClick="contract(log2);expand(log1);MM_swapImage('Image1','','images4/animatedfrpic.gif',1)" class="newsbutton"><input type="button" value="Smilies"></span></td></tr><tr><td class="tablejustified" colspan="2"><br /><a href="javascript: x()" onClick="DoSmilie(' ;) ');"><img src="images/qshoutblock/wink.gif" border="0"></a>&nbsp;<a href="javascript: x()" onClick="DoSmilie(' :/ ');"><img src="images/qshoutblock/undecided.gif" border="0"></a>&nbsp;<a href="javascript: x()" onClick="DoSmilie(' :) ');"><img src="images/qshoutblock/smiley.gif" border="0"></a>&nbsp;<a href="javascript: x()" onClick="DoSmilie(' :p ');"><img src="images/qshoutblock/tongue.gif" border="0"></a>&nbsp;<a href="javascript: x()" onClick="DoSmilie(' :o ');"><img src="images/qshoutblock/shocked.gif" border="0"></a>&nbsp;<a href="javascript: x()" onClick="DoSmilie(' 8-) ');"><img src="images/qshoutblock/rolleyes.gif" border="0"></a>&nbsp;<a href="javascript: x()" onClick="DoSmilie(' :( ');"><img src="images/qshoutblock/sad.gif" border="0"></a>&nbsp;<br /><br /><a href="javascript: x()" onClick="DoSmilie(' :)) ');"><img src="images/qshoutblock/laugh.gif" border="0"></a>&nbsp;<a href="javascript: x()" onClick="DoSmilie(' :* ');"><img src="images/qshoutblock/kiss.gif" border="0"></a>&nbsp;<a href="javascript: x()" onClick="DoSmilie(' :$ ');"><img src="images/qshoutblock/embarassed.gif" border="0"></a>&nbsp;<a href="javascript: x()" onClick="DoSmilie(' :'( ');"><img src="images/qshoutblock/cry.gif" border="0"></a>&nbsp;<a href="javascript: x()" onClick="DoSmilie(' 8) ');"><img src="images/qshoutblock/cool.gif" border="0"></a>&nbsp;<a href="javascript: x()" onClick="DoSmilie(' :-D ');"><img src="images/qshoutblock/cheesy.gif" border="0"></a>&nbsp;<a href="javascript: x()" onClick="DoSmilie(' :@ ');"><img src="images/qshoutblock/angry.gif" border="0"></a>&nbsp;<br /><br /></tbody></form></table>
Now, armed with that, can you locate the error?
 
GanjaUK
PostPosted: Mon Feb 16, 2004 5:08 pm Reply with quote

No, I cant see anything, but I dont have anything to check other than looking at it manually. Do you think it could be the smiley characters?
 
GanjaUK
PostPosted: Mon Feb 16, 2004 5:12 pm Reply with quote

Actually it looks like the last td and tr was not closed, i will try that and see if it works.
 
Raven
PostPosted: Mon Feb 16, 2004 5:12 pm Reply with quote

Laughing I was just typing you a message about that, but that's not causing your error.
 
Raven
PostPosted: Mon Feb 16, 2004 5:17 pm Reply with quote

Code:
<a href="javascript: x()" onClick="DoSmilie(' :'( ')
An extra ' mark.
 
GanjaUK
PostPosted: Mon Feb 16, 2004 5:26 pm Reply with quote

Razz Well it did not work anyway Crying or Very sad
Thinking about it, IE does not show errors for not closing table tags anyway. Back to the drawing board i guess.

Where TD and TR was suppose to be closed there is this code:
Code:


         /*//$content .= "</td>";
         //$content .= "</tr>";*/


Guess it didnt do its job.
 
Raven
PostPosted: Mon Feb 16, 2004 5:29 pm Reply with quote

See my above post. That's where the error is.
 
GanjaUK
PostPosted: Mon Feb 16, 2004 5:34 pm Reply with quote

Yeh i posted before I see your latest post. Rolling Eyes
Excellent find mate. I updated that smiley from
Code:
:'(
to
Code:
:((
in the database. And no more error. Thank you. Wink

Also, what did you use to track it down? Dreamweaver is what i used to find the un closed table tags, but it does not deal with java, or did you spot it with that eagle eye?
 
Raven
PostPosted: Mon Feb 16, 2004 5:41 pm Reply with quote

When ever I have mangled code like that (run on code), I usually modify the php code to insert a \n after/before every line so that when I look at the source I am looking at a specific line of code. Since I couldn't modify the php code, I just looked at the source line error (from IE) and broke that mangled code into logical sections. Then, looking at it in my browser, it showed the exact line number that was erring.
 
GanjaUK
PostPosted: Mon Feb 16, 2004 5:49 pm Reply with quote

I'm surprised this shoutbox even works at all looking at it.
I think I will spend the rest of the night cleaning up some code in the site and closing all them tags.

If you want to see something funny, view my website in Netscape.
Mr. Green
 
illkidk
New Member
New Member


Joined: Mar 24, 2005
Posts: 8

PostPosted: Thu Mar 24, 2005 6:40 pm Reply with quote

Actually, Im having the same issue and I viewed the source code then ran it through textpad. I tried to paste it here as a quote but it's banning me for trying to run scripts? I would greatly appreciate if someone could scan through my chunk of code for the error. I can post it here if someone can give me an idea of how to do it without it seeming like I'm trying to run a script. Thanks!
 
View user's profile Send private message
Raven
PostPosted: Thu Mar 24, 2005 6:43 pm Reply with quote

That's probably because you're trying to post code with a script tag in it. Before posting your code change all <script to <scr~ipt or anything that breaks up the tag.
 
illkidk
PostPosted: Thu Mar 24, 2005 6:47 pm Reply with quote

Sweet! Thanks that obviously was the issue and I got it to work now.

Code:


   <tr>
      <td class="row1" width="150" align="left"

valign="middle"><span class="nav"><a href="#top" class="nav">Back to top</a></span></td>
      <td class="row1" width="100%" height="28" valign="bottom"

nowrap="nowrap"><table cellspacing="0" cellpadding="0" border="0" height="18" width="18">
         <tr>
            <td valign="middle" nowrap="nowrap">

<a href="forums.html?file=profile&mode=viewprofile&u=3"><img src="themes/GameTech/forums/images/lang_english/icon_profile.gif" alt="View user's profile" title="View user's profile" border="0" /></a>  <a href="messages-post-3.html"><img src="themes/GameTech/forums/images/lang_english/icon_pm.gif" alt="Send private message" title="Send private message" border="0" /></a>

   <scr~pt

language="Javascr~pt" type="text/javascr~pt"><!--

   if ( navigator.userAgent.toLowerCase().indexOf('mozilla') != -1 &&

navigator.userAgent.indexOf('5.') == -1 )
      document.write(' ');
   else
      document.write('</td><td>&nbsp;</td><td valign="top" nowrap="nowrap"><div

style="position:relative"><div style="position:absolute"></div><div

style="position:absolute;left:3px;top:-1px"></div></div>');

            //--></scr~pt><noscr~pt></noscr~pt></td>
         </tr>
      </table></td>
   </tr>
   <tr>
      <td class="spaceRow" colspan="2" height="1"><img

src="themes/GameTech/forums/images/spacer.gif" alt="" width="1" height="1" /></td>
   </tr>
   <tr align="center">
      <td class="catBottom" colspan="2" height="28"><table cellspacing="0"

cellpadding="0" border="0">
         <tr><form method="post" action="forums.html?file=viewtopic&t=42&amp;start=0">
            <td align="center"><span class="gensmall">Display posts from previous:

<select name="postdays"><option value="0" selected="selected">All Posts</option><option value="1">1 Day</option><option value="7">7 Days</option><option value="14">2 Weeks</option><option value="30">1 Month</option><option value="90">3 Months</option><option value="180">6 Months</option><option value="364">1 Year</option></select>&nbsp;<select name="postorder"><option value="asc" selected="selected">Oldest First</option><option value="desc">Newest First</option></select>&nbsp;<input type="submit" value="Go"

class="liteoption" name="submit" /></span></td>
         </form></tr>
      </table></td>
   </tr>
</table>
 
sixonetonoffun
Spouse Contemplates Divorce


Joined: Jan 02, 2003
Posts: 2496

PostPosted: Thu Mar 24, 2005 6:58 pm Reply with quote

Is the java code word wrapped like that in your script? Maybe thats all thats wrong.
Code:


   if ( navigator.userAgent.toLowerCase().indexOf('mozilla') != -1 && navigator.userAgent.indexOf('5.') == -1 ) document.write(' ');
   else
      document.write('</td><td>&nbsp;</td><td valign="top" nowrap="nowrap"><div style="position:relative"><div style="position:absolute"></div><div style="position:absolute;left:3px;top:-1px"></div></div>');

_________________
[b][size=5]openSUSE 11.4-x86 | Linux 2.6.37.1-1.2desktop i686 | KDE: 4.6.41>=4.7 | XFCE 4.8 | AMD Athlon(tm) XP 3000+ | MSI K7N2 Delta-L | 3GB Black Diamond DDR
| GeForce 6200@433Mhz 512MB | Xorg 1.9.3 | NVIDIA 270.30[/size:2b8 
View user's profile Send private message
illkidk
PostPosted: Thu Mar 24, 2005 7:11 pm Reply with quote

sixonetonoffun wrote:
Is the java code word wrapped like that in your script? Maybe thats all thats wrong.
Code:


   if ( navigator.userAgent.toLowerCase().indexOf('mozilla') != -1 && navigator.userAgent.indexOf('5.') == -1 ) document.write(' ');
   else
      document.write('</td><td>&nbsp;</td><td valign="top" nowrap="nowrap"><div style="position:relative"><div style="position:absolute"></div><div style="position:absolute;left:3px;top:-1px"></div></div>');


Six - You rock! That seems like it was, indeed, the issue! I greatly appreciate your help. Thank you so much!
 
chs
New Member
New Member


Joined: Aug 01, 2010
Posts: 2

PostPosted: Sun Aug 01, 2010 1:29 pm Reply with quote

Hi, I am a new user and wanting to find solution to similar problem. I am not programmer, I need to rectify this on my own, hence looking for help.

I am getting Internet explorer error message " unterminated string constant", when I am on following page of my website : Only registered users can see links on this board! Get registered or login!
 
View user's profile Send private message
Palbin
Site Admin


Joined: Mar 30, 2006
Posts: 2583
Location: Pittsburgh, Pennsylvania

PostPosted: Sun Aug 01, 2010 2:40 pm Reply with quote

You have tabs/returns in your JavaScript for the email fields.

Code:


            <td align="Right" valign="Middle" width="30%"><b><font color="#ff0000">
              *</font></b> Primary E-mail<b>:
            </b></td>
            <td align="Left" valign="Middle">
            &nbsp;&nbsp;<input class="field_style" name="email" size="40"
            maxlength="50" onChange="javascript:while(''+this.value.charAt(0)=='
            ')this.value=this.value.substring(1,this.value.length);"
            onblur="this.value=ignoreSpaces(this.value);" type="text"></td>
            </tr>
            <tr>
            <td align="Right" valign="Middle" width="30%">Alternate E-mail<b>:
            </b></td>
            <td align="Left" valign="Middle">
            &nbsp;&nbsp;<input class="field_style" name="Alternate_email" size="40"
            maxlength="50" onChange="javascript:while(''+this.value.charAt(0)=='
            ')this.value=this.value.substring(1,this.value.length);"
            onblur="this.value=ignoreSpaces(this.value);" type="text"></td>
            </tr>

I have no idea how the code it written, but the onchange javascript needs to output on one line. For both the primary and alternate email fields.
Code:


onChange="javascript:while(''+this.value.charAt(0)==' ')this.value=this.value.substring(1,this.value.length);"

_________________
"Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it." — Brian W. Kernighan. 
View user's profile Send private message
chs
PostPosted: Mon Aug 02, 2010 8:59 am Reply with quote

Palbin wrote:
You have tabs/returns in your JavaScript for the email fields.

Code:


            <td align="Right" valign="Middle" width="30%"><b><font color="#ff0000">
              *</font></b> Primary E-mail<b>:
            </b></td>
            <td align="Left" valign="Middle">
            &nbsp;&nbsp;<input class="field_style" name="email" size="40"
            maxlength="50" onChange="javascript:while(''+this.value.charAt(0)=='
            ')this.value=this.value.substring(1,this.value.length);"
            onblur="this.value=ignoreSpaces(this.value);" type="text"></td>
            </tr>
            <tr>
            <td align="Right" valign="Middle" width="30%">Alternate E-mail<b>:
            </b></td>
            <td align="Left" valign="Middle">
            &nbsp;&nbsp;<input class="field_style" name="Alternate_email" size="40"
            maxlength="50" onChange="javascript:while(''+this.value.charAt(0)=='
            ')this.value=this.value.substring(1,this.value.length);"
            onblur="this.value=ignoreSpaces(this.value);" type="text"></td>
            </tr>

I have no idea how the code it written, but the onchange javascript needs to output on one line. For both the primary and alternate email fields.
Code:


onChange="javascript:while(''+this.value.charAt(0)==' ')this.value=this.value.substring(1,this.value.length);"
Hi Palbin,

Would changing the code as shown above would solve the problem ?
 
Display posts from previous:       
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> Seeking applications ...

View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Powered by phpBB © 2001-2007 phpBB Group
All times are GMT - 6 Hours
 
Forums ©