Go Back   CodingForums.com > :: Client side development > JavaScript programming

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 01-05-2007, 03:04 PM   PM User | #1
aprestong
Regular Coder

 
Join Date: Jul 2006
Posts: 110
Thanks: 1
Thanked 0 Times in 0 Posts
aprestong is an unknown quantity at this point
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); 
	} )
}
aprestong is offline   Reply With Quote
Old 01-05-2007, 05:58 PM   PM User | #2
6arredja
New Coder

 
Join Date: Nov 2004
Posts: 64
Thanks: 0
Thanked 0 Times in 0 Posts
6arredja is an unknown quantity at this point
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
6arredja is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 05:57 AM.


Advertisement
Log in to turn off these ads.