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

I know You've seen it B4 1

Status
Not open for further replies.

JrClown

Technical User
Oct 18, 2000
393
US
Hi all..
I came across (can't remember where, grrr) a site where I fill out a form and when it came to filling out the date field, there was a calculator image next to it. I clicked it and a calculator (in asp I think) popped up allowing me to choose any date, and the date chosen was applied to the form field.

Whould someone here know how this is done? and or where I can read or see one in action?
Thanks "The most important ingredient in the formula of success is knowing how to get along with people"
<%
Jr Clown
%>
 
This &quot;calculator&quot; chooses dates??? I could tell you how to send a variable from a pop-up window back to its opener, if that is what you are asking, but I have a sneaking suspicion I don't fully understand your question.

I guess the whole calculator (which I associate with adding and subtracting numbers) and dates (which I associate with a calendar) is throwing me off here.

please clarify.

:)
Paul Prewett
 
I'm sorry bro. I'm a complete MORON LOL
it's a pop-up calendar not a *&^%$#@! calculator. &quot;The most important ingredient in the formula of success is knowing how to get along with people&quot;
<%
Jr Clown
%>
 
LOL

Ok, then. I was wondering. ;-)

Here's a simple example I made up for a guy a few days ago on how to send a variable back to the opener. I'll put it in a javascript FAQ later today.

------------------

If you have a parent-child relationship between the two browsers, it's fairly simple. Here's an example:

browser a page:
<html>
<head>
<title>Test</title>
<script language=&quot;javascript&quot;>
function openMe(){
var x = window.open('newOne.htm', 'newWindow', 'height=300,width=300');
}
</script>
</head>
<body>
<form name=theForm>
<INPUT type=button value=&quot;Open It&quot; name=submit1 onClick=&quot;openMe();&quot;>
<input type=text name=theBox>
</form>
</body>
</html>


browser b page:
<html>
<head>
<title>testing</title>
<script language=javascript>
function setOther(){
window.opener.theForm.theBox.value = document.myForm.thisBox.value;
}
</script>
</head>
<body>
<form name=myForm>
<input type=text name=thisBox>
<input type=button value=&quot;Click Me&quot; onClick=&quot;setOther();&quot;>
</form>
</body>
</html>


Now all that does is when you click the button, it opens up the new page in a pop up window, and when you type something in the text box in the pop up, and push that button, it assigns that value back to the text box on the original page. From this example, though, it's easy to see how to communicate between the two windows.

--------------------

Now all you'd need to do, my friend, would be to construct your calendar and each day would be a link, which would call a javascript function, sending it a value corresponding to the day they clicked... then your function would return that value to the opener and then close the popup.

Let me know if this helps out. :)
 
and for the millionth time bro. TYVVM
;-) &quot;The most important ingredient in the formula of success is knowing how to get along with people&quot;
<%
Jr Clown
%>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top