Hello,

I have a very interesting issue that I want to solve but I need some help because I do not know if it is possible. I am using some radio buttons on my website, but instead of the user actually clicking a radio button to set it as "checked" I need to make it so that they can click on a link and it will check the radio button. Don't even ask why, it is a very silly project, but it needs to be done. Please let me know if you know how to do this. Is there any way possible to just have an if-else statement like: if(linkclicked) then set radiobutton1 = checked

If so please let me know. Thanks a lot.

Use the onclick option on a web page object to call a JS function that sets the checked value to true.

That is what I am trying to do, but my question is.....how do I set the checked value to true? Sorry I know this is very easy, but I do not know java well at all.

Would it just be like for instance: document.change.elem[0].checked = true;
???

Nevermind, I got it working. Thanks a lot!

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.