Welcome visitor
* Login
* Register
It is currently May 20th, 2019, 6:40 am
All times are UTC [ DST ]
* Search
View unanswered posts - View active topics

FORUMS » Client Side » JavaScript



Post new topic Reply to topic  [ 2 posts ] 
Author Message
  RED ALERT
PostPosted: March 11th, 2009, 5:13 am 
User avatar

Posts: 56
Hi, Im trying to design a form on html for name, email and phone of the user. What i want javascript for, is to show a red alert to indicate that certains fields have not been filled.

I only want to add a discret warnig on the side of the input box, not an alert window message. If thats clear enough i'll wait for your answers, thank you.


Top
 Profile  
 
  Re: RED ALERT
PostPosted: March 11th, 2009, 5:20 am 
User avatar

Posts: 63
have u think about "labels" with "display:none" and when the field is empty then change to "display:inline"
First Name: <input id="name" /><label id="nmw" for="name" style="color:red; display: none"><i> fill this field, please</i></label>
if (document.getElementById('name').value=='')
{document.getElementById('nmw').style.display ='inline';}

or something like that.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

FORUMS » Client Side » JavaScript


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron