[jQuery] Newbie dumb question

[jQuery] Newbie dumb question

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content="text/html; charset=us-ascii" http-equiv=Content-Type>
<META name=GENERATOR content="MSHTML 8.00.6001.18783"></HEAD>
<BODY>
<DIV><FONT size=2 face="Trebuchet MS"><SPAN class=968461900-18062009>Ok i am
submitting a form with the jquery.formplugin by malsup</SPAN></FONT></DIV>
<DIV><FONT size=2 face="Trebuchet MS"><SPAN
class=968461900-18062009></SPAN></FONT> </DIV>
<DIV><FONT size=2 face="Trebuchet MS"><SPAN class=968461900-18062009>My dumb
question is where do I put the script code? My Page loads -> click edit i
have a modal window open up and thats the form there in the modal that iwant to
submit ajax. Do i put my form script in the form page its self or do I add
it to the rest of my script snips I have for the rest of the
site?</SPAN></FONT></DIV>
<DIV><FONT size=2 face="Trebuchet MS"><SPAN
class=968461900-18062009></SPAN></FONT> </DIV>
<DIV><FONT size=2 face="Trebuchet MS"><SPAN
class=968461900-18062009>$('#UpdateForm').bind('submit', function()
{<BR>   var numRand =
Math.floor(Math.random()*100000);<BR>   var queryString =
$('#UpdateForm').formSerialize();<BR>   $(this).ajaxSubmit({<BR>    type:
   'post',<BR>    url:  
   '/update'/'+numRand
,<BR>    data:  
  queryString,<BR>               
target:
  '#profile_location,<BR>            <BR>           
});<BR>   <BR>           
return false; // <--
important!<BR>   <BR>       
});</SPAN></FONT></DIV>
<DIV> </DIV>
<DIV align=left><FONT size=2 face=Arial>Dave</FONT></DIV></BODY></HTML>

































    • Topic Participants

    • dave