Manipulating form data

A

Alex Horan

Hell everyone, I have had a good hunt round google & groups.google but cannot find the answer, or a tutorial that will teach me the answer. I have the following situation:

I have a form that I want users to fill in. One of the items in the form is a drop down list. When users select an option from this list I want a couple of hidden values to be passed when the user clicks submit (the values change depending on what was picked). When the user clicks submit I want a new window to be opened with no link bar, button bar etc - just a popup window (with the values from the form passed to it.)

I can get the submit button to open a new window, but i cannot figure out how to set the proprties (button bar turned off etc) for that new window.

Also I cannot figure out how to set hidden values based on the choice made by the user.

If anyone can help with my two issues (or point me towards information about performing either of those tasks) I would really appreciate it!!

Thanks - Alex
 
M

Mark Fitzpatrick

Alex,
You're probably in for an interesting time. To open a popop with
values from another form, you'll need to pass the information to the new
page. When the submit button is pressed you'll have to assemble the data
into a querystring of variable - value pairs (just like what you see
appended to a url when you search google) and then append this to the URL
used for the pop-up. Now, how you handle the variables passed by the
querystring is another issue. You could possibly do this through JavaScript
on the client-side though I have not worked this way in ages and can't give
good advice on this. The web page being opened in the pop-up could also be a
server-side script, such as an ASP page, where you can easily get at the
querystring variables and dump them back. The choice though is more up to
you as it's a tad tricky to do. You may want to check some sites such as
javascript.internet.com and www.dynamicdrive.com for some sample scripts.

Hope this helps,
Mark Fitzpatrick
Microsoft MVP - FrontPage

Alex Horan said:
Hell everyone, I have had a good hunt round google & groups.google but
cannot find the answer, or a tutorial that will teach me the answer. I have
the following situation:
I have a form that I want users to fill in. One of the items in the form
is a drop down list. When users select an option from this list I want a
couple of hidden values to be passed when the user clicks submit (the values
change depending on what was picked). When the user clicks submit I want a
new window to be opened with no link bar, button bar etc - just a popup
window (with the values from the form passed to it.)
I can get the submit button to open a new window, but i cannot figure out
how to set the proprties (button bar turned off etc) for that new window.
Also I cannot figure out how to set hidden values based on the choice made by the user.

If anyone can help with my two issues (or point me towards information
about performing either of those tasks) I would really appreciate it!!
 
S

Stefan B Rusynko

For client side (JavaScript) form manipulation see
http://www.developer.irt.org/script/form.htm




| Alex,
| You're probably in for an interesting time. To open a popop with
| values from another form, you'll need to pass the information to the new
| page. When the submit button is pressed you'll have to assemble the data
| into a querystring of variable - value pairs (just like what you see
| appended to a url when you search google) and then append this to the URL
| used for the pop-up. Now, how you handle the variables passed by the
| querystring is another issue. You could possibly do this through JavaScript
| on the client-side though I have not worked this way in ages and can't give
| good advice on this. The web page being opened in the pop-up could also be a
| server-side script, such as an ASP page, where you can easily get at the
| querystring variables and dump them back. The choice though is more up to
| you as it's a tad tricky to do. You may want to check some sites such as
| javascript.internet.com and www.dynamicdrive.com for some sample scripts.
|
| Hope this helps,
| Mark Fitzpatrick
| Microsoft MVP - FrontPage
|
| | > Hell everyone, I have had a good hunt round google & groups.google but
| cannot find the answer, or a tutorial that will teach me the answer. I have
| the following situation:
| >
| > I have a form that I want users to fill in. One of the items in the form
| is a drop down list. When users select an option from this list I want a
| couple of hidden values to be passed when the user clicks submit (the values
| change depending on what was picked). When the user clicks submit I want a
| new window to be opened with no link bar, button bar etc - just a popup
| window (with the values from the form passed to it.)
| >
| > I can get the submit button to open a new window, but i cannot figure out
| how to set the proprties (button bar turned off etc) for that new window.
| >
| > Also I cannot figure out how to set hidden values based on the choice made
| by the user.
| >
| > If anyone can help with my two issues (or point me towards information
| about performing either of those tasks) I would really appreciate it!!
| >
| > Thanks - Alex
|
|
 
Top