Java Script Error
-
I am using javascript to create three tabs with field in the asp.net web application. while validating the second tab the message is displayed in the label but the selected tab is the first one. the java script is as follows
function Function1()
{
document.getElementById('Tab1').style.display = "none";
document.getElementById('Tab2').style.display = "block";
document.getElementById('Tab3').style.display = "none";
}server side code
Button1.Attributes.Add("OnClick", "Javascript:return Function1()");
ScriptManager.RegisterStartupScript(this, this.GetType(), "Function1", "Button1_OnClick", true); -
I am using javascript to create three tabs with field in the asp.net web application. while validating the second tab the message is displayed in the label but the selected tab is the first one. the java script is as follows
function Function1()
{
document.getElementById('Tab1').style.display = "none";
document.getElementById('Tab2').style.display = "block";
document.getElementById('Tab3').style.display = "none";
}server side code
Button1.Attributes.Add("OnClick", "Javascript:return Function1()");
ScriptManager.RegisterStartupScript(this, this.GetType(), "Function1", "Button1_OnClick", true);What html elements are Tab1, Tab2 and Tab3? Div, span, p, ?? You should perhaps read about element display, http://www.webdesignfromscratch.com/html-css/css-block-and-inline/[^] I can't tell from the code provided what exactly you are trying to accomplish but it seems better handled on the client-side with out a post just to have the button call function1. You should also look into JQuery[^]
I know the language. I've read a book. - _Madmatt
-
I am using javascript to create three tabs with field in the asp.net web application. while validating the second tab the message is displayed in the label but the selected tab is the first one. the java script is as follows
function Function1()
{
document.getElementById('Tab1').style.display = "none";
document.getElementById('Tab2').style.display = "block";
document.getElementById('Tab3').style.display = "none";
}server side code
Button1.Attributes.Add("OnClick", "Javascript:return Function1()");
ScriptManager.RegisterStartupScript(this, this.GetType(), "Function1", "Button1_OnClick", true);Do you want to validate only those validation they are available only on first tab or selected tab using javascript?
sunaSaRa Imdadhusen +91 99095 44184 +91 02767 284464
-
Do you want to validate only those validation they are available only on first tab or selected tab using javascript?
sunaSaRa Imdadhusen +91 99095 44184 +91 02767 284464