?
Solved

Problem on switch between radioes

Posted on 2003-03-21
2
Medium Priority
?
173 Views
Last Modified: 2010-04-09
My page has two radio boxes and two input text boxes. I wrote a javascript method setTimeStamp() which checks the second radio when the user tries to input value in the text box. My problem is that when the user select the date from the popup Calendor, it will not switch to the second radio. Can someone help me to solve this problem? Thanks!

function setTimeStamp(){
     if(!document.searchForm.timeStamp[1].checked)
          document.searchForm.timeStamp[1].checked=true;
}


<INPUT type="radio" name="timeStamp" value="false" checked>
<B>All</B><BR>
<INPUT type="radio" name="timeStamp" value="true">
<B>From: </B>
<INPUT type="TEXT" name="startDate" maxlength=10 size=10 onfocus="setTimeStamp()">
<a href="javascript:popupCalendar();">
<IMG src="images/icon_cal.gif" border="0" name="cal1" alt="Click here to pick up the From timestamp." width="26" height="15"></A>
<B>To: </B>
<INPUT type="TEXT" name="endDate" maxlength=10 size=10 onfocus="setTimeStamp()">
<a href="javascript:popupCalendar();">
<IMG src="images/icon_cal.gif" border="0" name="cal2" alt="Click here to pick up the From timestamp." width="26" height="15"></A>
0
Comment
Question by:Amy01
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 7

Accepted Solution

by:
cubrovic earned 160 total points
ID: 8182069
You can just change

<a href="javascript:popupCalendar();">

to

<a href="javascript:popupCalendar();setTimeStamp()">

and i guess this is what you want to do

0
 

Author Comment

by:Amy01
ID: 8182556
Thanks! It works. Cool!!
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When it comes to write a Context Sensitive Help (an online help that is obtained from a specific point in state of software to provide help with that state) ,  first we need to make the file that contains all topics, which are given exclusive IDs. …
Originally, this post was published on Monitis Blog, you can check it here . In business circles, we sometimes hear that today is the “age of the customer.” And so it is. Thanks to the enormous advances over the past few years in consumer techno…
In this tutorial viewers will learn how add a scalable full-width header using CSS3. Create a new HTML document with an internal stylesheet. Set a tiled background.:  Create a new div and name it Header. Position it with position:absolute at the top…
In this tutorial viewers will learn how to style transparent/translucent elements using alpha transparency in CSS Start with a normal styled element, such as a div.: Define its "background-color" property as "rgba (255, 255, 255, .5): The numbers in…
Suggested Courses

752 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question