[thelist] Form Results in Pop-Up Window?

jeff jeff at members.evolt.org
Thu Feb 8 04:33:32 CST 2001


bri,

:~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
: From: Sabrina Dent, Apperception Ltd.
:
: I have a form. The <form action="loads of stuff">
: carries lots of parameters to another server where
: the form results are actually delivered.
:
: However, I want to put this results page in a
: pop-up window on submit to make it look OK with
: the parameters available to me. I can't seem
: to do the pop-up thing.
:~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

makes perfect sense.  this is a good use for targeting a form submit into a
popup.

:~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
: (which I basically made up, my javascript
: skills being poo)...
:~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

we've all gotta start somewhere...

:~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
: <form
:  action="loads of stuff"
:  method="post"
:  nSubmit="openwin()
:  target=" x">
:~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

nSubmit should be onSubmit.

make sure the target value doesn't have any spaces in it.

request that the function you're calling from the onSubmit event handler
returns a boolean value, that way your entire function can run, making sure
the popup window is open, ready, and waiting, before the form actually
submits.

onSubmit="return openwin()"

:~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
: ...but I'm getting an error message saying
: it's expecting a ;
:~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

that's because you're missing the closing double quote on your onSubmit
event handler.

for a complete, working example, try this:

http://members.evolt.org/jeff/code/form_to_window/

good luck,

.jeff

name://jeff.howden
game://web.development
http://www.evolt.org/
mailto:jeff at members.evolt.org





More information about the thelist mailing list