Greetings all,
I'd appreciate some help on the following. I have a problem using
sfWidgetFormSelectDoubleList from the sfFormExtraPlugin plugin on a
form that uses jq_submit_to_remote. sfWidgetFormSelectDoubleList uses
a javascript, that hooks on the submit event, that select the items in
the "associated" select box before doing the submission. Now, the
problem is, with jq_submit_to_remote there is no firing of onsubmit
event (correct me if am wrong) hence no firing of the
sfWidgetFormSelectDoubleList function. Can we say that this widget is
not meant to be used with remote submit? Is there a work around this?
I tried to modify the js to this, but it doesn't work due to the order
in which the event listeners are called. Any help would be
appreciated.
I find the plugin pretty useful but I feel that it can use some more
work to realize its full potential.
cheers,
var sfDoubleList =
{
init: function(id, className, ajax_submit)
{
form = sfDoubleList.get_current_form(id);
if(ajax_submit)
{
//doesn't work on ajax submit where there is no actual submit
event
//get submit button element
submit_button = sfDoubleList.get_submit(form);
}
callback = function() {sfDoubleList.submit(form, className); };
if(ajax_submit)
{
elem = submit_button;
event_name = "click";
} else {
elem = form;
event_name = "submit";
}
if (elem.addEventListener)
{
elem.addEventListener(event_name , callback, false);
}
else if (elem.attachEvent)
{
var r = elem.attachEvent("on"+event_name, callback);
}
},
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"symfony users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en
-~----------~----~----~----~------~----~------~--~---