Calling and Handling External Javascript with Parameters

(steve) #1

I’ve searched exhaustively and can’t find the answer. I know how to link an external Javascript file and call a function in it. I am unsure how to pass parameters to it.

Here’s how I’m calling an external Javascript function:

mytest(hypeDocument, element, event);

and here’s the function:
function mytest() {
alert ("test’);

That works fine. How do I add one or more parameters to the calling of the function, and where do I put those parameters in the Javascript function that receives. the call.

(Mark Hunte) #2

see this the note in post

But basicly
mytest(hypeDocument, element, event,"foo");


function mytest() {
alert (arguments[3]);	

I kept the (hypeDocument, element, event) in as not sure if you really needed to pass them also for your goal…