simple gives me "Invalid argument" error only in Internet explorer

can someone tell me why in the following code, first link work and secont doesnt (only in internet explorer). how can i tweak it?

thanks in advance

<html xmlns="">
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Untitled Document</title>
<script type="text/JavaScript">
function MM_openBrWindow(theURL,winName,features) { //v2.0,winName,features);

function open_postcode() {
      var postcode = document.getElementById ('WwwCustomerPostcode');
      var ppp = postcode.value;
      var sss = "/www_customers/codeplus/"+ppp;//+postcode.value;//+'/'+property.value;
      MM_openBrWindow(sss,"Spring Harvest Holidays","width=780,height=600");

<p><a href="javascript:MM_openBrWindow('/customers/show/2','ddd','width=300,height=200')">first link</a>
  <br />
    <a href="javascript:open_postcode()">second link</a></p>
<form id="form1" name="form1" method="post" action="">
  <input type="text" name="textfield" id="WwwCustomerPostcode" />
Who is Participating?
Michel PlungjanIT ExpertCommented:

Although what is the point to pass 3 parameters to a function that use the parameters to call with the same 3 parameters?

Also do yourself a favour and use

function open_postcode() {
     var postcode = document.getElementById ('WwwCustomerPostcode');
     var ppp = postcode.value;
     var sss = "/www_customers/codeplus/"+ppp;//+postcode.value;//+'/'+property.value;
     if (!w) alert('Please allow popups')
     return false; // cancel the link

<a href="/customers/show/2" target="ddd"
onClick=",,'width=300,height=200'); return (w)?false:true">first link</a>

<a href="#" onClick="return open_postcode()">second link</a>

to handle popup blockers and to not unload the page when clicking a link that does not leave the page
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.