RadioButtonList remove all contents and refill using java script
using Java script
I am trying to remove all contents of RadioButtonList and refill it with another items
is there away
I appreciate it if someone helps
ASP.NETJavaScript
Last Comment
Salah a a a Al Jasem
8/22/2022 - Mon
Salah a a a Al Jasem
ASKER
Thanks for the help
what is JavaScript T/A added?
Julian Hansen
Do you want to do this on the server (as part of your ASP.Net code) or on the client in JavaScript?
Salah a a a Al Jasem
ASKER
Thanks Mr Julian
I am a very old customer of this forum. In the past there was not exact classifications to some of my questions (or maybe I could not find them).
As a result - topics to me is to invite people that my question is related to subjects within a specific range of fields not within an exact field.
Java
Javascript
asp
html
The last four classifications are in one field, so experts of Java is expected to be experts in html and javascript and asp, That is why I am not specific in selecting the exact class.
I will try next time to be more exact is picking topics.
Returning to my question- The needed code is to be done on the client browser in order to avoid post back delay.
Returning to my question- The needed code is to be done on the client browser in order to avoid post back delay.
I am trying to understand why you want to do t his. If you don't want the radiolist then why render it in the first place.
Assuming there is a valid reason for this -can you show us the rendered code (HTML not the ASP code) and highlight what it is you want to do with that code.
If this is clientside and we need to work with JavaScript we need to work with the Browser version of the site - not the ASP code behind it.
Salah a a a Al Jasem
ASKER
Assume Listbox that contains 1000 items
Assume there are 28 button each with a letters,
If visitor clicks on one button, then list of names that start with picked letter appears in RadioButtonList
if visitor wants to know more about one of RadioButtonList item then he clicks on one RadioButtonList item
So RadioButtonList must be continuously changing as the visitor changes the letter
On the site there are many classifications letters, colors, subjects, ....
Julian Hansen
Can you show me want a rendered RadioButtonList looks like - I need to see the html to link the JavaScript to.
If possible strip down the code to just the radio list (for now) if you have a large page posting the whole thing could make it difficult to find what we are looking for.
Right click the lists - go to console and right click - copy - copy outer html
For each item you want to modify.
Post that here
Julian Hansen
Alternatively - if you have a link OR can setup a Fiddle or similar that would be better.
Salah a a a Al Jasem
ASKER
Before I post this question I have made too many experiments and changed
I will waste time trying to get a reasonable render
Without html it is very difficult to see what is going on.
I need to see how a RadioButtonList is rendered. You are trying to access the options property on the element - but I am guessing that the ListBox is implemented as a <select> (which has an options property) and a RadioButtonList is not.
Please provide a working link or some HTML so we can see what is going on.
Salah a a a Al Jasem
ASKER
The following is part of the render of adding items to radiobuttonlist
what is JavaScript T/A added?