CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
INDEX
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN

Home: Perl Programming Help: Intermediate:
script output to two different windows?

 



monocle
User

Jun 9, 2000, 8:05 AM

Post #1 of 4 (417 views)
script output to two different windows? Can't Post

Here is the deal. I need to submit a form to my script. Based on which of the submit buttons was pressed (ie. "preview" and "save") I need to either output to the origanal window or open another window for output. I found in an earlier post by Cure how to direct the script to output to a new window
<BLOCKQUOTE><font size="1" face="Arial,Helvetica,sans serif">code:</font><HR>

<form onSubmit="cureWindow=window.open('','newwindow','resizable=no,toolbar=no,scrollbars=yes,width=640,height=500')" action="$thiscgi" method="post" target="newwindow"></pre><HR></BLOCKQUOTE> and that works great but I only want to do that if the "preview" submit button is pressed. Other wise, if the "save" button is pressed, I need the script output to be returned to the calling window without opening the new window.

I hope this makes sense and I hope there is a solution. If anyone has any suggestions, please let me know.

Thank you for your time.

Monocle


perlkid
stranger

Jun 10, 2000, 4:20 AM

Post #2 of 4 (417 views)
Re: script output to two different windows? [In reply to] Can't Post

 
Monocle,

I've done this before and I made a separate form for each button. One was a popup and the other was targeted to _self.

perlkid


monocle
User

Jun 10, 2000, 9:43 PM

Post #3 of 4 (417 views)
Re: script output to two different windows? [In reply to] Can't Post

Perlkid,

Thanks for the input but I can't do seperate forms. They both need to submit the contents of a <textarea>.

I am trying to rewrite this "script" for a browser based HTML editor. The HTML is written in the <textarea>. I want the "preview" button to load the contents of the <textarea> into a pop-up window but I want the "save" button to just save the contents of the <textarea> with no pop-up.

I am determined to make this work only because I feel it will really inhance that feature of the site I'm putting together.

Thanks again,
Monocle


monocle
User

Jun 22, 2000, 9:57 AM

Post #4 of 4 (417 views)
Re: script output to two different windows? [In reply to] Can't Post

Just wanted to bring this question back to the top incase any one missed it. :cool:



------------------
Monocle
Hear great techno music by Monocle at http://www.mp3.com/monocle. CD now on sale!


 
 


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives