F
facehUK
I want to be able to submit some form data and save the contents of
some lists by using a single form button.
I am using the following event listener:
$$('.savePageButton').addEvent('click', SaveLists);
and applying the class "savePageButton" to my form submit button:
<input type="submit" name="submit" value="Apply changes to Skin"
class="button1 savePageButton" />
which calls a function SaveLists to save the list via AJAX:
var SaveLists = function(e)
{
cssList = serialize('css');
jsList = serialize('js');
new Ajax('save_includes',{data: "css=" + cssList}).request();
};
However, the Ajax never seems to fire. The form submits and ignores
the ajax script...
I have tried using new Event(e).stop(); to stop the form, which
completes the AJAX, but then doesnt submit the form...
Help please, how do i do both?
some lists by using a single form button.
I am using the following event listener:
$$('.savePageButton').addEvent('click', SaveLists);
and applying the class "savePageButton" to my form submit button:
<input type="submit" name="submit" value="Apply changes to Skin"
class="button1 savePageButton" />
which calls a function SaveLists to save the list via AJAX:
var SaveLists = function(e)
{
cssList = serialize('css');
jsList = serialize('js');
new Ajax('save_includes',{data: "css=" + cssList}).request();
};
However, the Ajax never seems to fire. The form submits and ignores
the ajax script...
I have tried using new Event(e).stop(); to stop the form, which
completes the AJAX, but then doesnt submit the form...
Help please, how do i do both?