views:

36

answers:

1

Hello i have this form filling javascript:

function onLine(code,nn)
{
document.writeform.bericht.value+=code;
document.writeform.bericht.focus();
document.writeform.nickname.value+=nn;
write1();
}

Is this correct? Especially i want to know if i did

function onLine(code,nn)

(2 different values)

correct.

Can someone say so?

EDIT: if it is good, is this a good way of calling it:

...
onClick="onLine('Hello,MyThing');"
...

Or is this wrong? (which i think because it gave me script errors.)

+1  A: 

Your function setup is correct, however the way you call it is incorrect. You need to seperate out your two strings.

...
onClick="onLine('Hello','MyThing');"
...
Mike Clark
Thanks, now i do not have errors. Still a shame that when i saved my page, all the body was gone.... Need a lot of time now to recreate it.
YourComputerHelpZ