Re: [PHP] Submit Form Values To Parent
Shaun wrote: Hi, How can I get the form values submitted from an iframe where the target is the parent window? Use Javascript. Check out irt.org - Javascript They have lots of great examples. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Submit Form Values To Parent
Hi all, I have made an example of this now. If you click on this link: http://www.assertia.com/iframe.html and then click on 'Click Here'. I am trying to display the form results in the parent window, but I am having no luck! Here is my code: iframe.html: !DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Transitional//EN http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd; html xmlns=http://www.w3.org/1999/xhtml; head meta http-equiv=Content-Type content=text/html; charset=iso-8859-1 / titleUntitled Document/title /head body iframe src=form.html/iframe /body /html form.html: form name=myform input type=hidden name=text value=test a href=result.php target=_parent onclick=document.myform.submit();Click here/a /form result.php: !DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Transitional//EN http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd; html xmlns=http://www.w3.org/1999/xhtml; head meta http-equiv=Content-Type content=text/html; charset=iso-8859-1 / titleUntitled Document/title /head body ?= print_r($_POST); ? /body /html Any ideas? Terence [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Shaun wrote: Hi, How can I get the form values submitted from an iframe where the target is the parent window? Use Javascript. Check out irt.org - Javascript They have lots of great examples. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Submit Form Values To Parent
[snip] I have made an example of this now. If you click on this link: http://www.assertia.com/iframe.html and then click on 'Click Here'. I am trying to display the form results in the parent window, but I am having no luck! [/snip] Actually it is working properly. You have no POST method in your form call form.html: form name=myform ---WHAT IS THE METHOD? input type=hidden name=text value=test a href=result.php target=_parent onclick=document.myform.submit();Click here/a /form -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Submit Form Values To Parent
Jay Blanchard [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] [snip] I have made an example of this now. If you click on this link: http://www.assertia.com/iframe.html and then click on 'Click Here'. I am trying to display the form results in the parent window, but I am having no luck! [/snip] Actually it is working properly. You have no POST method in your form call form.html: form name=myform ---WHAT IS THE METHOD? input type=hidden name=text value=test a href=result.php target=_parent onclick=document.myform.submit();Click here/a /form Hi Jay, Thanks for your reply, I'm not sure what is happening because I have added the method yet it still isn't working... Any ideas? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Submit Form Values To Parent
[snip] http://www.assertia.com/iframe.html and then click on 'Click Here'. I am trying to display the form results in the parent window, but I am having no luck! [/snip] Actually it is working properly. You have no POST method in your form call form.html: form name=myform ---WHAT IS THE METHOD? input type=hidden name=text value=test a href=result.php target=_parent onclick=document.myform.submit();Click here/a /form Thanks for your reply, I'm not sure what is happening because I have added the method yet it still isn't working... [/snip] It is working. The POST array contains the text=test you set up for it. If you think that it is not the proper behavior, what exactly is it that you expect? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Submit Form
is your question in regards to: a) how to bring data from the 1st form across to the 2nd, so that it can all be updated together OR b) how to POST data from a form using a html link, probably with javascript If b, best place to ask is a javascript list/newsgroup, or by looking for something similar, and checking out how they did it. Cheers, Justin on 09/01/03 9:10 AM, Stephen ([EMAIL PROTECTED]) wrote: Hello, I have a question. First of all, I want to save the data a user has typed in a form into a MySQL database so they can load it up for later use but, I need to first submit all the form vars on the current page from a link. This may be Javascript, but either way, I'm not sure how to do it. Any ideas? Here's a graph kinda... -User enters form and submits the first page --User taken to second form ---User fills out the first two fields User clicks a Save Progress link and all form fields submitted (I can do beyond this part but just so you get the idea of what I mean) -PHP saves current form vars to a MySQL database --User told information saved and he leaves ---User comes back next day, clicks load User select his current project -User taken to the last form he was on, fields filled in Thanks, Stephen Craton http://www.melchior.us What's the point in appearance if your true love, doesn't care about it? -- http://www.melchior.us -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Submit form from javascript code
On Saturday 31 August 2002 19:43, Madjid Nasiri wrote: I need submit a form from javascript code. My code near this code: Please ask javascript questions on a javascript list. -- Jason Wong - Gremlins Associates - www.gremlins.com.hk Open Source Software Systems Integrators * Web Design Hosting * Internet Intranet Applications Development * /* Steinbach's Guideline for Systems Programming: Never test for an error condition you don't know how to handle. */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Submit form from javascript code
Hi Instead of retrun false; im sure you meant return false; The reason its working with confirm and the like is because of their return code which is actually true. Try changing it to return true, im pretty sure that will fix it. Cheers, Todd. -Original Message- From: Madjid Nasiri [mailto:[EMAIL PROTECTED]] Sent: Saturday, 31 August 2002 9:44 PM To: [EMAIL PROTECTED] Subject: [PHP] Submit form from javascript code Hi all I need submit a form from javascript code. My code near this code: !-- My Code -- form name=myform action=... method=POST input type=hidden name=id value=0 /form script language=javascript function submitform(iId) { document.myform.elements['id'].value=iId; document.myform.submit(); alert(foo); // This is code is dummy retrun false; } /script a href=... onMouseDown=submitform(1);Id One/abr a href=... onMouseDown=submitform(2);Id Two/abr a href=... onMouseDown=submitform(1000);Id 1000/abr !-- End My Code -- If I remove alert() call in submitform function, this code noting work, but if i used alert() or confirm() function this code working, Why? How can i remove alert() function and my code work? Thanks for Answer Madjid Nasiri [EMAIL PROTECTED] http://www.kawacomputer.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Submit Form
Are you using method=post in your form tag? Sometimes, if you leave that out, some weird stuff will appear in the URL. Tyler Longren Captain Jack Communications [EMAIL PROTECTED] www.captainjack.com - Original Message - From: dengach [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, April 22, 2002 9:10 AM Subject: [PHP] Submit Form I am using php4 on windows and has been serving php files just fine however, once I started creating forms i.e data submition in forms. The browser displays /php4/php.exe as part of the url even after I try to refresh the page. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] submit form values to new site after validation
Using the POST method will prevent the credit card data from being included in the url. I would still be careful about sending data like this via a POST to a form handler on an entirely different site. It would be better if there was some sort of secure socket to transfer the data through. -- phill "Tom Beidler" [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... I'm trying to modify and e-commerce site which originally sent an email with the credit card info in an email. Now they would like to pass credit card numbers to a payment-processing service. For this particular service, Authorize.net, you would normally direct the form data to the payment-processing service. The page is currently setup to resubmit to itself and validate fields before anything else. I would like to keep that functionality but I'm wondering how to pass the values onto the payment-processing center after the validation. The flow would be, hit the submit button and send the data to the page to validate the fields and then send the info to Authorize.net. The form currently has about 15 fields to validate and only needs to pass 3 of them to the payment-processing center. I'm still relatively new to this and I'm thinking the only way to pass variables is through a submitted form or the url and I don't want to put the credit card info in the url. Any help would be greatly appreciated. Tom . Tom Beidler Orbit Tech Services 805.682.8972 (phone) 805.682.5833 (fax) [EMAIL PROTECTED] http://www.orbittechservices.com/ . -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]