Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Simulating a radio button click

Status
Not open for further replies.

jlawler

Programmer
Feb 26, 2003
14
IE
I have a piece of code which currently executes a particular function when a radio button is clicked. This button has to be removed(or at least hidden). How can I call this function, without actually clicking the button. Is there a way of simulating a radio button click from within the code.

Code:
<input type=&quot;radio&quot; name=&quot;lc_category&quot; value=&quot;<%= productCategory.getCategoryPK() %>&quot; <b>onClick=</b>&quot;javascript: setOnChangeAction('selectqq', 'lc_type<%= productCategory.getCategoryPK() %>', 'lc_category', '<%= productCategory.getCategoryPK() %>', <%= arrayIdName + &quot;[&quot; +selectedIndexCode+&quot;]&quot; %>);&quot; >

Any suggestions are appreciated
Thanks
jlawler
 
<input type=button value=&quot;Click It&quot; onClick=&quot;javascript: setOnChangeAction('selectqq', 'lc_type<%= productCategory.getCategoryPK() %>', 'lc_category', '<%= productCategory.getCategoryPK() %>', <%= arrayIdName + &quot;[&quot; +selectedIndexCode+&quot;]&quot; %>);&quot;>



OR

<body onLoad=&quot;javascript: setOnChangeAction('selectqq', 'lc_type<%= productCategory.getCategoryPK() %>', 'lc_category', '<%= productCategory.getCategoryPK() %>', <%= arrayIdName + &quot;[&quot; +selectedIndexCode+&quot;]&quot; %>);&quot;>

Get the Best Answers! faq333-2924
Is this an asp FAQ? faq333-3048
Tek-Tips Best Practices: FAQ183-3179
It's sad that some Americans proudly turn their backs on the very Flag the gives them the opportunity to do just that... - Mike
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top