Hexagora Forum
Hexagora Forum
Home | Profile | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Dynamic HTML Editor
 Dynamic HTML Editor
 Textfields and value
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Martin1
Super User

Netherlands
626 Posts

Posted - 23 Dec 2008 :  22:19:11  Show Profile  Reply with Quote
Hello all,

I am currently creating a form and I can add to the textfields a value which can be seen inside the textfield.

However how can I have this value removed as soon as I click inside the textfield?

Regards,

Martin

s.dav
Site Admin

Italy
3364 Posts

Posted - 24 Dec 2008 :  08:38:25  Show Profile  Visit s.dav's Homepage  Reply with Quote
Your page should be something like this (in HTML):

<html>
<head>

<script language="javascript" type="text/javascript">
<!--

function blankField(o)
{
o.value="";
}

//-->
</script>

</head>
<body>
<form name="myForm" action="" method="post">
<input type="text" name="mytext" id="mytext" value="click here" onclick="blankField(this);">
</form>
</body>
</html>


Regards, Davide
Go to Top of Page

Martin1
Super User

Netherlands
626 Posts

Posted - 24 Dec 2008 :  12:53:25  Show Profile  Reply with Quote
Thanks Davide,

I thought I had overlooked a setting somewhere in DHE but there isn't a setting for it. Maybe it would be a good idea to create a setting for it?

Regards,

Martin
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
Hexagora Forum © s.dav Go To Top Of Page
Snitz Forums 2000