Click to See Complete Forum and Search --> : change de action of a form


pjdc
03-26-2003, 05:06 AM
how can i change a action property of a form?
i try to do this:
document.forms[0].action = 'novo url'';

but this code only work in mozilla, they don't work on IExplorer 6.

Any ideia?

Thanks

Pedro Cardoso

gil davis
03-26-2003, 05:53 AM
Without seeing the HTML for the form, I cannot give a specific answer. However, what you posted contains one too many single quotes.

pjdc
03-26-2003, 08:02 AM
this is my javascript function:

function viewAction(act) {
document.forms[0].action = act + '.do';
document.forms[0].id.value = selectedLine;
document.forms[0].submit();
}

the problem is when try to change the action. IE says "Object doesn't support this property or method"


can you help me?

gil davis
03-26-2003, 08:15 AM
Without seeing the HTML for the form, I cannot give a specific answer.