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> 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. Link to comment Share on other sites More sharing options...
larkante Posted May 8, 2012 Author Share Posted May 8, 2012 Ok, thanks Farshad. 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' 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. 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 ]. 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? 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. 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 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. 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. 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. Link to comment Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now