Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Array with JavaScript

Status
Not open for further replies.

QueenP

Programmer
Oct 22, 2002
16
BR
I have one page that searches for people. If you search them by the PK, it shows only one, but you can also search by city, part of the name, etc.

The problem I'm having is that if someone searches by anything but the PK, I can't retrieve the specific PK to send to the other page, which it doens't happen if I search by the PK.

Is there a way to solve that? I use JavaScript to send the data to the first page.

Thanks
 
If your query returns multiple records, display them and allow the user to select the records they want..

Do while not rs.eof
html = html &_
&quot;<a href='nextPage.asp?pk=&quot; & rs(&quot;pk&quot;) & &quot;'>&quot; &_
rs(&quot;nameField&quot;) & &quot;</a><br>&quot;
rs.movenext
loop Get the Best Answers! faq333-2924
&quot;A witty saying proves nothing.&quot; - Voltaire
mikewolf@tst-us.com
 
I have that already but it's not working. And I'm not sure I've explained myself taht clear.

There's the search box at the first page.

If you enter the code, a popup pops up, searches and then closes sending the info to the first page.

If you don't enter anything, the popup opens up, and there you can make the search. If you seach by city, it returns lots of data and you must choose one.

The problem is that I use a Session with the code value, and if you search by city, it the Session always gets the code of the last person and not the one you've selected.
 
just have the firstpage get the session vaiable from the querystring....

main.asp

<%
pk = request.queryString(&quot;pk&quot;)
if pk <> &quot;&quot; then session(&quot;pk&quot;) = pk
%> Get the Best Answers! faq333-2924
&quot;A witty saying proves nothing.&quot; - Voltaire
mikewolf@tst-us.com
 
The main problem is that the JavaScript sends the info back to the first page, and I couldn't find a way to save the right info on the Session inside the JavaScript.
 
Can you post some code so Ican see what you're talking about Get the Best Answers! faq333-2924
&quot;A witty saying proves nothing.&quot; - Voltaire
mikewolf@tst-us.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top