|
-
Mar 28th, 2002, 01:01 PM
#1
Thread Starter
Lively Member
Javascript popwindow with a form...
Hi i have a poll i made in php and using a javascript popup window from a snippet i got from the web but ever since i used the javascript when the user clicks the vote button the values arent sent so the vote dosent count.
heres the script im using in the form...
<FORM NAME="VotePoll" ACTION="javascript:;" onSubmit="OpenBrWindow('../poll.php','Test2','toolbar=no,location=no,status=no,menubar=no,scrollbars=auto,resizable=yes','240', '300','true')" METHOD=POST>
thanks
My software never has bugs. It just develops random features...
-
Mar 28th, 2002, 01:36 PM
#2
ACTION="Javascript:;" is your problem...
If poll.php is the page where the votes get registered, then you're going to have to pass along the information from THIS page to that one. then ONLY can his vote get registered.
-
Mar 28th, 2002, 01:36 PM
#3
well in poll.php you will need to run some more javascript to get the form values to it.
something like
Code:
<html>
<head>
<title>Untitled</title>
<script language=javascript>
Function set_form_data(){
var parent=window.opener.form1.textbox1.value;
window.document.form2.textbox2.value=parent;
}
</script>
</head>
<body onload="set_form_data();">
<form Name="form2">
<Input Type="test" Name="textbox2" size=15 disabled>
</form>
</body>
</html>
-
Mar 28th, 2002, 01:53 PM
#4
Thread Starter
Lively Member
Thanks guys isnt there any way i could get the info before opening the window and then adding to the link the values so it would then look a little somthing like this.....
"OpenBrWindow('../poll.php?checked=1',....etc
then that would make it alot easier to work with in PHP
My software never has bugs. It just develops random features...
-
Mar 28th, 2002, 01:59 PM
#5
but not if you have to open a new window. the new window has to talk to the window that opened it. so the child window has to tak to the mother window so it knows what variables it needs.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|