Notifications
Announcements
No record found.
I've following code snippet to access http://localhost:80/testsite in IFRAME. It worked fine but as soon as I went to pass the fields value as parameter nothing get happen. I tried directly access the page from browser with parameters so page is behaving fine. I cannot figure out the things after spending a lot of time. I would like to seek your kind patience on this basic question.
http://localhost:80/testsite
code Snippet
function forwardValues(){ var ordername = Xrm.Page.getAttribute("name").getValue(); var IFrame = Xrm.Page.ui.controls.get("IFRAME_sendvalue"); var Url = IFrame.getSrc(); var params = Url.substr(Url.indexOf("?")); var param1 = Url+"?ordername="+ordername; IFrame.setSrc(param1); }
*This post is locked for comments
hi,
Iframe is just like a new window so you can pass parameter only by url querystring. Check this link can help you:
stackoverflow.com/.../how-to-pass-parameters-through-iframe-from-parent-html
Hello,
Try to use following code:
function forwardValues(){
var ordername = Xrm.Page.getAttribute("name").getValue();
var IFrame = Xrm.Page.ui.controls.get("IFRAME_sendvalue");
var Url = IFrame.getSrc();
if (Url.indexOf("?") != -1)
Url = Url.substr(0, Url.indexOf("?"));
var param1 = Url+"?ordername="+ordername;
IFrame.setSrc(param1);
}
Under review
Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.
As AI tools become more common, we’re introducing a Responsible AI Use…
We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…
These are the community rock stars!
Stay up to date on forum activity by subscribing.
SA-08121319-0 4
Calum MacFarlane 4
Alex Fun Wei Jie 2