I have 2 date fields namely date_from and date_to. A javascript alert pops out when date_from is ahead of date_to for example
date_from: 2009-04-25 //Error date_from is greater than date_to
date_to: 2009-04-11
What I want is to create a validation using javascript alert whenever the user clicks on the submit button. Sample codes is much appreciated
Thanks
create client side javascript alert in php
Moderator: General Moderators
-
greedyisg00d
- Forum Commoner
- Posts: 42
- Joined: Thu Feb 12, 2009 2:48 am
Re: create client side javascript alert in php
- You'll want to use the onclick event handler()
- How is this related to PHP? Unless you're using AJAX, this is strictly client-side & I can move it to that forum
- Straight-up asking for code will likely get you nowhere. Show us what you've tried & specifically what the problem is.
- How is this related to PHP? Unless you're using AJAX, this is strictly client-side & I can move it to that forum
- Straight-up asking for code will likely get you nowhere. Show us what you've tried & specifically what the problem is.
Real programmers don't comment their code. If it was hard to write, it should be hard to understand.