PHP Web Host - Quality Web Hosting For All PHP Applications Just Great Software
  Login or Register
 • Home • Downloads • Your Account • Forums • 

View next topic
View previous topic


Google
 
Web RavenPHPScripts (This Site)
Post new topic   Reply to topic
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 Back to top

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 to the forums!


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


Joined: Aug 27, 2002
Posts: 16976
Location: Kansas

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

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 Visit poster's website AIM Address Yahoo Messenger
GanjaUK
Life Cycles Becoming CPU Cycles


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

PostPosted: Mon Feb 16, 2004 4:24 pm Reply with quote Back to top

The shoutbox is active, its on the right hand side. Ahh I see the error is only there when logged in...
View user's profile Send private message Visit poster's website
Raven
Site Admin/Owner


Joined: Aug 27, 2002
Posts: 16976
Location: Kansas

PostPosted: Mon Feb 16, 2004 4:30 pm Reply with quote Back to top

I have deleted your last post. Please just post the lines I requested. Thanks.
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger
GanjaUK
Life Cycles Becoming CPU Cycles


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

PostPosted: Mon Feb 16, 2004 4:33 pm Reply with quote Back to top

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 to the forums!


Thanks


Last edited by GanjaUK on Mon Feb 16, 2004 4:40 pm; edited 1 time in total
View user's profile Send private message Visit poster's website
Raven
Site Admin/Owner


Joined: Aug 27, 2002
Posts: 16976
Location: Kansas

PostPosted: Mon Feb 16, 2004 4:40 pm Reply with quote Back to top

??? 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.
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger
GanjaUK
Life Cycles Becoming CPU Cycles


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

PostPosted: Mon Feb 16, 2004 4:42 pm Reply with quote Back to top

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>
View user's profile Send private message Visit poster's website
Raven
Site Admin/Owner


Joined: Aug 27, 2002
Posts: 16976
Location: Kansas

PostPosted: Mon Feb 16, 2004 4:58 pm Reply with quote Back to top

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?
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger
GanjaUK
Life Cycles Becoming CPU Cycles


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

PostPosted: Mon Feb 16, 2004 5:08 pm Reply with quote Back to top

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?
View user's profile Send private message Visit poster's website
GanjaUK
Life Cycles Becoming CPU Cycles


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

PostPosted: Mon Feb 16, 2004 5:12 pm Reply with quote Back to top

Actually it looks like the last td and tr was not closed, i will try that and see if it works.
View user's profile Send private message Visit poster's website
Raven
Site Admin/Owner


Joined: Aug 27, 2002
Posts: 16976
Location: Kansas

PostPosted: Mon Feb 16, 2004 5:12 pm Reply with quote Back to top

Laughing I was just typing you a message about that, but that's not causing your error.
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger
Raven
Site Admin/Owner


Joined: Aug 27, 2002
Posts: 16976
Location: Kansas

PostPosted: Mon Feb 16, 2004 5:17 pm Reply with quote Back to top

Code:
<a href="javascript: x()" onClick="DoSmilie(' :'( ')
An extra ' mark.
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger
GanjaUK
Life Cycles Becoming CPU Cycles


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

PostPosted: Mon Feb 16, 2004 5:26 pm Reply with quote Back to top

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.
View user's profile Send private message Visit poster's website
Raven
Site Admin/Owner


Joined: Aug 27, 2002
Posts: 16976
Location: Kansas

PostPosted: Mon Feb 16, 2004 5:29 pm Reply with quote Back to top

See my above post. That's where the error is.
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger
GanjaUK
Life Cycles Becoming CPU Cycles


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

PostPosted: Mon Feb 16, 2004 5:34 pm Reply with quote Back to top

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?
View user's profile Send private message Visit poster's website
Raven
Site Admin/Owner


Joined: Aug 27, 2002
Posts: 16976
Location: Kansas

PostPosted: Mon Feb 16, 2004 5:41 pm Reply with quote Back to top

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.
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger
GanjaUK
Life Cycles Becoming CPU Cycles


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

PostPosted: Mon Feb 16, 2004 5:49 pm Reply with quote Back to top

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
View user's profile Send private message Visit poster's website
illkidk
New Member
New Member


Joined: Mar 24, 2005
Posts: 8

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

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
Site Admin/Owner


Joined: Aug 27, 2002
Posts: 16976
Location: Kansas

PostPosted: Thu Mar 24, 2005 6:43 pm Reply with quote Back to top

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.
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger
illkidk
New Member
New Member


Joined: Mar 24, 2005
Posts: 8

PostPosted: Thu Mar 24, 2005 6:47 pm Reply with quote Back to top

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="modules.php?name=Private_Messages&file=index&mode=post&u=3"><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>
View user's profile Send private message
sixonetonoffun
Spouse Contemplates Divorce


Joined: Jan 02, 2003
Posts: 2499

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

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>');
View user's profile Send private message
illkidk
New Member
New Member


Joined: Mar 24, 2005
Posts: 8

PostPosted: Thu Mar 24, 2005 7:11 pm Reply with quote Back to top

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!
View user's profile Send private message
chs
New Member
New Member


Joined: Aug 01, 2010
Posts: 2

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

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 to the forums!
View user's profile Send private message
Palbin
Site Admin


Joined: Mar 30, 2006
Posts: 2403
Location: Pennsylvania

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

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);"
View user's profile Send private message Visit poster's website
chs
New Member
New Member


Joined: Aug 01, 2010
Posts: 2

PostPosted: Mon Aug 02, 2010 8:59 am Reply with quote Back to top

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 ?
View user's profile Send private message
Display posts from previous:       
Post new topic   Reply to topic

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
Forums ©
 

All logos and trademarks in this site are property of their respective owner.
The comments are property of their posters, all the rest © 2002-2011 by Raven

You can syndicate our news using the file xml

CSE HTML Validator Helped Clean up This Page! [Valid RSS] valid RSS 2.0 Valid robots.txt Stop Spam Harvesters, Join Project Honey Pot

Website engines core code is © copyright by PHP-Nuke but has been heavily patched and modified by myself and others.
PHP-Nuke is a free software released under the GNU/GPL.


:: fisubice phpbb2 style by Daz :: PHP-Nuke theme by www.nukemods.com ::
:: fisubice Theme Modified by the RavenNuke™ Team ::

:: W3C CSS Compliance Validation :: W3C HTML 4.01 Transitional Compliance Validation ::

zerosum