#1 (permalink)  
Old 05-05-2006, 09:58 PM
NevadaSam's Avatar
Registered User
 
Join Date: Apr 2006
Posts: 20
Jump to a sub Function from a link????

Jump to a sub Function from a link????

http://mysite.com/cgi-bin/myscript.cgi (Jump to sub function)

Is there a way this can be done (either from a link, a JavaScript or the address window) that you can perform a desired user defined function within a subscript. I am using the

if ($ENV{'REQUEST_METHOD'} eq "POST")

method in the script to have it to perform two functions already depending on if a "submit" button was clicked in a form or if a direct link to the cgi scrip was clicked. Is there a way to have more control of which function the script will perform from outside the script.

Thanks for any replies.
Samantha
Reply With Quote

  #2 (permalink)  
Old 05-08-2006, 10:24 AM
curtiss's Avatar
Moderator
 
Join Date: May 2003
Posts: 1,437
Sure, add query strings to the end of your links (myscript.cgi?action=foobar), and use the GET method to retrieve the query string. Then, you can call a subroutine based on the "action" (or whatever you call your query string) within the GET routine.
__________________
I hate Internet Explorer! Anyone with me?
Reply With Quote
  #3 (permalink)  
Old 05-08-2006, 11:37 AM
NevadaSam's Avatar
Registered User
 
Join Date: Apr 2006
Posts: 20
Thanks, that is what I learnt to use.

Samantha
Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
showLayer function, layer position problem ruthann Programming and Scripting 3 03-19-2006 11:13 AM
How do I highlight a split function text? gilgalbiblewhee Programming and Scripting 7 01-31-2006 05:12 PM
How to create a PHP "Top Ten" link list? Leprakawn Programming and Scripting 1 01-20-2006 09:19 AM
Form and javascript function help - illiterate on this ruthann Programming and Scripting 1 09-11-2005 10:52 AM
multiple o/ps using link swapnil Programming and Scripting 0 07-27-2005 04:40 AM


All times are GMT -5. The time now is 07:07 AM.

 
Bitrix
Clicky Web Analytics
CloudContacts
Maxtango


Subscribe to our feed | add to myYahoo!

Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.2.0
© 1997-2007 HTMLCenter