473,384 Members | 1,854 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,384 software developers and data experts.

Parsing Textbox Value Through Hyperlink

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.
Nov 19 '05 #1
4 5760
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?
"wrytat" wrote:
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.

Nov 19 '05 #2
Thank you.

This is how i did it, i have a javascript for popping up the calendar.

function popupcal(mylink, windowname)
{
if (! window.focus)return true;
var href;
if (typeof(mylink) == 'string')
href=mylink;
else
href=mylink.href;
window.open(href, windowname, 'width=300,height=350, top=0, left=0,
scrollbars=yes,resizable=yes');
return false;
}

I have a hyperlink, <asp:HyperLink id="hlCal" onclick="return popupcal(this,
'calendar')" runat="server"></asp:HyperLink>, that's for the calendar.

In part of my .aspx codes, I defined the hyperlink's navigate url as,
hlCal.NavigateUrl = "calendar.aspx?comp=" + RealComp +
"&FormName=fmAdd&CtrlName=txtDate&qty="

I tried hlCal.NavigateUrl = "calendar.aspx?comp=" + RealComp +
"&FormName=fmAdd&CtrlName=txtDate&qty=document .all['txtQty'].value);" but it
doesn't work. What can I do?

"Siva M" wrote:
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?
"wrytat" wrote:
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.

Nov 19 '05 #3
Just to add on,

I need to get the Request Quantity in the popup calendar for the PageLoad
and DayRender codes, to determine which dates can be selected and which
cannot. My calendar is an <asp:Calendar>

Thank you.

"wrytat" wrote:
Thank you.

This is how i did it, i have a javascript for popping up the calendar.

function popupcal(mylink, windowname)
{
if (! window.focus)return true;
var href;
if (typeof(mylink) == 'string')
href=mylink;
else
href=mylink.href;
window.open(href, windowname, 'width=300,height=350, top=0, left=0,
scrollbars=yes,resizable=yes');
return false;
}

I have a hyperlink, <asp:HyperLink id="hlCal" onclick="return popupcal(this,
'calendar')" runat="server"></asp:HyperLink>, that's for the calendar.

In part of my .aspx codes, I defined the hyperlink's navigate url as,
hlCal.NavigateUrl = "calendar.aspx?comp=" + RealComp +
"&FormName=fmAdd&CtrlName=txtDate&qty="

I tried hlCal.NavigateUrl = "calendar.aspx?comp=" + RealComp +
"&FormName=fmAdd&CtrlName=txtDate&qty=document .all['txtQty'].value);" but it
doesn't work. What can I do?

"Siva M" wrote:
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?
"wrytat" wrote:
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.

Nov 19 '05 #4
In the JS funtion popupcal(), have

href = "calendar.aspx?Qty=" + document.all['<%= txtQty.ClientID %>'].value;
// Append more query strings if required

before calling window.open(). You can then fetch the quantity as
Request.QueryString["txtQty"] (C#) in calendar.aspx (Page load and other
subsequent methods) should get you the quantity text box value.

No need to set NavigateUrl in the code-behind.
"wrytat" <wr****@discussions.microsoft.com> wrote in message
news:3A**********************************@microsof t.com...
Thank you.

This is how i did it, i have a javascript for popping up the calendar.

function popupcal(mylink, windowname)
{
if (! window.focus)return true;
var href;
if (typeof(mylink) == 'string')
href=mylink;
else
href=mylink.href;
window.open(href, windowname, 'width=300,height=350, top=0, left=0,
scrollbars=yes,resizable=yes');
return false;
}

I have a hyperlink, <asp:HyperLink id="hlCal" onclick="return popupcal(this,
'calendar')" runat="server"></asp:HyperLink>, that's for the calendar.

In part of my .aspx codes, I defined the hyperlink's navigate url as,
hlCal.NavigateUrl = "calendar.aspx?comp=" + RealComp +
"&FormName=fmAdd&CtrlName=txtDate&qty="

I tried hlCal.NavigateUrl = "calendar.aspx?comp=" + RealComp +
"&FormName=fmAdd&CtrlName=txtDate&qty=document .all['txtQty'].value);" but it
doesn't work. What can I do?

"Siva M" wrote:
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?
"wrytat" wrote:
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.

Nov 19 '05 #5

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

Similar topics

3
by: hermawih | last post by:
Please help . I want to load the contents of another rtf document by double-clicking the words . Chapter1.rtf Chapter2.rtf Chapter3.rtf ....
0
by: MisterX | last post by:
Hi, I am looking for help in displaying a hyperlink in the rtf textbox control. The .DetectUrls property will cause standard urls (http://) to become a link, but the text I want as a link is not...
2
by: theintrepidfox | last post by:
Dear Group Simple question or maybe not. I have a text box that contains a hyperlink e.g. http://www.mysite.com. Is it possible to get that hyperlink to work so when a user clicks on it it...
3
by: Patrick Olurotimi Ige | last post by:
I have a hyperlink below:- <asp:HyperLink ID="Hyperlink2"NavigateUrl='<%#"AddToCart.aspx?productID=" & DataBinder.Eval(Container, "DataItem.ProductID") >Add</asp:HyperLink> And i want to force...
0
by: Reena | last post by:
Hi, Working with ASP.NET 2.0 with Masterpages. Here is my datagrid... <asp:DataGrid ID="dgSelectedFields" runat="server" BorderStyle=None GridLines="None" CssClass="grdData"
17
by: Mark | last post by:
I must create a routine that finds tokens in small, arbitrary VB code snippets. For example, it might have to find all occurrences of {Formula} I was thinking that using regular expressions...
1
by: dpark29 | last post by:
Access 2000 - If a textbox control is bound to a hyperlink field in an Access database table, the textbox appears formatted as hyperlink and when the user right-clicks the field, the Hyperlink option...
2
by: blitzztriger | last post by:
Hello!! how do i insert values into mysql , after parsing a submiting textbox?? I made the arrays, so this should be a basic insertion of them in the db, but something is missing, or in the wrong...
2
by: s2008 | last post by:
Hello, In my page i have two textboxes and a html button. I'm using vb.net 2.0 . what i need is i want whatever text selected in the textbox1 to be hyperlinked when clicked the button... this is...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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...

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.