October 7, 201016 yr Hi everyone. I have tried to get this validated but unfortunately it will not validate <textarea name="AnyComments" id="AnyComments" onclick="this.value='' class="quotemetext3">Description</textarea> The error i get is Have you forgotten the "equal" sign marking the separation between the attribute and its declared value? Typical syntax is attribute="value". Any ideas?
October 7, 201016 yr I'm not a coder, but to me something looks wrong with this bit: onclick="this.value='' Missing a ", perhaps? Probably won't help, mind
October 7, 201016 yr <textarea name="AnyComments" id="AnyComments" onclick="this.value=''" class="quotemetext3">Description</textarea> that'll do it
October 7, 201016 yr <textarea name="AnyComments" id="AnyComments" onclick="this.value=''" class="quotemetext3">Description</tetxarea> Like cicles said Might have to add rows and columns also Zed beat me to it
October 7, 201016 yr Author no the " isnt the issue, Its the value='' but i need this empty as the line of code makes it so that when the user clicks in the form the value text (Test Text to tell people what goes there.. ie "Email Address") it disappears. There must be a way round this little bit of coding. the thing what gets me is a few lines above is valid yet its more or less the same <input name="Name" id="Name" type="text" onclick="this.value=''" value="Name" class="quotemetext"/> The only thing is the value is within the form rather than within the text field!
October 7, 201016 yr Author it originally has that is the " in, i just missed it out when typing it in here!
October 7, 201016 yr For the text field I wouldn't use that javascript code because (not sure if this occurs) but here goes: A user clicks on it, name disappears, they enter their name. They then realise they have entered an extra letter, so go back. Click it, and it vanishes. I think a better way, avoiding inline javascript as well would be to use jQuery, using an if statement to check if the value is "Name"
October 13, 201016 yr There must be a way surrounding this little bit of coding. The thing what gets me is a few lines above is valid yet its more or less the similar
Create an account or sign in to comment