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 Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Pick Up Value Of VB.Net textbox and Open New Window 1

Status
Not open for further replies.

decobrien

Programmer
Joined
Jul 22, 2005
Messages
2
Location
IE
Hi, I have a calendar form (PopUpCal.aspx) that I want to appear in a popup browser window. When I select a date from the calendar control, it returns the value to the textbox.
All is fine with this but if the textbox already has a date, I want the calendar to show with this date selected: therefore I need to pick up the value of the textbox (if it already has a value).
The code currently on my image that opens the pop-up is as follows:

<A onclick="window.open('PopupCal.aspx?textbox=tDate1','cal','width=205,height=185,left=270,top=180')" href="javascript:;">

the value tDate1 is the textbox where the value will be returned. It is picked up in teh vb.net code using Request.QueryString("textbox").ToString
I presume what I need is to call a javascript function that would give a string result of "DateValue = (the date in the textbox)". How do I do this in java?? I can use a HTML input rather than .net textbox if thats any easier.
ANy help would be greatly appreciated. THanks.
Dec.
 
Like this?
Code:
<A onclick="window.open('PopupCal.aspx?textbox=tDate1[b]&DateValue='+document.formName.tDate1.value[/b],'cal','width=205,height=185,left=270,top=180');return false" href="#">

Adam
 
Spot on, works perfectly. Thanks again.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top