Simple CGI question
Hello, I'm trying to redirect the output of my CGI (written in Perl) to another frame, but I'm not exactly sure how to do this. i.e. I have two frames on my page one on the right and one on the left. There is a form on the right frame. When the user clicks on the Submit button on my form, I'd like to call a CGI script and redirect its output to the left frame. Could anyone please tell me how I can do this? Any help would be greatly appreciated. Thanks, Jack __ Post your free ad now! http://personals.yahoo.ca -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Simple CGI question
Jack wrote: Hello, I'm trying to redirect the output of my CGI (written in Perl) to another frame, but I'm not exactly sure how to do this. i.e. I have two frames on my page one on the right and one on the left. There is a form on the right frame. When the user clicks on the Submit button on my form, I'd like to call a CGI script and redirect its output to the left frame. Could anyone please tell me how I can do this? In the right frame, put this: ... input type=button value='Submit' onClick='top.frames.leftframe.document.location.href = \yourscriptlocation.pl\' substituting 'leftframe' for the name of the left frame and 'yourscriptlocation.pl' for the URL of your script. -- Andrew Gaffney -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Simple CGI question
On Thursday, Nov 6, 2003, at 16:42 US/Pacific, Andrew Gaffney wrote: Jack wrote: [..] When the user clicks on the Submit button on my form, I'd like to call a CGI script and redirect its output to the left frame. Could anyone please tell me how I can do this? In the right frame, put this: ... input type=button value='Submit' onClick='top.frames.leftframe.document.location.href = \yourscriptlocation.pl\' substituting 'leftframe' for the name of the left frame and 'yourscriptlocation.pl' for the URL of your script. neet solution there, I hadn't thought about arming the 'onClick'. but why not have the form line simple sort it out for him? eg: form name=myform method=post action=myCGI.cgi target=leftFrame /form my assumption is that the 'frames' were set up with something like: html frameset cols=100,* frame name=leftFrame src=defaultLeftFrame.html frame name=rightFrame src=myCoolRightFrameCode.cgi /frameset /html ciao drieux --- -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Simple CGI question
drieux wrote: On Thursday, Nov 6, 2003, at 16:42 US/Pacific, Andrew Gaffney wrote: Jack wrote: [..] When the user clicks on the Submit button on my form, I'd like to call a CGI script and redirect its output to the left frame. Could anyone please tell me how I can do this? In the right frame, put this: ... input type=button value='Submit' onClick='top.frames.leftframe.document.location.href = \yourscriptlocation.pl\' substituting 'leftframe' for the name of the left frame and 'yourscriptlocation.pl' for the URL of your script. neet solution there, I hadn't thought about arming the 'onClick'. but why not have the form line simple sort it out for him? eg: form name=myform method=post action=myCGI.cgi target=leftFrame /form I would have suggested this over my previous solution if I had known you could use the TARGET attribute in a FORM tag. -- Andrew Gaffney -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Simple CGI Question
In my perl CGI script, I'm trying to extract the PID that corresponds to it. How do I do this? I'm also trying to extract the timestamp. How come it's not possible to do something like: print HTMLBODY; print `time`; print /BODY/HTML; read `perldoc perlvar` You will find the following entry answers your question. $PID $$ The process number of the Perl running this script. You should consider this variable read-only, although it will be altered across fork() calls. (Mnemonic: same as shells.) As for the time, try $time = localtime(time); print $time; It's a built-in function. HINT: `perdoc -f time` `perl -f localtime` -- = Shaun Fryer = http://sourcery.ca/ ph: 905-529-0591 = Science is like sex: occasionally something useful comes out of it, but that's not why we do it. -: Richard Feynmann pgp0.pgp Description: PGP signature
Re: Simple CGI Question
HINT: `perdoc -f time` `perl -f localtime` Sorry, the above should read... HINT: `perldoc -f time` `perldoc -f localtime` -- = Shaun Fryer = http://sourcery.ca/ ph: 905-529-0591 = Science is like sex: occasionally something useful comes out of it, but that's not why we do it. -: Richard Feynmann pgp0.pgp Description: PGP signature
Simple CGI Question
Hello, In my perl CGI script, I'm trying to extract the PID that corresponds to it. How do I do this? I'm also trying to extract the timestamp. How come it's not possible to do something like: print HTMLBODY; print `time`; print /BODY/HTML; Any help would be greatly appreciated, Jack __ Post your free ad now! http://personals.yahoo.ca -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Re: Simple CGI Question
Yes, I would agree, You'll find with just a little practice, you can write you own code and scripts easier, faster, and most times, more efficient for what you need. -Original Message- From: Randal L. Schwartz[EMAIL PROTECTED] To: [EMAIL PROTECTED], Geoff Ball[EMAIL PROTECTED] Date: Sat Sep 29 15:25:49 PDT 2001 Subject: Re: Simple CGI Question Geoff == Geoff Ball [EMAIL PROTECTED] writes: Geoff I have a very basic question. At webmonkey.com I found a CGI Tutorial, I'd stay away from that tutorial. You're writing code that doesn't start use CGI. That's making you do a lot of things the very hard way. Can you described in English what you actually want to do, and maybe some of us can point you at the things that might help? -- Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095 [EMAIL PROTECTED] URL:http://www.stonehenge.com/merlyn/ Perl/Unix/security consulting, Technical writing, Comedy, etc. etc. See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training! -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] ____ | _ ) ___ ___ | | | _ \/ _ \/ _ \|_| |___/\___/\___/(_) ___ GO.com Mail Get Your Free, Private E-mail at http://mail.go.com -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]