Gossamer Forum
Home : Products : DBMan : Customization :

JS Window

Quote Reply
JS Window
Hi!

Does anyone know how to point a form submission to launch in a new window created through Javascript.

What I want to have is the form result appear in a poped up window with a specific size and other pre defined layout variables.

Sorry, its not really DB Man specific, but I would really appreciate your help on this one since I cant find this kind of script anywhere.

Thanks

Quote Reply
Re: JS Window In reply to
There are MANY examples on the web...

Here is an example:

http://web2.petfinder.org/...;preview=1&row=0

Click on E-mail this pet to a friend! link

(Basically, you could copy the javascript codes via the HTML Source in your browser.)

In addition, codes for pop-up windows can be found at:

http://www.javascript.com
http://www.javascripts.com

Also, there is a MOD for LINKS 2.0 for putting the RATE script in a pop-up window, which is linked in the Resources section of this site.

For DBMAN...

Basically, what you need to do is put the javascript:open window link codes in the sub html_record (or sub html_record_long routine if you have the SHORT/LONG DISPLAY MOD installed). Then you will need to put the javascript header codes in the sub html_view_success.

And you will most likely have to create a few other subs for the form and results in the pop-up window. I would NOT simply reference existing subs since you will need to provide an alternative access to the forms for those users who turn off javascript in their browsers (which is more than you think).

Regards,

Eliot Lee Wink
http://anthrotech.com/
Quote Reply
Re: JS Window In reply to
Thanks! That works perfect, and actually, all I need is the href line - I can put it all in there.

Now I only need I good way to detect if the user has JS turned on or not...... :)

Quote Reply
Re: JS Window In reply to
Feel free to download the following file:

http://bus.colorado.edu/...s/js/checkbrowser.js

OR visit http://www.w3.org and search for browser detection.

Regards,

Eliot Lee Wink
http://anthrotech.com/