Hi,
My code is as follows
The reason I am using input tag with type as hidden because I need to know which button was hit so that I can insert or update accordingly and send the error across (if generated).
When I click any of the buttons (i.e. either Save or Update) with no data on any of the text boxes.
1. It hits the server without actually getting itself validated first. I did put a dummy alert() inside the script to check the same.
When I use form attribute onsubmit="return validate(this);" and remove the onclick attributes of both the buttons,
1. It validates the form but continues to hit the server when false is returned. I can't use this form onsubmit event since I am loosing hidden attribute's value.
Modified code as follows:-
I don't know where is the issue.
Please Help !!!.
I hope you guys will forgive me for visiting the site after a very long time.