[thelist] newbie help -- javascript return function value

misterhaan misterhaan at track7.org
Mon Jan 5 07:39:25 CST 2009


Marc Cantwell wrote:
> <input type="text" name="entry.22.single" value="" class="ss-q-short"  
> id="entry_22" onclick="this.value=rfino;" />
as you said, you're setting the value of the field to the function 
itself, instead of running the function and setting the field to the 
return value.  set the onclick property to "this.value=rfino();" instead 
and it will run the function each time you click on the field and set 
its value to the function return value.



More information about the thelist mailing list