tags:

views:

23

answers:

1
 function setReqcode(id,methodName){

    if(document.getElementById('approve').value==id)
    {
        alert("inside approve"+methodName);
        action="ProcessPath.do?reqCode=approveVersion";
    }

    if(document.getElementById('reject').value==id)
    {
        alert("inside reject"+methodName);
        action="ProcessPath.do?reqCode=rejectVersion"
    }
}

i have to change the html:form action attribute according to if condition. so please suggest some solution with example.

A: 
formReference.setAttribute('action', 'blah') 

or

formRef.action='foo'

should suffice.

meder
please suggest me with help of an example
krishna