Append javascript arguments

M

Meendar

Hi,

I just want to append the arguments from the function in javascript to
the variables as


function a()
{
var temp=arguments[0];

var t=document.form[0]."+temp+".value

}


But the above thing is not working , how can i append the arguments in
the variables.


Thanks in Advance,
 
L

-Lost

Meendar said:
Hi,

I just want to append the arguments from the function in javascript to
the variables as


function a()
{
var temp=arguments[0];

var t=document.form[0]."+temp+".value

var t = document.forms[0][temp].value;
}

But the above thing is not working , how can i append the arguments in
the variables.

That function will only work if it is passed a string that coincides with the name of a
FORM element.

For example:

<input type="text" name="text1" onblur="a(this.name);" />

-Lost
 

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,754
Messages
2,569,521
Members
44,995
Latest member
PinupduzSap

Latest Threads

Top