You need to sign in to do that
Don't have an account?
Prakash@SFDC
document.getElementById not working
I am trying to access the radio button value in JScript using
var h = document.getElementById("{!$Component.wizpage.wizardForm.agmtInfo.ContractDetailsSec.whoSignFirstSection.whoSignFirstId}").value;
alert(h);
I am getting undefined . What might be the issue ? Please give some idea .
1. i am using proper id values while accessing .
2. There is no JavaScript error .
Many Thanks in Advance
Prakash
i.e.
alert("{!$Component.wizpage.wizardForm.agmtInfo.ContractDetailsSec.whoSignFirstSection.whoSignFirstId}");
Hi,
I think the Id of the component which you are referring might have changed , If there are any page block , page block sections their ID's also will be prefixed to the component which you are referring. Please check the Id of the component in the 'View Page Source' section.
Regards,
Sridhar Bonagiri
Well the DOM might not have fully rendered when your JavaScript executes.
You can try:
1. Putting the JavaScript at the bottom of the page
Like this:
OR
2. Use a what ever solution works for you when you google "Javascript for when dom is ready"