The Web Design Group

... Making the Web accessible to all.

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> post stops working
jimfun71
post Jul 20 2014, 12:59 PM
Post #1





Group: Members
Posts: 1
Joined: 20-July 14
Member No.: 21,284



I have a basic form that works just fine.

<TD><form method="POST" action="http://www.contactform.php"><input type='hidden' name='contact' value='<?php echo $member['username']?> '></input><input id="button" type="submit" name="submit" value="Contact Member"></form></TD>

But when I add

onclick="java script:void window.open('http://www.contactform.php','',& #39;width=550,height=170,toolbar=0,menubar=0,location=1,status=0,scrollbars=0,re
sizable=0,left=600,top=400')

The window comes in a popup just as I wanted but the $_PASS stops working. The user name doesn't come through. Any help greatly appreciated. Thanks guys, Jim
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Christian J
post Jul 20 2014, 02:02 PM
Post #2


.
********

Group: WDG Moderators
Posts: 9,656
Joined: 10-August 06
Member No.: 7



The javascript void operator cancels the form submission in the parent window. But even though the popup window loads contactform.php, it doesn't submit the form there.

If you want to submit the form to the popup window, perhaps this script can be used: http://agichevski.com/2013/08/17/submit-fo...ing-javascript/

Or if the new window doesn't have to be a popup, just add target="_blank" to the form start tag. This may be safer with popup blockers as well.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post

Reply to this topicStart new topic
2 User(s) are reading this topic (2 Guests and 0 Anonymous Users)
0 Members:

 



- Lo-Fi Version Time is now: 26th April 2024 - 03:36 AM