mak wrote:
> [VK wrote:]
>> <form onsubmit="return valli(this)" ...
>>
>> function valli(frm) {
>> if (frm.lecture_held.value == "") {
>> frm.lecture_held.focus();
>> return false;
>> }
>> else if {
>> // ...
>> }
>> else if {
>> // ...
>> }
>> else {
>> return true;
>> }
>> }
>
> even using like this its submiting the value, Even though I'm not
> giving any value to the text box.
That is highly unlikely, you must have done something different to this.
Make sure that you always return a value from valli(), that you actually
have a `return' statement in the `onsubmit' attribute, and that you are
submitting using a submit button (`<input type="submit" ...>' or `<input
type="image" ...>'), not a click button (`<input type="button" onclick="..."
....>').
Please don't trim the attribution line next time.
PointedEars
--
var bugRiddenCrashPronePieceOfJunk = (
navigator.userAgent.indexOf('MSIE 5') != -1
&& navigator.userAgent.indexOf('Mac') != -1
) // Plone, register_function.js:16
|