vsshah
02-13-03, 12:00
| Hi, I am writing first time Java Script. I have 1 check box in ASP code. If I want to check that check box 'QECheckbox', system date should be entered another field 'QEDate' automatically. But, i am not able to do that. My Java script(Function) is written below, and ASP code is also there. Please help me, What modifications, I need to do in script. well, 'QEcheckbox' is 'bit' type field in SQL Server. 'QEdate' is 'Datetime' type field in SQL Server. Thanks, -- <script language = "JavaScript"> function calculate_total(cbox,ram) { var today = new Date(); if (cbox.checked) { ram.value = today Alert( "Hello") } else { ram.value = getDate(); } } </script> ---- If (UserRole = "PIR002") OR (UserRole = "PIR007") Then 'EDI If QECheckbox = True then 'Response.Write("<input type='checkbox' name='QECheckbox' value='checkbox' CHECKED >") Response.Write("<input type='checkbox' value='yes' name='QECheckbox' onclick='calculate_total(document.idform.QECheckbo x,document.idform.QEDate)' >") Else Response.Write("<input type='checkbox' name='QECheckbox' value='checkbox' >") End if End if ---- |