473,587 Members | 2,509 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 5804
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.as px?qty=' +
document.all['txtQty'].value);">Show Calendar</a>

Use Request.QuertSt ring["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)re turn true;
var href;
if (typeof(mylink) == 'string')
href=mylink;
else
href=mylink.hre f;
window.open(hre f, windowname, 'width=300,heig ht=350, top=0, left=0,
scrollbars=yes, resizable=yes') ;
return false;
}

I have a hyperlink, <asp:HyperLin k 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.NavigateU rl = "calendar.aspx? comp=" + RealComp +
"&FormName=fmAd d&CtrlName=txtD ate&qty="

I tried hlCal.NavigateU rl = "calendar.aspx? comp=" + RealComp +
"&FormName=fmAd d&CtrlName=txtD ate&qty=documen t.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.as px?qty=' +
document.all['txtQty'].value);">Show Calendar</a>

Use Request.QuertSt ring["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)re turn true;
var href;
if (typeof(mylink) == 'string')
href=mylink;
else
href=mylink.hre f;
window.open(hre f, windowname, 'width=300,heig ht=350, top=0, left=0,
scrollbars=yes, resizable=yes') ;
return false;
}

I have a hyperlink, <asp:HyperLin k 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.NavigateU rl = "calendar.aspx? comp=" + RealComp +
"&FormName=fmAd d&CtrlName=txtD ate&qty="

I tried hlCal.NavigateU rl = "calendar.aspx? comp=" + RealComp +
"&FormName=fmAd d&CtrlName=txtD ate&qty=documen t.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.as px?qty=' +
document.all['txtQty'].value);">Show Calendar</a>

Use Request.QuertSt ring["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.QuerySt ring["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****@discuss ions.microsoft. com> wrote in message
news:3A******** *************** ***********@mic rosoft.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)re turn true;
var href;
if (typeof(mylink) == 'string')
href=mylink;
else
href=mylink.hre f;
window.open(hre f, windowname, 'width=300,heig ht=350, top=0, left=0,
scrollbars=yes, resizable=yes') ;
return false;
}

I have a hyperlink, <asp:HyperLin k 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.NavigateU rl = "calendar.aspx? comp=" + RealComp +
"&FormName=fmAd d&CtrlName=txtD ate&qty="

I tried hlCal.NavigateU rl = "calendar.aspx? comp=" + RealComp +
"&FormName=fmAd d&CtrlName=txtD ate&qty=documen t.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.as px?qty=' +
document.all['txtQty'].value);">Show Calendar</a>

Use Request.QuertSt ring["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
4876
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
484
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 a url. I have created an rtf file using WordPad that includes the hyperlink text as I want it to appear, but when I load the file into the rtf control, the link is messed up. It now appears as: "Images </imghp?hl=en&tab=wi&ie=UTF-8&oe=UTF-8>"....
2
5363
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 brings up this website? I know about link labels etc but in this case this is a contact form which is used to view and update information so if it would be a link label the user wouldn't be able to enter the hyperlink in the first
3
2645
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 a textbox so i can get the right string to add to the link above.. How can i force textbox to refresh? Any ideas?
0
1455
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
2777
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 might be a neat way to solve this, but I am new to them. Can anyone give me a hint here? The catch is, it must only find tokens that are not quoted and not commented; examples follow
1
15160
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 is available on the resulting popup Shortcut Menu form. I am developing a form that uses unbound textboxes, and I need to include a textbox that will contain a hyperlink. How do I get an unbound textbox to act like a textbox that is bound to a...
2
5857
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 place...can anyone help me?? i didnt made anything in the VALUES (unless the POST ), because i bet the error is there (yes, the arrays are missing): $sql = "INSERT INTO dgplanets ( ID, coords , player name , alliance , name , ground , orbit ,...
2
3260
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 no problem.. i'm getting it easily.. But my problem is , if i select some text from the textbox2 and click the button it is also hyperlinked. i want only whatever text selected in the textbox1 to be hyperlnked and not in textbox2. Please tell me how...
0
7923
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
7852
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8216
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
7974
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8221
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
6629
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
3845
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
2364
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
0
1192
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.