Click here to Skip to main content
15,894,337 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have a butto named as Save
and have a div which contain "All * marked fields are mandatory"

so when i click on button that div will display how can i do this
Posted

On buttion clientClick call java script function like:

JavaScript
function funCheckValidation() {
           $(document).ready(function () {
                   $("#divYourDivID").show();
               }
          )};


also check following link:
http://www.w3schools.com/jquery/tryit.asp?filename=tryjquery_hide_show[^]
 
Share this answer
 
v2
 
Share this answer
 
JavaScript
$("#urButtonId").click(function(){
   $("#urDivId").show();
});
 
Share this answer
 
onclick event of the Button, write a JavaScript which will get the div element by it's id and set it's display property to none.

HTML
<input type="button" id="submitButton" value="Submit" onclick="javascript:showDiv();" />

Here goes your javasciprt function:
JavaScript
function showDiv() {
    document.getElementById("divID").style.display = "block";
}


I think there is more than that you want... possible you want to validate your controls before posting back. That is very simple too. Just check the values for required elements and return a false/true to the function based on that.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900