I want to reset the source to an IFrame name pricingrequest in a component name ShowDataComponent I am using the following on a button:
<iframe id="pricingrequest" width="500" height="600" src=>
<button class="slds-button slds-button_icon slds-float_none slds-button_icon slds-button_icon-small" title="Edit this Field" onclick="document.getElementById('pricingrequest').src='https://te--LightExp.cs54.my.salesforce.com/apex/TestPage2'; return false">
This is returning a null id therefore not resetting the src. how can i fix this?
Edit: The component has an iframe which opens the VF page, the VF page has the button to reload the iframe. Could this be the issue? Is this possible to do another way?