Parsing Textbox Value Through Hyperlink

G

Guest

I have a form with a textbox for the user to enter a quantity and another
textbox for the delivery date. I disabled this delivery date textbox such
that the user has to press a calendar link next to the textbox, then a
calendar will pop up for him to choose the date. The dates that the user can
pick depends a lot on the quantity that he enters in the quantity field.

Is there any way that I can parse the quantity field to the calendar page
when the user press the calendar link? I am using a asp hyperlink, instead of
a button, because if I use a button, I'll have 2 buttons on the same form,
the calendar button and a submit button. As a result, (I don't understand
why), when the user click on the calendar button, the program will do some
client side verification for the data entered and the calendar will never
show. And I also don't know how to let the calendar page to pop out by
initiating from a button.

Can someone help me? Thank you.
 
G

Guest

Hi,

How have you implemented the popup calendar page? Is it an .aspx page or
just a plain HTML file with DHTML/JS calendar? In the former case, you can
use query string to pass the quantity value to the aspx page like this:

// Assuming txtQty is the name/ID of the Quantity text box
<a href="#' onclick="window.open('popup.aspx?qty=' +
document.all['txtQty'].value);">Show Calendar</a>

Use Request.QuertString["qty"] in the popup.aspx to grap the quantity.

If you use a static HTML, use opener.document.all['txtQty'].value in the
popup window to get the quantity value.

Hope this helps?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,581
Members
45,057
Latest member
KetoBeezACVGummies

Latest Threads

Top