By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,695 Members | 1,638 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,695 IT Pros & Developers. It's quick & easy.

Transferring a A ID to ASP?

P: n/a
I have four links, and depending on which of those, I click, I want to
either increment or decrement a variable with some value. I have earlier
been told how to do that, but I was wondering, how I can check, in ASP
(if at all possible), which of the four links, I have clicked? I was
thinking about something like checking for the ID in the A element, but
I don't know if that's possible?

Michael K. P.
Jul 23 '05 #1
Share this Question
Share on Google+
4 Replies


P: n/a


Michael Kragh Pedersen wrote:
I have four links, and depending on which of those, I click, I want to
either increment or decrement a variable with some value. I have earlier
been told how to do that, but I was wondering, how I can check, in ASP
(if at all possible), which of the four links, I have clicked? I was
thinking about something like checking for the ID in the A element, but
I don't know if that's possible?


<a href="whatever.asp?increment=1&amp;id=link1">link 1</a>
<a href="whatever.asp?increment=1&amp;id=link2">link 2</a>
Then in whatever.asp check
Request.QueryString("id")

--

Martin Honnen
http://JavaScript.FAQTs.com/
Jul 23 '05 #2

P: n/a
Michael Kragh Pedersen wrote:
I have four links, and depending on which of those, I click, I want to
either increment or decrement a variable with some value. I have earlier
been told how to do that, but I was wondering, how I can check, in ASP
(if at all possible), which of the four links, I have clicked? I was
thinking about something like checking for the ID in the A element, but
I don't know if that's possible?


This is not a JavaScript question, it is offtopic here.
It has nothing to do with javascript.

Your question is ontopic in newsgroup
microsoft.public.inetserver.asp.general
or something similar.
But short answer is -
you write your hyperlinks in manner
http://www.yourserver.com/index.asp?whatlink=firstlink
http://www.yourserver.com/index.asp?whatlink=secondlink
....
http://www.yourserver.com/index.asp?whatlink=fourthlink

On the server side you extract the "whatlink" value, what is the ID, you
can name it basically whatever you want and make decision based on its
value what to do.

Please go to
microsoft.public.inetserver.asp.general
adn ask there, your possible future ASP questions are not ontopic here,
so it is wise for you to subscribe to that NG.
HTH
Jul 23 '05 #3

P: n/a
Marek Mänd wrote:
Michael Kragh Pedersen wrote:
I have four links, and depending on which of those, I click, I want to
either increment or decrement a variable with some value. I have
earlier been told how to do that, but I was wondering, how I can
check, in ASP (if at all possible), which of the four links, I have
clicked? I was thinking about something like checking for the ID in
the A element, but I don't know if that's possible?

This is not a JavaScript question, it is offtopic here.
It has nothing to do with javascript.

Your question is ontopic in newsgroup
microsoft.public.inetserver.asp.general
or something similar.
But short answer is -
you write your hyperlinks in manner
http://www.yourserver.com/index.asp?whatlink=firstlink
http://www.yourserver.com/index.asp?whatlink=secondlink
...
http://www.yourserver.com/index.asp?whatlink=fourthlink

On the server side you extract the "whatlink" value, what is the ID, you
can name it basically whatever you want and make decision based on its
value what to do.

Please go to
microsoft.public.inetserver.asp.general
adn ask there, your possible future ASP questions are not ontopic here,
so it is wise for you to subscribe to that NG.
HTH

Sheesh, of course, it is for this newsgroup, I figured, it would have to
be done in JavaScript, why else would I write it here?

Anyway, the problem is, (which I forgot to write unfortunately), that I
don't really want to transfer with the URL, but in some other way, if
possible.

Michael K. P.
Jul 23 '05 #4

P: n/a
Lee
Michael Kragh Pedersen said:

Marek Mänd wrote:
Michael Kragh Pedersen wrote:
I have four links, and depending on which of those, I click, I want to
either increment or decrement a variable with some value. I have
earlier been told how to do that, but I was wondering, how I can
check, in ASP (if at all possible), which of the four links, I have
clicked? I was thinking about something like checking for the ID in
the A element, but I don't know if that's possible?

This is not a JavaScript question, it is offtopic here.
It has nothing to do with javascript.

Your question is ontopic in newsgroup
microsoft.public.inetserver.asp.general
or something similar.
But short answer is -
you write your hyperlinks in manner
http://www.yourserver.com/index.asp?whatlink=firstlink
http://www.yourserver.com/index.asp?whatlink=secondlink
...
http://www.yourserver.com/index.asp?whatlink=fourthlink

On the server side you extract the "whatlink" value, what is the ID, you
can name it basically whatever you want and make decision based on its
value what to do.

Please go to
microsoft.public.inetserver.asp.general
adn ask there, your possible future ASP questions are not ontopic here,
so it is wise for you to subscribe to that NG.
HTH

Sheesh, of course, it is for this newsgroup, I figured, it would have to
be done in JavaScript, why else would I write it here?

Anyway, the problem is, (which I forgot to write unfortunately), that I
don't really want to transfer with the URL, but in some other way, if
possible.


ASP code is executed on the server before the page is sent to the
browser. The only way to pass anything to ASP is by sending another
HTTP request. What you're asking for seems to be two-way real-time
communication between two systems that are never operating at the
same time.
to the server.

Jul 23 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.