Link to call a function

This is a discussion on "Link to call a function" within the Classic ASP section. This forum, and the thread "Link to call a function are both part of the Program Your Website category.



Go Back   Webforumz.com > Main Forums > Program Your Website > Classic ASP

Notices


Reply
 
LinkBack Thread Tools
  #1 (permalink)  
Old Nov 18th, 2005, 17:02
Junior Member
Join Date: Nov 2005
Age: 25
Posts: 13
Thanks: 0
Thanked 0 Times in 0 Posts
Link to call a function

I've got 3 functions and I want to put a link on the page so that when you click it one of the functions runs thus changing what the page looks like. how would i accomplish this? any help would be appreciated. thanks.
Reply With Quote

  #2 (permalink)  
Old Nov 18th, 2005, 19:20
Rob's Avatar
Rob Rob is offline
Head Admin & CEO

SuperMember
Join Date: Jul 2003
Location: at my desk
Age: 34
Posts: 2,952
Blog Entries: 7
Thanks: 7
Thanked 4 Times in 4 Posts
Send a message via MSN to Rob Send a message via Skype™ to Rob
Re: Link to call a function

basically you need to have the link point back to the same page with a querystring such as, eg: mypage.asp?do=myfunc

In your asp you can check the variable and act accordingly:-
Code: Select all
If request.querystring("do") = "myfunc" Then
    'call your function in here
end if
Hope that makes sense.

If you need further help, then please post your code here (using [code][/code] tags)
__________________
Rob - SEO Specialist
Owner & Founder of Webforumz.com

I am currently unavailable for private work
Reply With Quote
  #3 (permalink)  
Old Dec 1st, 2005, 09:59
New Member
Join Date: Nov 2005
Age: 30
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Link to call a function

You cannot call a server side function directly from a link.
Send some parameter to page and call the function conditionally.

[Edit: spam links removed]

Last edited by Rob; Dec 1st, 2005 at 15:06.
Reply With Quote
  #4 (permalink)  
Old Dec 1st, 2005, 10:03
Rob's Avatar
Rob Rob is offline
Head Admin & CEO

SuperMember
Join Date: Jul 2003
Location: at my desk
Age: 34
Posts: 2,952
Blog Entries: 7
Thanks: 7
Thanked 4 Times in 4 Posts
Send a message via MSN to Rob Send a message via Skype™ to Rob
Re: Link to call a function

Quote:
Originally Posted by hostndomain
You cannot call a server side function directly from a link.
I completely disagree. What is that in the post above yours then?
__________________
Rob - SEO Specialist
Owner & Founder of Webforumz.com

I am currently unavailable for private work
Reply With Quote
Reply

Tags
link, call, function

Thread Tools

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

Similar Threads
Thread Thread Starter Forum Replies Last Post
How to call a javascriprt function from a contentplaceholder Graeme36 ASP.NET Forum 0 Oct 14th, 2007 13:53
call php function in image url csun PHP Forum 16 Aug 19th, 2007 18:49
call php function in different database csun PHP Forum 1 Aug 8th, 2007 07:17
call check if user function exist csun PHP Forum 2 Jul 17th, 2007 06:14
AJAX call function melvinoyh JavaScript Forum 2 May 31st, 2006 01:02


All times are GMT. The time now is 21:02.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC8
© 2003-2008 Webforumz.com : All Rights Reserved

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43