Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    Regular Coder
    Join Date
    Jul 2006
    Posts
    110
    Thanks
    1
    Thanked 0 Times in 0 Posts

    why wont my button perform the function?

    Why does this work:
    Code:
    <a href="#" onclick="serialize('sort1'); return false;" >submit sort order</a>
    but not this:
    Code:
    <input name="submitorder" type="button" class="button" value="Submit" onclick="serialize('sort1'); return false;" />
    my function:
    Code:
    function serialize(s)
    {
    	serial = $.SortSerialize(s);
    	alert(serial.hash);
    	$.post("submitcategorysort.php", { data: serial.hash }, function(data){alert("Data Loaded: " + data); 
    	} )
    }

  • #2
    New Coder
    Join Date
    Nov 2004
    Posts
    64
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •