ramli Posted December 11, 2007 Share Posted December 11, 2007 Hellow, I have a question concerning the script below: <script> function getval(inputname,iframename,formname,fmprvar) { getoption = document.+formname+.+inputname+.value top.frames[iframename].location = './formprocessor/FORMPROCESSOR.php?pageid='+ fmprvar +'&val=' + getoption; } </script> as you can see im trying to combine variables inside a document function. However this does not work. do any of u have a solution for this ? Thanx in advance Link to comment https://forums.phpfreaks.com/topic/81179-solved-combining-variables-with-document-function/ Share on other sites More sharing options...
Psycho Posted December 11, 2007 Share Posted December 11, 2007 Think of it as an array: getoption = document[formname][inputname].value Link to comment https://forums.phpfreaks.com/topic/81179-solved-combining-variables-with-document-function/#findComment-412154 Share on other sites More sharing options...
ramli Posted December 11, 2007 Author Share Posted December 11, 2007 thx that worked Link to comment https://forums.phpfreaks.com/topic/81179-solved-combining-variables-with-document-function/#findComment-412270 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.