Ajax Submit Page Refresh?

I fixed your fiddle: jsfiddle.net/ntJux/5/ I just assigned the event handler unobtrusively, as in: $('#idOfTheForm'). Submit(function(event){ ... }).

Instead of using an "onclick" in your form, bind it to your JavaScript. So, instead of function submit_number(event) do $(form). Submit(function(event).

And then window. Submit_number=function() { //Prevent Default page refresh on submit //event.preventDefault(); ...... } preventDefault() can be removed.

Function that is called when onclick event happens should simply return false.

You submit_number function is defined inside the "document ready" event handler and is visible only inside that function (scope) and its children, so you can't use it from HTML, where only the global scope is available. If you would have firebug or something similar activated you would see just that in the error console. A quick hack to make it work would be to replace function submit_number(event) { with window.

Submit_number = function(event) { thus explicitly putting your function in the global scope, but it is not the recommended way. There's no point in polluting the global scope with your single purpose function. A better approach would be to register your function as an event handler from JS like so: $('form.

Kinkast_signup'). Submit(submit_number); Also you may want to add an ID to that form and reference it by ID instead of class name.

Check these out: hasin.wordpress.com/2009/10/01/jqueryhoo... net.tutsplus.com/tutorials/javascript-aj... ryancoughlin.com/2008/11/04/use-jquery-t....

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions