Javascript/Php Issue
What I did was to add a tag to the beginning of the form with an "onsubmit" tag calling a Javascript which in turn submits a hidden form which posts to my PHP program that updates the databases.
This works great except... If I leave the opt in page and come back, it won't work anymore. I have tried everything that I can think of, I changed the hidden form action to post the vars directly without using the hidden inputs, I have tried changing it to open the file in a hidden div or even the main window (The php program has no output) Does anyone have any ideas why it will stop working when the window looses focus? the code is added below:
<form onsubmit="return OnButton1();" action="http://yahoo.com">
<input type="text" value="Your Name Here" />
<input type="text" value="Your Email Here" />
<input type="submit" value=" " />
</form>
</div>
<form name = "Formzilla" action = "http://www.mysite.com/lpage/maillist.php" method ="post">
<input type="hidden" name = "item" value = "1">
<input type = "hidden" name = "page" value = "3">
</form>
<script language="javascript">
function OnButton1()
{
document.Formzilla.submit();
return true;
}
</script>
-
BenB969 Banned{{ DiscussionBoard.errors[1983811].message }}-
danmart -
Thanks
{{ DiscussionBoard.errors[1983823].message }}-
BenB969 Banned{{ DiscussionBoard.errors[1983884].message }}-
danmart -
Thanks
{{ DiscussionBoard.errors[1983906].message }} -
-
-
-