ie7 javascritp json

Discussion in 'Web Design and Development' started by nownot, Apr 1, 2009.

  1. nownot macrumors regular

    Joined:
    Feb 25, 2007
    Location:
    tx
    #1
    I have a page that once a radio button is clicked it calls a javascript function to see if there is a password needed to select that item. The js calls a JSON -> php which hits my db and returns the pass. It works in all browsers except for ie7 and ie8 <- ( i think haven't tested ie8 yet ), and I cant figure out why. My code is http://pastie.org/433970 and an example of the page is http://173.57.59.9:8080/wp-content/test_sites/robocamp/testradio.html . If anyone could help me with this I would forever be in your debt, thanks.
     
  2. angelwatt Moderator emeritus

    angelwatt

    Joined:
    Aug 16, 2005
    Location:
    USA
    #2
    I don't have IE access at the moment. Are there any errors messages, or have you debugged to a certain part of the code not working? Also, did you test IE6?
     
  3. nownot thread starter macrumors regular

    Joined:
    Feb 25, 2007
    Location:
    tx
    #3
    no error messages, and no i havent tested w/ ie6 but will once i go to class. the bug seems to be the json part, not completely sure, kinda new to js.
     
  4. angelwatt Moderator emeritus

    angelwatt

    Joined:
    Aug 16, 2005
    Location:
    USA
    #4
    I'm going to make some blind suggestions. Try moving your request.open and request.send lines after the request.onreadystatechange block. Order can matter at times. Also, looking at my own AJAX method that I have, after checking the readyState you should also check the status (which should be 200), so you would have,
    PHP:
    if(request.readyState == && request.status == 200){
     

Share This Page