function parameter and overwrite : xx.xx.xx

C

Chris

function closebe(FORMULAIRE) {

window.document.FORMULAIRE.submit();

// I tried by this way too: window.document.'+FORMULAIRE+'.submit();

return false;

}

I try to write the form name in the line submit which is passed by parameter
by the function closebe wihout success.
I don't know how to do and and I find nothing in the doc.
If you know how to do, please help me...

Thanks for your help
Chris
 
M

Mick White

Chris said:
function closebe(FORMULAIRE) {

window.document.FORMULAIRE.submit();

// I tried by this way too: window.document.'+FORMULAIRE+'.submit();

return false;

}

function closebe(formName) {
document[formName].submit();
}

<button onclick="closebe('FORMULAIRE')">

Not the ideal way to do it though.

Mick
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,011
Latest member
AjaUqq1950

Latest Threads

Top