Passing variables via input/onclick
Here I am again!
I need to pass three fields via input/onclick. The first is a constant, and the next two string variables. I have to use input because the user wants a button to push. This is a bummer because <a href works great. It's that darn button!
Here's the code:
<input type="button" name="addnew" value="Add New Leave Request"
onclick="location.href='index.cfm?fuseaction=add_new_leave&leave_id=A&user_id=#UserID#&user_name=#UserName#'">
I get to index.cfm, and to the correct fuse action. But when I perform a dump of the URL at this point, all I get is:
leave_id A
user_id [empty string]
fuseaction add_new_leave
No mention of user_name at all. CFOUTPUT statements before the input statement indicate that UserID and UserName have valid values. I figure the problem has to be with the way I am formatting the onclick clause, but just can't figure out what the problem is.
Any suggestions?
