BV Commerce Forum
»
BV Commerce Support
»
General Support
»
Clear the searchbox field Text (or Initial Value)
Rank: Member
Joined: 1/8/2007(UTC) Posts: 79
|
New day, new question:
I have in my searchbox an initial Value with the text = "Enter keyword" and I would like to clear that text in an Enter event (a .Net version of the - onClick="this.value=' '" -); I've made some tests in VisualStudio.Net, and the closer I've arrived has been this code:
PrivateSubByValAsObjectByValAsHandlesEndSub</P>
(Of course I'm not pasting here the code generated by the WindowsForm designer). When I execute this local I feel like if I would be a real webmaster (that means this works, and cleans-up the inicial Text value).
The problem is when I try to insert this code in the asp.vb
Until this moment I couldn't make it work.
Perhaps I'm going on the wrong way.
Thanks,
Auchi
|
|
|
|
Rank: Member
Joined: 11/25/2003(UTC) Posts: 370
|
There are of course a number of ways to do this but you need to still be using javascript Code:Me.TextBox1.Attributes.Add("onClick", "this.value='';") |
|
|
|
|
Rank: Member
Joined: 1/8/2007(UTC) Posts: 79
|
Works!
Thanks, thanks, thanks, thanks
(This is the best way to start another week)
|
|
|
|
Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.