Hie..I am working asp page with java script as script language. In a form, I have two radio buttons stating active or inactive. I have two text fields next to radio buttons containing Date activated and Date released (for inactive)
Now , I want the text field to be highlighted only when user selects respective button.
Eg.. If user selects active, I want Date activated text field to be highlighted automatically and if user selects inactive, Date released text field must be highlighted
This is a part of my code containing radio buttons with normal textfields date activated and date released
<%@ LANGUAGE="JAVAS CRIPT" %>
<!-- #include virtual="/header.asp" -->
<%
/**
* file: application/inventory/add.asp
* description: allow users to add a new vehicle to the DB
**/
%>
<script language="javas cript">
</script>
<%
// the form
Response.Write( "<form action='add.asp ' method='POST' onsubmit='retur n checkForm()' name='myform'>" );
// Radio button control
Response.Write( "<tr class='d0'><td> Status</strong></td><td>Active: <input type='radio' name='status' value='1' /> Inactive: <input type='radio' name='status' value='0' /></td><tr>");
Response.Write( "<tr class='d0'><td> Date Activated</strong></td><td><input name='Dateactiv ated' type='text' /></td></tr>");
Response.Write( "<tr class='d0'><td> Date Released</strong></td><td><input name='Daterelea sed' type='text' /></td></tr>");
Response.Write( "<input type='submit' value='Submit' />");
Response.Write( "<input type='reset' value='Reset' />");
Response.Write( "<input type='button' value='Cancel' onclick='window .location=\"sea rch.asp\"' />");
Response.Write( "</form");
%>
<!-- #include virtual="/footer.asp" -->
I really appreciate your help...:)
Now , I want the text field to be highlighted only when user selects respective button.
Eg.. If user selects active, I want Date activated text field to be highlighted automatically and if user selects inactive, Date released text field must be highlighted
This is a part of my code containing radio buttons with normal textfields date activated and date released
<%@ LANGUAGE="JAVAS CRIPT" %>
<!-- #include virtual="/header.asp" -->
<%
/**
* file: application/inventory/add.asp
* description: allow users to add a new vehicle to the DB
**/
%>
<script language="javas cript">
</script>
<%
// the form
Response.Write( "<form action='add.asp ' method='POST' onsubmit='retur n checkForm()' name='myform'>" );
// Radio button control
Response.Write( "<tr class='d0'><td> Status</strong></td><td>Active: <input type='radio' name='status' value='1' /> Inactive: <input type='radio' name='status' value='0' /></td><tr>");
Response.Write( "<tr class='d0'><td> Date Activated</strong></td><td><input name='Dateactiv ated' type='text' /></td></tr>");
Response.Write( "<tr class='d0'><td> Date Released</strong></td><td><input name='Daterelea sed' type='text' /></td></tr>");
Response.Write( "<input type='submit' value='Submit' />");
Response.Write( "<input type='reset' value='Reset' />");
Response.Write( "<input type='button' value='Cancel' onclick='window .location=\"sea rch.asp\"' />");
Response.Write( "</form");
%>
<!-- #include virtual="/footer.asp" -->
I really appreciate your help...:)