Hi
I've got 2 input types of text with a value that when clicked the value (set text) clears, except i get an error 'Object expected'
I have to build my asp page up as a string, so excuse that
javascript
the text box
there are <FORM> and </FORM> tags.
thanks
richard
I've got 2 input types of text with a value that when clicked the value (set text) clears, except i get an error 'Object expected'
I have to build my asp page up as a string, so excuse that
javascript
Code:
LPRSearchHead1 = "<script language=""JavaScript"" type=""text/javascript"">" & VBCRLF
LPRSearchHead1 = LPRSearchHead1 & "function clearText(thefield) {" & VBCRLF
LPRSearchHead1 = LPRSearchHead1 & "if (thefield.defaultValue = thefield.value){" & VBCRLF
LPRSearchHead1 = LPRSearchHead1 & "thefield.value = """ & VBCRLF
LPRSearchHead1 = LPRSearchHead1 & " }" & VBCRLF
LPRSearchHead1 = LPRSearchHead1 & "else {" & VBCRLF
LPRSearchHead1 = LPRSearchHead1 & "thefield.value = thefield.defaultValue" & VBCRLF
LPRSearchHead1 = LPRSearchHead1 & "}" & VBCRLF
LPRSearchHead1 = LPRSearchHead1 & "}</script>" & VBCRLF
the text box
Code:
LPRSearchBody = LPRSearchBody & "<td width=""60%""><strong><input type=""text"" id=""fp1"" name=""SchTradingName"" size=""35"" value=""Enter Trading Name"" onClick=""clearText(this)"" /></strong></td>"
there are <FORM> and </FORM> tags.
thanks
richard