TypeError: $ is not a function..was working before
leckjApr 27 2013 — edited Apr 29 2013Hi,
This code was working before, but now gives this error: TypeError: $ is not a function.
I call it as onfocus="save_subjectcode(this.value)"; onblur="restore_subjectcode(this.id)"; of the column element attribute. Is the jQuery library not loaded
by default?
In fact I saved the page to a backup when It was working, and the backup gives same error.
The code will restore the value of any cell in the column,discarding anything entered.
this is in the form header html
<script language="javascript" type="text/javascript" >
var oldsubjectcode = " ";
function save_subjectcode(subjectcode)
{
oldsubjectcode = subjectcode;
}
function restore_subjectcode(subjectcode_id)
{
$("#"+subjectcode_id).val(oldsubjectcode);
}
Please have a look.
Thanks.
Leckraj