1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

Javascript problem in Iframe

Discussion in 'JavaScript' started by greatlogix, Apr 28, 2008.

  1. #1
    I am calling following function in an IFrame.

    
    function baby_data(){
    	document.form1.get_data.value = 1;
    	document.form1.noadd.value = 1;
    	document.form1.submit();
    }
    
    HTML:
    Following link to invoke this function.
    <a href="javascript://" onClick="baby_data()">Get Data</a>
    HTML:
    Its working in IE7 and FF but not in IE6. Whats wrong here. What should I change in the function so that it should work perfectly in IE6 too?
     
    greatlogix, Apr 28, 2008 IP
  2. greatlogix

    greatlogix Active Member

    Messages:
    664
    Likes Received:
    13
    Best Answers:
    1
    Trophy Points:
    85
    #2
    Problem Fixed. I replaced href="javascript://" with href="#" and its working. Does IE6 not support "javascript://" ?
     
    greatlogix, Apr 28, 2008 IP
  3. vpguy

    vpguy Guest

    Messages:
    275
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Don't use the two slashes with a javascript href.

    href="javascript:" ....... okay
    href="javascript://" ..... not recommended
     
    vpguy, May 3, 2008 IP