Reputation: 2157
I have javascript code at here:
But the jsfiddle said it has error :
{"error": "Shell form does not validate{'html_initial_name': u'initial-js_lib', 'form': <mooshell.forms.ShellForm object at 0xa2ea90c>, 'html_name': 'js_lib', 'html_initial_id': u'initial-id_js_lib', 'label': u'Js lib', 'field': <django.forms.models.ModelChoiceField object at 0xa2ef70c>, 'help_text': '', 'name': 'js_lib'}{'html_initial_name': u'initial-js_wrap', 'form': <mooshell.forms.ShellForm object at 0xa2ea90c>, 'html_name': 'js_wrap', 'html_initial_id': u'initial-id_js_wrap', 'label': u'Js wrap', 'field': <django.forms.fields.TypedChoiceField object at 0xa2ef12c>, 'help_text': '', 'name': 'js_wrap'}"}
I have tried at my main program and this JS doesn't work, so I try at jsfiddle then I got that result. What happened with my JS? because I have same JS (different name of form and textbox) but it works perfectly..
Upvotes: 0
Views: 58
Reputation: 388316
multiple problems
alasan
(one space)Fixed Demo:
function validate(myform)
{
if(document.myform.alasan.value == "")
{
alert("Alasan harus diisi");
document.myform.alasan.focus();
return false;
}
else
{
return true;
}
}
Upvotes: 2