setting 'onclick' variable

seorchipotle

New Member
I am fairly inexperienced with JavaScript. and so far I have only used constants, not variables in this context so I tried to adapt the code but evidently, not correctly. here's the code:\[code\]function setInput(button, setValue) { var vrybl='hello', buttonVal = button.value, textbox = document.getElementById('input_' + buttonVal);textbox.value = http://stackoverflow.com/questions/12763198/setValue;<html><input type='submit' name='submit_a' vhttp://stackoverflow.com/questions/12763198/alue="a" onclick="setInput('vrybl'); return false;">\[/code\]
 
Back
Top