andyhill Posted September 2, 2021 Share Posted September 2, 2021 TopHtmlFrame contains <img id='01' TopHtmlFrame contains script markTop LeftHtmlFrame contains <img id='01' LeftHtmlFrame contains script markLeft UniSession.AddJS(markTop("01"); works as expected UniSession.AddJS(markLeft("01"); ACCESSES TopHtmlFrame <img id='01' I have tried UniSession.AddJS('markLeft("01")'); I have tried UniSession.AddJS('fMain.LeftHTMLFrame.JSName.markLeft("01")'); I have tried LeftHTMLFrame.JSInterface.JSCode('markLeft("01")'); I have tried ' function markLeft(id) '+ ' { '+ ' var img = document.getElementById(id); '+ ' if (!img) {return null} '+ ' img.style.border = "3px solid red"; '+ ' } '+ I have tried ' function markLeft(id) '+ ' { '+ ' var img = sender.document.getElementById(id); '+ ' if (!img) {return null} '+ ' img.style.border = "3px solid red"; '+ ' } '+ I have tried ' function markLeft(id) '+ ' { '+ ' var img = fMain.LeftHTMLFrame.JSName.document.getElementById(id); '+ ' if (!img) {return null} '+ ' img.style.border = "3px solid red"; '+ ' } '+ Please advise - thanks in advance Quote Link to comment Share on other sites More sharing options...
Sherzod Posted September 2, 2021 Share Posted September 2, 2021 Hello, You must assign unique IDs. Quote Link to comment Share on other sites More sharing options...
andyhill Posted September 2, 2021 Author Share Posted September 2, 2021 Yes I knew that was a work around but can you please explain in detail why the cross linking ? Quote Link to comment Share on other sites More sharing options...
Sherzod Posted September 2, 2021 Share Posted September 2, 2021 https://www.w3schools.com/html/html_id.asp Quote Link to comment Share on other sites More sharing options...
irigsoft Posted September 2, 2021 Share Posted September 2, 2021 Hello, this topics maybe will help to You: And try this: ' function markLeft(id) '+ ' { '+ ' var img = document.getElementById(' + YouFrame.JSid + '); '+ ' if (!img) {return null} '+ ' img.style.border = "3px solid red"; '+ ' } '+ Quote Link to comment Share on other sites More sharing options...
andyhill Posted September 3, 2021 Author Share Posted September 3, 2021 Thanks for the id info Sherzod. Note to Sherzod, HtmlFrame Ext Ajax Event AfterRender ONLY FIRES ONCE (I believe it should fire after every EndUpdate). Quote Link to comment Share on other sites More sharing options...
irigsoft Posted September 3, 2021 Share Posted September 3, 2021 @andyhill, I apologize for my curiosity, but did my example help, just for information? Quote Link to comment Share on other sites More sharing options...
Sherzod Posted September 3, 2021 Share Posted September 3, 2021 1 hour ago, andyhill said: HtmlFrame Ext Ajax Event AfterRender ONLY FIRES ONCE Yes, correct. 1 hour ago, andyhill said: I believe it should fire after every EndUpdate No. Quote Link to comment Share on other sites More sharing options...
andyhill Posted September 3, 2021 Author Share Posted September 3, 2021 BeginUpdate Clear Add EndUpdate (causes HtmlFrame to ReRender its's contents). Quote Link to comment Share on other sites More sharing options...
andyhill Posted September 3, 2021 Author Share Posted September 3, 2021 IrigSoft, I had already coded my work around (unique id's across ALL HtmlFrames [I foolishly believed they were unique frames/js]) but definitely will review your suggestion over time - thank you. Quote Link to comment Share on other sites More sharing options...
irigsoft Posted September 3, 2021 Share Posted September 3, 2021 58 minutes ago, andyhill said: IrigSoft, I had already coded my work around (unique id's across ALL HtmlFrames [I foolishly believed they were unique frames/js]) but definitely will review your suggestion over time - thank you. Thank You. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.