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

Calendar values from pop-up to main window 1

Status
Not open for further replies.

Jodarcy

Programmer
Joined
Jan 22, 2002
Messages
4
Location
BM
Hello,

I'm trying to pass the date value from a Cold Fusion calendar in a pop-up window to a text box of the window that is calling it.

I'm sure there's a real easy fix, but I can't get it at the moment.

Any helpful hints? I'm stumped.

Thanks

Josie Underwood
 
We do something similar using a JavaScript calendar.

First our form has a name="myform" (or something similar) tag.

Next you have to have the field named in the form, we call ours date. Then we have a button that activates the pop-up JS for the calendar.

This is where it gets tricky, you have to specify the name of the form field that the calendar assigns the value to. AND you have to specify the name of the form that you are using - document.formname.fieldname

Here's a sample of our code:


<form method=&quot;post&quot; action=&quot;setdate.cfm&quot; name=&quot;myform&quot;>
<input type=&quot;text&quot; name=&quot;date&quot;>
<input name=&quot;cal&quot; type=&quot;button&quot; value=&quot;Calendar&quot; onClick=&quot;setDateField(document.myform.date); top.newWin = window.open('calendar.html')&quot;>
</form>


I can email you the JS and Html if you would like. Its free code we found on the web about a year ago.

Hope this helps!

Roger

 
Hi Roger,

Thanks for the speedy reply.

If you could email me the code that would be fantastic!

Thanks so much.

Josie
 
Opps... I need to give you my email address. It's josephine_underwood@infonet.com.

Thanks

Josie
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top