Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 5 of 5
  1. #1
    Regular Coder
    Join Date
    Dec 2005
    Location
    UK
    Posts
    207
    Thanks
    6
    Thanked 2 Times in 2 Posts

    getElementById problems

    Any ideas where this line of code has gone wrong???


    Code:
    <a href="javascript:;" onClick="document.getElementById('enlarged').style.marginLeft='-190px'"><img src="websiteimages/graphicdesigntab.jpg" alt="graphictab" width="120" height="22" style="cursor:pointer;"></a>

    It works fine in Safari and ff but things go a bit wrong in IE.

    Thanks
    Last edited by many_tentacles; 07-11-2006 at 07:38 PM.

  • #2
    Senior Coder
    Join Date
    Feb 2003
    Posts
    1,665
    Thanks
    0
    Thanked 27 Times in 25 Posts
    "a bit wrong"

    It would probably help if you were a bit more descriptive.

  • #3
    Regular Coder
    Join Date
    Dec 2005
    Location
    UK
    Posts
    207
    Thanks
    6
    Thanked 2 Times in 2 Posts
    Sorry!!!

    if you go to www.tombrennand.net you can see the problem...

    like i say, works fine in FF but not in IE

    The position of the elements 'caption' and 'enlarged' do not move.

  • #4
    New Coder
    Join Date
    Nov 2005
    Location
    Central Indiana
    Posts
    51
    Thanks
    0
    Thanked 0 Times in 0 Posts
    You have all kinds of problems on this page, but there is at least one blocker:

    You are calling your PopUp method like this:

    PopUp('enlarged','websiteimages/225trans.gif', 'caption','&nbsp;');

    However, your "PopUp" implementation actually takes 6 parameters, not 4. You are trying to use the last two input parameters (xos,yos) in a calculation, but they are not defined. As a result, the calculations are computed as "NaN" (not a number). Then, right here:

    zxcele.style[key]=zxcstyle[key]

    You are trying to set some values with garbage data, and IE is throwing an "Illegal Argument" error. You need to get this fixed first before you work on anything else.

  • #5
    Regular Coder
    Join Date
    Dec 2005
    Location
    UK
    Posts
    207
    Thanks
    6
    Thanked 2 Times in 2 Posts
    ok... I think I fixed one problem.... although the scrolling menu on the graphic design tab does not seem to work in IE still

    any ideas?

    www.tombrennand.net


  •  

    Posting Permissions

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