Hi guys,
I have 5 radio buttons (NONE of these are pre-selected).
Basically, if someone doesn't enter a rating... then I need it to pop up an alert. I know the other 2 subroutines are working fine... but this new one just doesn't seem to report an error back :/
The code is;
alert( "You need to set a Rating for this piece of work!");
return false;
}
The radio buttons HTML looks like;
<input type="radio" value="2" name="EditorRating">2
<input type="radio" value="3" name="EditorRating">3
<input type="radio" value="4" name="EditorRating">4
<input type="radio" value="5" name="EditorRating">5
One of the subs that works is ;
alert( "You need to set a Title for this piece of work!");
main.ChangedTitle.focus();
return false;
}
Could this have something to do with using the radio buttons? AFAIK, these are supported in Javascript?
TIA
Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
I have 5 radio buttons (NONE of these are pre-selected).
Basically, if someone doesn't enter a rating... then I need it to pop up an alert. I know the other 2 subroutines are working fine... but this new one just doesn't seem to report an error back :/
The code is;
Code:
if (main.EditorRating.value == "" && main.DeleteReason.value == "") { alert( "You need to set a Rating for this piece of work!");
return false;
}
The radio buttons HTML looks like;
Code:
<input type="radio" value="1" name="EditorRating">1 <input type="radio" value="2" name="EditorRating">2
<input type="radio" value="3" name="EditorRating">3
<input type="radio" value="4" name="EditorRating">4
<input type="radio" value="5" name="EditorRating">5
One of the subs that works is ;
Code:
if (main.ChangedTitle.value == "" && main.DeleteReason.value == "") { alert( "You need to set a Title for this piece of work!");
main.ChangedTitle.focus();
return false;
}
Could this have something to do with using the radio buttons? AFAIK, these are supported in Javascript?
TIA
Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!