I have ASP page where there are three tabs,each showing different content.
Each tab have cancel button and save button.
If validation is proper; then,
Save button submits the page.Otherwise,returns false.
Now,After validation , the tab which is actually activated willl be as it is after returning false.
This is working fine in IE.
But in FireFox,
If first time,the tab which is activated (First/Second Or Third), and I switch to any other tab and there after filling the info ,and clicking on save button,if validation is false then it returns false but it automatically switches to the tab which was first time activated.it should not happened.
Any Suggestion.
Here is the JavaScript Code for "Onclick event" of "Save" button :
Expand|Select|Wrap|Line Numbers
- <script type="text/javascript">
- function FnSave(val)
- {
- var StrFolName,StrSubFolName,StrType,StrConfirm;
- /*CHECK WHETHER FOLDER NAME IS ENTERED*/
- StrFolName = Form.txtFolName.value;
- StrSubFolName = Form.txtSubFolName.value;
- if(val=="PARE")
- {
- if (StrFolName == "")
- {
- alert("Please enter new folder name...");
- return false;
- }
- if(FnValidFlName(StrFolName)==false)
- {
- return false;
- }
- StrConfirm = "Add Folder '"+StrFolName+"'?"
- }
- if(val=="SUB")
- {
- if (StrSubFolName == "")
- {
- alert("Please enter Subfolder name...");
- return false;
- }
- if(FnValidFlName(StrSubFolName)==false)
- {
- return false;
- }
- if(StrSubFolName!="" & Form.CmbPareFolder.value=="")
- {
- alert("Please select parent folder for new Sub folder...");
- return false;
- }
- StrConfirm = "Add Folder '"+StrSubFolName+"'?"
- }
- /*SUBMIT TO SAVE*/
- if (confirm(StrConfirm))
- {
- //CODE
- }
- }
- </script>
Regards,
"D"