larkante Posted May 8, 2012 Share Posted May 8, 2012 How to get the contents of a UniUrlFrame? I just need a text that is in the body. Ex.: <html> <body> This text </body> </html> Quote Link to comment Share on other sites More sharing options...
Administrators Farshad Mohajeri Posted May 8, 2012 Administrators Share Posted May 8, 2012 MainForm.UniURLFrame1.getEditorBody().innerHTML You can use above script but it will not work if frame loads an external URL. Browser security restrictions prevent that. Quote Link to comment Share on other sites More sharing options...
larkante Posted May 8, 2012 Author Share Posted May 8, 2012 Ok, thanks Farshad. Quote Link to comment Share on other sites More sharing options...
larkante Posted May 9, 2012 Author Share Posted May 9, 2012 MainForm.UniURLFrame1.getEditorBody().innerHTML You can use above script but it will not work if frame loads an external URL. Browser security restrictions prevent that. I need to put a clause in the uses? Why not appear .getEditorBody().innerHTML here. I receive the error [DCC Error] Main.pas(55): E2003 Undeclared identifier: 'getEditorBody' Quote Link to comment Share on other sites More sharing options...
Administrators Farshad Mohajeri Posted May 10, 2012 Administrators Share Posted May 10, 2012 I need to put a clause in the uses? Why not appear .getEditorBody().innerHTML here. I receive the error [DCC Error] Main.pas(55): E2003 Undeclared identifier: 'getEditorBody' It is JS script not pascal code. Use it inside a client event. See one of our Client Event demos. Quote Link to comment Share on other sites More sharing options...
larkante Posted June 11, 2012 Author Share Posted June 11, 2012 It is JS script not pascal code. Use it inside a client event. See one of our Client Event demos. Im receiving the error in Google Chrome [uncaught TypeError: Cannot call method 'getEditorBody' of undefined ]. Quote Link to comment Share on other sites More sharing options...
Administrators Farshad Mohajeri Posted June 11, 2012 Administrators Share Posted June 11, 2012 What does your complete code look like? Quote Link to comment Share on other sites More sharing options...
larkante Posted June 11, 2012 Author Share Posted June 11, 2012 I put the code in the uniurlframe1 clientevent onmouseover function Onmouseover(sender) { MainForm.UniURLFrame1.getEditorBody().innerHTML; } Then in chrome appear the error. Quote Link to comment Share on other sites More sharing options...
Administrators Farshad Mohajeri Posted June 12, 2012 Administrators Share Posted June 12, 2012 Probably because you don't have a component named: UniURLFrame1 Quote Link to comment Share on other sites More sharing options...
larkante Posted June 12, 2012 Author Share Posted June 12, 2012 Probably because you don't have a component named: UniURLFrame1 Component is in MainForm. Complicated. I'll try it another way. Tired of the iframe. Quote Link to comment Share on other sites More sharing options...
Administrators Farshad Mohajeri Posted June 12, 2012 Administrators Share Posted June 12, 2012 I can't reproduce in Chrome. Send a test case please. Quote Link to comment Share on other sites More sharing options...
larkante Posted June 13, 2012 Author Share Posted June 13, 2012 I managed with this code: window.frames["iframe_UniURLFrame1"].document.getElementById("divtext").innerHTML; Thanks. 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.