Jump to content

Strangest thing ever..


Kane250

Recommended Posts

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>

Link to comment
https://forums.phpfreaks.com/topic/112274-strangest-thing-ever/
Share on other sites

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

Link to comment
https://forums.phpfreaks.com/topic/112274-strangest-thing-ever/#findComment-584396
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.