Solved

Form Text Input box and javascript

Posted on 2006-06-23
2
216 Views
Last Modified: 2010-04-25
hi i am using the dreamweaver behavior

onclick="MM_setTextOfTextfield('enquiry','','')"

I am trying to set the initial text to dissapear on click, this works but i want to set it up so that if a user clicks again on their own text, it wont dissapear again.

are these behaviours the best thing to be using anyway

can anyone help

thanks
0
Comment
Question by:socross
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 23

Accepted Solution

by:
Saqib Khan earned 250 total points
ID: 16981489
Call you Function on the textbox like below, replace 'my orignal value' with whatever the default value you have in text box.

onclick="if(this.value=='my orignal value') {MM_setTextOfTextfield('enquiry','','')}"
0
 
LVL 1

Author Comment

by:socross
ID: 16982137
Brilliant
thanks
0

Featured Post

[Webinar] Learn How Hackers Steal Your Credentials

Do You Know How Hackers Steal Your Credentials? Join us and Skyport Systems to learn how hackers steal your credentials and why Active Directory must be secure to stop them. Thursday, July 13, 2017 10:00 A.M. PDT

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Adobe Dreamweaver CS5 is a WYSIWYG web page editor that has advanced HTML, CSS, and Javascript rendering functionality and is probably the most well-known HTML editor available. Much of Dreamweaver's appeal centers around the Design View interfac…
This article is very specific and is only intended to help if you are installing Dreamweaver 8 in a Windows 7 environment with Office 2007 installed.   I'm not sure why Microsoft tends to release OS' that should not be released but they do.  Windows…
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…

623 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question