Re: How to return some infos from a javascript with PHP+Javascript

From: Date: Fri, 10 Nov 2000 19:16:57 +0000
Subject: Re: How to return some infos from a javascript with PHP+Javascript
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-24694@lists.php.net to get a copy of this message
Create a Form with Hidden fields: <FORM NAME="YourFormName" METHOD="post" ACTION="YourPHPScript.php"> <INPUT TYPE="hidden" NAME="YourHiddenfieldName1" VALUE=""> <INPUT TYPE="hidden" NAME="YourHiddenfieldName2" VALUE=""> <INPUT TYPE="hidden" NAME="YourHiddenfieldName3" VALUE=""> </Form> Before u call PHP, set the values from the hidden field and submit then using a function like: function Set_and_Submit(Value2Set1, Value2Set2, Value2Set3){ document.YourFormName.YourHiddenfieldName1.value = Value2Set1; document.YourFormName.YourHiddenfieldName2.value = Value2Set1; document.YourFormName.YourHiddenfieldName3.value = Value2Set1; document.YourFormName.YourHiddenfieldName.submit(); } for example, using a link: <a href="JavaScript:Set_and_Submit("I", "h8","Microsoft")">Click here!</a> Enjoy! Leopoldo Wagner > Hi all, I need an advice from you gurus. I'm no sure about what solution to > use: I have a javascript, and i'd like to be able to return some data to > the server at different times. > > But what solutions do I have? I'm not too good at javascript and the only > one i thought was to load a script in another window to pass the > parameteres, like > > window.create("returnparameters.php?this=does&not=work")... > > and then close the window, but the window doesn't close under IE, and > sincerely I don't like the idea to open another window! (of course I can't > use the original window! :-) > > TIA, > Duccio. > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net > For additional commands, e-mail: php-general-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net >

« previous php.general (#24694) next »