Re: [PHP] Submitting form in new window!
Glory, 2 Problems with this : 1. I have a PHP/MySQL statement within my PHP Code, which is in the Body part of the page. This generates the Form Fields & Thier Values.. there are a lot of hidden fields who's values are defined by Database Variables.. If i place the FormSubmit()Function in the head, how will those variables pass? 2. I'm already using Target=_Blank ... problem with that is that you cannot control size of window. And that is exactly what i need to do.. define parameters for the window... Thanks, T. Edison Jr. --- vins <[EMAIL PROTECTED]> wrote: > This is JavaScript you need. > > one example. > > > > onSubmit="FormSubmit()'"> > > > TYPE="JavaScript/Text"> > function FormSubmit() > { > var textfield = Information.TextField.value; > var url = "./processForm.php?textfield=" + > textfield; > > window.open(url); > } > > > OR > > just add this to your form tag. > TARGET="_blank" > > > "Thomas Edison Jr." <[EMAIL PROTECTED]> wrote > in message > [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > > Glory, > > > > > Attach a javascript event to the submit button > > > > Something like : > > > > > > > > Wherein wow() defines a the window.open function? > > > > > and also attach the form values to the url. > > How do i do this? Because the 3 or 4 form fields i > > have, which are Hidden Fields, contain values > coming > > in from $myrow[stuff], that is, coming in from a > > Database Table. How do i define these values up in > the > > Javascript function in the of the file? > > > > Thanks, > > T. Edison Jr. > > > > > > > > __ > > Do You Yahoo!? > > Sign up for SBC Yahoo! Dial - First Month Free > > http://sbc.yahoo.com > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > __ Do You Yahoo!? Yahoo! Health - Feel better, live better http://health.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Submitting form in new window!
This is JavaScript you need. one example. function FormSubmit() { var textfield = Information.TextField.value; var url = "./processForm.php?textfield=" + textfield; window.open(url); } OR just add this to your form tag. TARGET="_blank" "Thomas Edison Jr." <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > Glory, > > > Attach a javascript event to the submit button > > Something like : > > > > Wherein wow() defines a the window.open function? > > > and also attach the form values to the url. > How do i do this? Because the 3 or 4 form fields i > have, which are Hidden Fields, contain values coming > in from $myrow[stuff], that is, coming in from a > Database Table. How do i define these values up in the > Javascript function in the of the file? > > Thanks, > T. Edison Jr. > > > > __ > Do You Yahoo!? > Sign up for SBC Yahoo! Dial - First Month Free > http://sbc.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Submitting form in new window!
Glory, > Attach a javascript event to the submit button Something like : Wherein wow() defines a the window.open function? > and also attach the form values to the url. How do i do this? Because the 3 or 4 form fields i have, which are Hidden Fields, contain values coming in from $myrow[stuff], that is, coming in from a Database Table. How do i define these values up in the Javascript function in the of the file? Thanks, T. Edison Jr. __ Do You Yahoo!? Sign up for SBC Yahoo! Dial - First Month Free http://sbc.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Submitting form in new window!
Thomas, Yes, I understand what you want to do, but this is a limitation of HTML itself, rather than PHP. There are no HTML commands for doing this. JavaScript, being client side, has much more control over the browser and can define window size etc. If, on your submit button, you use the onClick event to submit the form, then the only way to pass the data is by making up a GET string in the url. At least, I have not found a way around this. The above solution is what I use. This assumes the client browser has JS turned on too, which in my case (on an intranet application) I can specify. HTH Chris Thomas Edison Jr. wrote: >type=\"submit\" value=\"Add To Cart\"> > > >This is the SUBMIT button that submits the form >alongwith the Form Variables to a file called >"Add2Cart.php" !! But this file simply opens in an >unadministered new window. > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Submitting form in new window!
On Tuesday 09 July 2002 19:25, Thomas Edison Jr. wrote: > Hi, > > Ok, let me show some code : > >method=post target=\"blank\"> > > $result[vProID] > > $result[vProName] > >Quantity > type=\"submit\" value=\"Add To Cart\"> > > > This is the SUBMIT button that submits the form > alongwith the Form Variables to a file called > "Add2Cart.php" !! But this file simply opens in an > unadministered new window. > > i would like to use the window.open function, or > whatever can accomplish this, to restrict parameters > of the window in which add2cart.php opens, at the same > time the variables of my form should get submitted > into the add2cart.php Attach a javascript event to the submit button such that on submit opens up a window with your required specs. Then set the url of that window to point to add2cart.php, and also attach the form values to the url. -- Jason Wong -> Gremlins Associates -> www.gremlins.com.hk Open Source Software Systems Integrators * Web Design & Hosting * Internet & Intranet Applications Development * /* People need good lies. There are too many bad ones. -- Bokonon, "Cat's Cradle" by Kurt Vonnegut, Jr. */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Submitting form in new window!
Hi, Ok, let me show some code : Quantity This is the SUBMIT button that submits the form alongwith the Form Variables to a file called "Add2Cart.php" !! But this file simply opens in an unadministered new window. i would like to use the window.open function, or whatever can accomplish this, to restrict parameters of the window in which add2cart.php opens, at the same time the variables of my form should get submitted into the add2cart.php T. Edison Jr. __ Do You Yahoo!? Sign up for SBC Yahoo! Dial - First Month Free http://sbc.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Submitting form in new window!
Thomas, If using JavaScript to open the window, then php is not going to be able to transfer variables as it is not being used. As you form is not being submitted (you intercepted it with a JavaScript call, right?) then you need to transfer them manually by getting the JavaScript to add the variables to the end of the url as GET data. If I have this wrong (and I've had to make some assumptions) then please show us some code. HTH Chris Thomas Edison Jr. wrote: >Hi, > >When i press the Submit button, i would like it to >open in a new Javascript Windows with well-defined >characteristics like size, width etc. > >I create a window.open function and gave the name of >my PHP page .. but the Form Variables are not passing >into it.. > >Thanks, >T. Edison Jr. > > > >= >Rahul S. Johari (Director) >** >Abraxas Technologies Inc. >Homepage : http://www.abraxastech.com >Email : [EMAIL PROTECTED] >Tel : 91-4546512/4522124 >*** > >__ >Do You Yahoo!? >Sign up for SBC Yahoo! Dial - First Month Free >http://sbc.yahoo.com > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php