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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

HTML Radio button doesn't Postback anymore

Status
Not open for further replies.

vilrbn

Programmer
Oct 29, 2002
105
FR
Hello,

I have two radio buttons defined as follows:

<td><INPUT id="rdbGU" runat="server" type="radio" size="20" value="G" name="Type" onclick="EnableBottom()" onserverchange="rdbGU_ServerChange">Global Update</td>
<td ><INPUT id="rdbQ" runat="server" type="radio" size="20" value="Q" name="Type" onclick="EnableBottom()" onserverchange="rdbQ_ServerChange">Query Builder</td>

I use HTML buttons (instead of ASP.NET ones) as I also want to fire a javascript function with the onclick control event.

Those buttons worked perfectly but today, when I check one of them, there is no action until I click on another ASP.NET control that fires the code-behind radio button.

Thanks for your help !
 
I use HTML buttons (instead of ASP.NET ones) as I also want to fire a javascript function with the onclick control event.
You can add javascript events to ASP.NET Server Controls...


----------------------------------------------------------------------

Need help finding an answer?

Try the search facilty ( or read FAQ222-2244 on how to get better results.
 
Yes, I know.
I will probably try to use ASP.NET controls to solve this problem.
But I would like to understand why they were working and which update I did that interfers with the buttons behavior.
 
So what updates have you made then?

----------------------------------------------------------------------

Need help finding an answer?

Try the search facilty ( or read FAQ222-2244 on how to get better results.
 
I have added the Javascript function and certainly other little things but I don't remember in detail.
In this case, I chose HTML control as I'm using frames and need Javascript to communicate between them.
 
If you can't remember what changes you have made then you will have problems trying to go back and figure out what caused the problem.

What I would do is scrap the idea of using HTML controls and use ASP.NET server controls - you already have added the runat=server attribute so I don't see any reason why you wouldn't just use the server control. You can still use the the server control to communicate between your frames as you can add javascript attributes to a server control.

----------------------------------------------------------------------

Need help finding an answer?

Try the search facilty ( or read FAQ222-2244 on how to get better results.
 
I used HTML because of the onclick and onserverchange events.
If I do a view source on my page, controls are now defined as follows:

<td><input value="G" name="Type" id="rdbGU" type="radio" size="20" onclick="EnableBottom()" />Global Update</td>
<td><input value="Q" name="Type" id="rdbQ" type="radio" size="20" onclick="EnableBottom()" />Query Builder</td>

References to server code (runat=server and onserverchange event) have disappeared.

Why ????
 
I used HTML because of the onclick and onserverchange events.
That's what I have been trying to explain with server side controls - you can add attributes to a server control so that these events fire!

References to server code (runat=server and onserverchange event) have disappeared.
Because these are server side commands that the client shouldn't see!


----------------------------------------------------------------------

Need help finding an answer?

Try the search facilty ( or read FAQ222-2244 on how to get better results.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top