Skip to content
View in the app

A better way to browse. Learn more.

Web Designer Forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Cant get this validated :(

Featured Replies

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?

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 :p

<textarea name="AnyComments" id="AnyComments" onclick="this.value=''" class="quotemetext3">Description</textarea>

 

that'll do it

<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 :)

  • 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!

  • Author

it originally has that is the " in, i just missed it out when typing it in here!

  • Author

Ok i its the rows and columns. I dont want them as its 100% css :(

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"

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.