|
-
Dec 28th, 2005, 08:42 PM
#1
Thread Starter
Hyperactive Member
vbscript and forms
Hi Friends,
Is this easy and/or possible to do?
I have a Form with 3 textboxes and 1 button.
When i submit that form i wish to go to a vbscript function that check the textboxes on a value. If they are not empty the form will be posted to a other asp page, if they are empty i will show a msgbox. I really don't know how to do.I am searching but can't find a solution. Will keep searching but maybee someone here have a quick solution.
Thanks,
Matrixxx
-
Dec 28th, 2005, 09:15 PM
#2
Thread Starter
Hyperactive Member
Re: vbscript and forms
Now i found it!
Now i am searching how i can delete the value in a textbox when i click on it (focus)
-
Dec 29th, 2005, 03:15 PM
#3
Fanatic Member
Re: vbscript and forms
Could try:
<code>
sub Text1_click()
text1Clear
end sub
sub text1Clear()
text1.text=""
end sub
</code>
Or just call the sub Text1Clear. Using the Focus param will erase the text when you first type in it.
Good luck
-
Jan 9th, 2006, 07:25 AM
#4
Frenzied Member
Re: vbscript and forms
I dont know much about vbscript, but you can also do it with javascript.
Code:
<script language="javascript">
function Empty()
{
document.all.txtName.value = "";
}
</script>
<body>
<form name="Main">
<input type="text" name="txtName" onFocus="javascript:Empty();">
</form>
</body>
-
Jan 10th, 2006, 08:29 AM
#5
Lively Member
Re: vbscript and forms
 Originally Posted by Matrixxx
Now i found it!
Now i am searching how i can delete the value in a textbox when i click on it (focus)
<input type="text" name="somename" onClick="this.value=''" onFocus="this.value=''" >
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|