Setting the action attr with JQuery not working

TAGs: 0 Comment

Posted By: eligeske on in JQuery

For some reason when trying to set the action attribute on a form field, or anything with the name action for that matter, JQuery doesn’t handle this very well. I believe this has been fixed in newer versions. Currently I am using 1.4.2 where this issue is coming up.

One way to get around this is to use the DOM selector like in some of my previous posts, but using the setAttribute method.

$('#searchForm').get(0).setAttribute('action', 'myNewValue');

0 Responses to "Setting the action attr with JQuery not working"


Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Learning DHTMLX Suite UI

Learn the foundation of the DHTMLX Suite quickly while building a single page application with multiple components in harmony.

Popular post