473,397 Members | 1,949 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,397 software developers and data experts.

ASP problem, ideas needed ;-)


Hi all,

I'm pretty new at asp-coding, but I'm getting stuff to work.

I now have the problem that, after someone has made a query, returning,
say, 10 contacts (name/addresses in a simple table), I want the user to
be able to CLICK on one of the names in the list, and thus be
redirected to a new page where details about the selected user will be
available.

Now I've tried to create the last names as hyperlinks, which of course
works fine, but I now have the problem that the user is redirected to a
'details.asp'-page, but this way there is no way I can think of to find
out on which name the user has clicked.

Needless to say, I do not want to make a different asp-page for every
contact, but it has to be generated dynamically with the data in the
DB. But I want the user to click only once (not with radiobuttons or
post/get-buttons etc), on the name (or row) of the contact.

Any bright ideas? :-)

Feb 11 '06 #1
3 1157
Avlan wrote on 11 feb 2006 in microsoft.public.inetserver.asp.general:
I'm pretty new at asp-coding, but I'm getting stuff to work.

I now have the problem that, after someone has made a query, returning,
say, 10 contacts (name/addresses in a simple table), I want the user to
be able to CLICK on one of the names in the list, and thus be
redirected to a new page where details about the selected user will be
available.

Now I've tried to create the last names as hyperlinks, which of course
works fine, but I now have the problem that the user is redirected to a
'details.asp'-page, but this way there is no way I can think of to find
out on which name the user has clicked.

Needless to say, I do not want to make a different asp-page for every
contact, but it has to be generated dynamically with the data in the
DB. But I want the user to click only once (not with radiobuttons or
post/get-buttons etc), on the name (or row) of the contact.


This is mainly an clientside problem:

<tr><td onclick='redir(this)'>myLastName</td></tr>

<script type='text/javascript'> // clientside!
function redir(x){
location.href='details.asp?r='+escape(x.innerHTML)
}
</script>

Not tested

======== details.asp ==========

<%

r = request.querystring("r")
' ......

%>
--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
Feb 11 '06 #2
I would normally use (if there is one) a primary key to show the details,
just a bit cleaner :)

generate the hyperlink like:

<A HREF="details.asp?c=<%=clientId%>"><%=clientName%> </A>

then just do like Evertjan said:

c = request.querystring("c")

in details.asp

Simon

--
Evertjan.
"Avlan" <ba*******@gmail.com> wrote in message
news:11**********************@g43g2000cwa.googlegr oups.com...

Hi all,

I'm pretty new at asp-coding, but I'm getting stuff to work.

I now have the problem that, after someone has made a query, returning,
say, 10 contacts (name/addresses in a simple table), I want the user to
be able to CLICK on one of the names in the list, and thus be
redirected to a new page where details about the selected user will be
available.

Now I've tried to create the last names as hyperlinks, which of course
works fine, but I now have the problem that the user is redirected to a
'details.asp'-page, but this way there is no way I can think of to find
out on which name the user has clicked.

Needless to say, I do not want to make a different asp-page for every
contact, but it has to be generated dynamically with the data in the
DB. But I want the user to click only once (not with radiobuttons or
post/get-buttons etc), on the name (or row) of the contact.

Any bright ideas? :-)

Feb 11 '06 #3
Yeh the thought came to me too, adding the parameters in the redirect..
:-)

I just though that that was kind of a crude way to do it, and that
there would be some way to make a clickable link which (when clicked)
can send some info with the redirect, but apparently this is not
possible (or very hard)..

So thanks for the confirmation, apparently this is the way to go! It
works like a charm, so I'm happy anyway ;-)

Feb 12 '06 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

12
by: Richard Hanson | last post by:
Over the last few days, I reinstalled Win2kSP2 to a spare harddrive I had just swapped into my Fujitsu LifeBook P1120 (long story <wink>). Subsequently, I DL'ed the newest Python alpha (2.4a2), and...
2
by: Cherrish Vaidiyan | last post by:
Hello all, A warm Xmas greetings to all. I have a small problem with starting up the database. Here my strategy. I have installed Oracle 9i R 2 on Red Hat 9. i created two database on this...
2
by: Chris Bolus | last post by:
I'm a teacher using MS Access on an RMConnect 2.4 network. On some workstations both I and my students sometimes get an error message when attempting to insert a command button on a form which...
2
by: Betrock | last post by:
This is probably very simple, but I just can't see my way thru it..... Short version: keyed values(numeric)in a lookup table are stored in a main table. They are displayed as text values - the...
2
by: Steve Richfield | last post by:
My error handler works GREAT. However, VBA seems to have some bugs/features that are causing it fits. The little snippet that I put at the end of each routine looks like this: Error_Handler: If...
4
by: Daniel | last post by:
Hi All, I have question regarding to the read, and update the row in the table. for example: user A, read the row of data from the table. user B, read the row of data from the table as well....
4
by: Elmo Watson | last post by:
I have a DotNet Table (asp:Table) in that table, I have multiple rows and cells, of course - One table cell is designated for 'content' - I originally had just assigned a style inline with the...
20
by: Development - multi.art.studio | last post by:
Hello everyone, i just upgraded my old postgres-database from version 7.1 to 7.4.2. i dumped out my 7.1 database (with pg_dump from 7.1) as an sql-file with copy-commands and to one file using...
1
by: TheScullster | last post by:
Hi all Bit of an obscure one this, but hopefully someone will be able to help. 4 years ago we had a potentially catastrophic problem with our Access database. From memory it was written in...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.