zuzupus
09-11-2003, 11:16 AM
hi,
i created 2 time drop downs and i prevent user to push Save button untill and unless he selects the time and mind there is images when user clicks it displays system time in drop down so now what happening when user try to push Save without selecting time he will get alert but when he selects ok it must return false but it submit the problem
<input type="submit" value="Save" name="Save" border="1" onclick="go();">
function go(){
var myindex=document.forms"tstest".to.selectedIndex;
if (myindex==0) {
alert("\nPlease be sure that time from To drop-down menu is selected.");
}
else {
document.tstest.submit(); }
}//submit go()
but when i give type=button then it trurns false for alert but then it wont submit the form
i will go mad this really sucks
plz have a look at http://server2.vitodesign.com/scripts/test.phtml
u will see Von and Bis time drop downs and if u try to push sav u will get alert and it submitt he form it wont happen
u will get generated HTML file if still not clear plz let me know
thanks
i created 2 time drop downs and i prevent user to push Save button untill and unless he selects the time and mind there is images when user clicks it displays system time in drop down so now what happening when user try to push Save without selecting time he will get alert but when he selects ok it must return false but it submit the problem
<input type="submit" value="Save" name="Save" border="1" onclick="go();">
function go(){
var myindex=document.forms"tstest".to.selectedIndex;
if (myindex==0) {
alert("\nPlease be sure that time from To drop-down menu is selected.");
}
else {
document.tstest.submit(); }
}//submit go()
but when i give type=button then it trurns false for alert but then it wont submit the form
i will go mad this really sucks
plz have a look at http://server2.vitodesign.com/scripts/test.phtml
u will see Von and Bis time drop downs and if u try to push sav u will get alert and it submitt he form it wont happen
u will get generated HTML file if still not clear plz let me know
thanks