HighDots Forums  

DOM instruction with vars

JavaScript discussion (multi-lingual) JavaScript discussion (alt.comp.lang.javascript)


Discuss DOM instruction with vars in the JavaScript discussion (multi-lingual) forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
draw
 
Posts: n/a

Default DOM instruction with vars - 11-08-2005 , 01:04 PM






What i like to do is making a function where i can use vars in a DOM instuction.
example:
function myfunction(myvar)
{var myfieldvalue=document.frmrecord.+ myvar+ .value; //this will not work
//and more intructions
}
In the DOM instruction i like to replace myfield with myvar to make this function usable for more then one field
(The normal DOM instruction is var myfieldvalue=document.frmrecord.myfield.value to get the value of myfield)

Anyone a solution to my problem?

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.