Passes variable when button is clicked...HELP!

Please support our ASP advertiser: $4.95 a Month - ASP.NET Web Hosting – Click Here!
Reply

Join Date: Aug 2005
Posts: 52
Reputation: spidey is an unknown quantity at this point 
Solved Threads: 0
spidey's Avatar
spidey spidey is offline Offline
Junior Poster in Training

Passes variable when button is clicked...HELP!

 
0
  #1
Sep 30th, 2005
I have a table displaying the list of vendors from the database.
I have to select one row (vendor details).

For VendorID:
------------------------Start---------------------
<table>
<tr>
<td>Name</td>
<td>Telephone</td>
<td>Email</td>
</tr>
<%do while not rs.eof%>
<tr>
<td onClick="HighLightTR('#cccccc','cc3333');"><input type="hidden" name="vendorid" value="<%=rs("VendorID")%>"><%=rs("Name")%></td>
<td><%=rs("Tel")%></td>
<td><%=rs("Email")%></td>
</tr>
<%rs.movenext
loop%>
</table>
--------------------------End-------------------------

The page also has the PropertyID which comes from the previous page.
For PropertyID:

-------------------------Start------------------------
<input type="hidden" name="propid"> value="<%=request.Form("propid")%>">
--------------------------End-------------------------

The [vendor] record selected is highlighted (i did not put the javascript script for highlighting in here). If the user click the button (below) or an image link, the 'PropertyID' and 'VendorID' will be passed on to the next page, then display the details of the vendor selected.

For button:
-------------------------Start-------------------------
<input type="button" value=" Select " onClick="onClick="window.location.href='select_owner_update.asp?propid=<%=ra("PropertyID")%>&vendorid=<%=rs("VendorID")%>';"">
--------------------------End--------------------------

Would that be possible? How? :-| Can somebody help me with this problem?

Have a nice day!

Lots of thanks,
Francis
Reply With Quote Quick reply to this message  
Join Date: Mar 2005
Posts: 131
Reputation: william_stam is an unknown quantity at this point 
Solved Threads: 2
william_stam's Avatar
william_stam william_stam is offline Offline
Junior Poster

Re: Passes variable when button is clicked...HELP!

 
0
  #2
Oct 18th, 2005
  1. <form id="form1" name="form1" method="get" action="next.asp">
  2. <select name="vendor" id="vendor">
  3. <option value="1">vendor1</option>
  4. <option value="2">vendor2</option>
  5. <option value="3">vendor3</option>
  6. <option value="4">vendor4</option>
  7. <option value="5">vendor5</option>
  8. </select>
  9. <input type="submit" name="Submit" value="Submit" />
  10. </form>

then on your contact page have a recordset retrieve the values from the dbase using response.querystring("vendor") the above code sends the vale to the option in a querystring
Reply With Quote Quick reply to this message  
Join Date: Aug 2005
Posts: 52
Reputation: spidey is an unknown quantity at this point 
Solved Threads: 0
spidey's Avatar
spidey spidey is offline Offline
Junior Poster in Training

Re: Passes variable when button is clicked...HELP!

 
0
  #3
Oct 18th, 2005
wud it be possible if i use table not a dropdown list? :rolleyes:

thanks.
Reply With Quote Quick reply to this message  
Join Date: Jun 2009
Posts: 14
Reputation: missbeginner is an unknown quantity at this point 
Solved Threads: 0
missbeginner missbeginner is offline Offline
Newbie Poster

Re: Passes variable when button is clicked...HELP!

 
0
  #4
Jul 2nd, 2009
hey there i have the same problem with you. please let me know if yours has already solved. thanks!
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the ASP Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC