SitePoint Sponsor

User Tag List

Results 1 to 7 of 7
  1. #1
    SitePoint Addict Huscy's Avatar
    Join Date
    Jul 2002
    Location
    Newcastle, UK
    Posts
    318
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Internet Explorer error...

    OK, I think this is the problem code...
    PHP Code:
                $linkset .= '<a href="'.$leveltwo['linkto'].'" onClick="return showmenu(\''.$leveltwo['linkname'].'\')" onMouseover="window.status=\''.$leveltwo['alt_text'].'\';\'\';return true" onMouseout="window.status=\'\';return true">+ '.$leveltwo['linkname'].'</a><br>'
    if you ignore the PHP part, can anybody tell me the problem, showmenu is a function which is shown below:
    Code:
    <script language="JavaScript" type="text/javascript">
    				<!-- Hide
    				function showmenu(menutoshow)
    				{
    					if(document.getElementById)
    					{
    						if(document.getElementById(menutoshow).style.display == "block")
    						{
    						document.getElementById(menutoshow).style.display = "none"
    						}
    						else
    						{
    						document.getElementById(menutoshow).style.display = "block"
    						}
    						return false
    					}
    					return true
    				}
    				//--->
    				</script>
    the problem is 'expected ;' and can be seen at http://www.infinite-fire.net

    HELP!

  2. #2
    SitePoint Addict
    Join Date
    May 2000
    Posts
    313
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Looks like your problem is that you need to escape the single quotes for these variables:
    $leveltwo['linkto'].
    Should be
    $leveltwo[\'linkto\'].

    There may be other problems, but that was one that I found.

  3. #3
    SitePoint Guru Vincent Puglia's Avatar
    Join Date
    Feb 2000
    Location
    where the World once stood
    Posts
    700
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    just went there, clicked a few, no problem. where is your error and what are you running?

    Vinny
    Where the World Once Stood
    the blades of grass
    cut me still

  4. #4
    SitePoint Addict Huscy's Avatar
    Join Date
    Jul 2002
    Location
    Newcastle, UK
    Posts
    318
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I dont get the error, as i run firebird, but seeing as 80% or so of my visitors do, i need to fix it - the problem is occuring when using IE.. on win xp if thats relative?

    thanks requestcode i'l try doing that

  5. #5
    SitePoint Addict Huscy's Avatar
    Join Date
    Jul 2002
    Location
    Newcastle, UK
    Posts
    318
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    actually, is there a problem here?

    Code:
    <a href="index.php?page=home.php" onMouseover="window.status='Back to homepage.';'';return true" onMouseout="window.status='';return true">Home</a>
    its difficult trying to see the problem with dynamically generated pages with mixed PHP and JavaScript

  6. #6
    SitePoint Guru Vincent Puglia's Avatar
    Join Date
    Feb 2000
    Location
    where the World once stood
    Posts
    700
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi,
    if thats relative?
    Yes, because I was using the aol browser.
    with IE 6.0, I found the following:
    Code:
    <a href="index.php?page=pstut_inset.php&PHPSESSID=ba330bbd8220b0a5ccf197217ce8886e"
    onMouseover="window.status='Learn to make text look like it's inset into a texture.';'';return true" 
    onMouseout="window.status='';return true">- Inset Text</a>
    You will need to escape (or spell out) "it's"

    Vinny
    Where the World Once Stood
    the blades of grass
    cut me still

  7. #7
    SitePoint Addict Huscy's Avatar
    Join Date
    Jul 2002
    Location
    Newcastle, UK
    Posts
    318
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    omg thank you - the problem wasnt with the javascript at all then :P but thanks all the same, thats fixed it


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •