View Single Post
  #3 (permalink)  
Old July 4th, 2004, 04:16 PM
lanita lanita is offline
Authorized User
Join Date: Jun 2004
Location: , , .
Posts: 26
Thanks: 0
Thanked 0 Times in 0 Posts

Could you please give me an example of java script to validate user's intention for deleting and article or if I want to check if the field "title" is typed (otherwise it migth save blank instead of title)?
I tried to do redirect to another page in php, but I found that it's not convenient in cases when I want to reload a page with typed by user input.
For example, when a user compose a new article without a title, I redirect him to page "please enter title", but with redirecting the user loses his typed "body" of the article since it was not saved in db yet and can't be reload. So, I think java scripts are more useful for checking input. Could you please give me some examples of validation java scripts?
Thank you,