SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Addict
    Join Date
    Mar 2002
    Location
    Los Angeles
    Posts
    325
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    onClick not workin in IE?

    I am getting this error in IE: Line 55, "Object doesn't support this property or method". Line 255 is this:

    Code:
    <input type="button" name="getCoupon" value="Get Coupon"  onClick="getCoupon();">
    everything is working fine in firefox...here's the js:



    Code:
    <script language="javascript" type="text/javascript">
       -->
       function getCoupon(){
       	var dropdown = document.getElementById("regionSelect");
       	
       	//var region = dropdown.options[dropdown.selectedIndex].text;
       	
       	//set the global vars tot he window object,
       	//so the popup window can reference them with window.opener
       	window['theRegion'] = dropdown.options[dropdown.selectedIndex].value;
       	window['firstName'] = document.getElementById("theFirstName").value;
       	window['lastName'] = document.getElementById("theLastName").value;
       	
       	var w = 500;
       	var h = 600;
       
       	
     	var newWin = window.open('coupon1.html', 'coupon', 'height='+h+',width='+w+',toolbar=No,location=No,scrollbars=No,status=No,resizable=No,fullscreen=No');newWin.moveTo((screen.width- w )/2,(screen.height- h )/2);newWin.focus();
       	return false;
       }
       //-->
       </script>
    From here on, it's instinctual...even straight roads meander.

  2. #2
    SitePoint Addict
    Join Date
    Mar 2002
    Location
    Los Angeles
    Posts
    325
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    nevermind, I'm a goof, i formatted the html comment at the start of the script wrong.
    From here on, it's instinctual...even straight roads meander.

  3. #3
    SitePoint Wizard Young Twig's Avatar
    Join Date
    Dec 2003
    Location
    Albany, New York
    Posts
    1,355
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Haha... I didn't catch that.


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
  •