View Full Version : why wont my button perform the function?

01-05-2007, 03:04 PM
Why does this work:

<a href="#" onclick="serialize('sort1'); return false;" >submit sort order</a>

but not this:

<input name="submitorder" type="button" class="button" value="Submit" onclick="serialize('sort1'); return false;" />

my function:

function serialize(s)
serial = $.SortSerialize(s);
$.post("submitcategorysort.php", { data: serial.hash }, function(data){alert("Data Loaded: " + data);
} )

01-05-2007, 05:58 PM
i copied your code in an html file and tried it out and by clicking on both a got the same error about how $ isnt defined.

so clicking on both worked for me in a sense where the function executed:thumbsup: