Robz
Robz

Reputation: 1180

Changing action of form within div by div id

i have to change the action of a form within a div without using the form id by jquery, javascript, instead i have to use the div id. and i tired this code but it does not worked:

$("#popup form:action").attr('value','address here');

The below is the div with form

<div id="popup">
    <form name="frm_categories" id="frm_categories" action="" method="post" enctype="multipart/form-data">
    <div class="attributes" id="new_attribute">
        //codes
    </div>
   </form>
</div>

can any body help me....

Upvotes: 1

Views: 382

Answers (1)

Eli
Eli

Reputation: 14827

You can do:

$('#popup form').attr('action', 'address');

Upvotes: 3

Related Questions