Kane250 Posted June 28, 2008 Share Posted June 28, 2008 I have a form that submits data (an email address) to a popup window where the user fills in the rest of their contact information. For some reason it works fine on my index page, but once I add the code to another page to do the same thing, the popup appears but the data from the form does not get submitted to the popup. Furthermore, once this code is added to another page, the original index page doesn't function correctly anymore either until I reupload the index file again... My code is rather lengthy...I'll try and shorten it for you. <script type="text/javascript"> <!-- function wopen(url, name, w, h) { // Fudge factors for window decoration space. // In my tests these work well on all platforms & browsers. w += 20; h += -20; var win = window.open(url, name, 'width=' + w + ', height=' + h + ', ' + 'location=no, menubar=no, ' + 'status=no, toolbar=no, scrollbars=no, resizable=no'); win.resizeTo(w, h); win.focus(); } // --> </script> <div id="emailform"> <form method="post" action="index.php"/> <input type='text' value="" name="email" /> <div id="emailcheck"> <input type="submit" value="" class="button" onclick="wopen('mainsub.php', 'popup', 400, 375); return true;" onmouseover="this.className='button-over';" onmouseout="this.className='button';" /> </div> </div> Quote Link to comment Share on other sites More sharing options...
tomd79 Posted July 1, 2008 Share Posted July 1, 2008 if this is on the index page. is it posting to itself? <form method="post" action="index.php"/> If your copying the code to another page.. does the action not need updating or are you wanting it to go to index.php Quote Link to comment Share on other sites More sharing options...
adam84 Posted July 8, 2008 Share Posted July 8, 2008 Try this, its the same code that you have, but I took away all the spaces between the window configuration. *There isnt supposed to by any spaces between each of them and its supposed to be all on one line var win = window.open(url,name,'width='+w+',height='+h+',location=no,menubar=no,status=no,toolbar=no,scrollbars=no,resizable=no'); Good Luck *http://www.htmlgoodies.com/beyond/javascript/article.php/3471221 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.