www.webdeveloper.com
Results 1 to 6 of 6

Thread: Anyone up for a challenge?

  1. #1
    Join Date
    May 2003
    Location
    New York
    Posts
    279

    Anyone up for a challenge?

    Apparently the 71 people who "looked" at this could not figure it out.

    http://www.webdeveloper.com/forum/sh...ad.php?t=75614

    Any help is greatly appreciated

  2. #2
    Join Date
    Apr 2003
    Location
    Netherlands
    Posts
    21,654
    You script loops through an array of (all) anchors, checking it's id against a value. They don't all have an id!
    Try this:
    Code:
    aTagId = aTag.getAttribute("id");
    if(aTag.getAttribute("id") && aTagId.indexOf(product) != -1){
    aTag.innerHTML = "<img src='Images/plus.jpg' border='0'>"
    At least 98% of internet users' DNA is identical to that of chimpanzees

  3. #3
    Join Date
    May 2003
    Location
    New York
    Posts
    279
    That worked! Thank you.

    I am curious though; why did it work (without aTag.getAttribute("id") ) in IE but not in Mozilla?

  4. #4
    Join Date
    Jul 2003
    Location
    The City of Roses
    Posts
    2,503
    Apparently the 71 people who "looked" at this could not figure it out
    So you get better responses in the future, realize that many people will not even bother to try when they see large amounts of poorly formatted, poorly commented, and just generally very hard to read code.
    for(split(//,'))*))91:+9.*4:1A1+9,1))2*:..)))2*:31.-1)4131)1))2*:3)"'))
    {for(ord){$i+=$_&7;grep(vec($s,$i++,1)=1,1..($_>>3)-4);}}print"$s\n";

  5. #5
    Join Date
    Apr 2003
    Location
    Netherlands
    Posts
    21,654
    IE returns "" for a non-existing id, where as FF returns null.
    indexOf still works on an empty string, but not with a null value.

    Take note of Jeff Mott's comments!
    At least 98% of internet users' DNA is identical to that of chimpanzees

  6. #6
    Join Date
    May 2003
    Location
    New York
    Posts
    279
    Thank you for the clarification.

    I am completely aware that the original post was long and hard to understand which is why I apologized at the end of that post - this is something that had to be answered though and nobody even replied asking for any clarification they thought they needed.

    I just had to post it again the way I did to get someone to reply with at least something - sorry but this was critical.

    Thank you again Fang.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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



Recent Articles