larkante Posted May 8, 2012 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
Administrators Farshad Mohajeri Posted May 8, 2012 Administrators 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
larkante Posted May 9, 2012 Author 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
Administrators Farshad Mohajeri Posted May 10, 2012 Administrators 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
larkante Posted June 11, 2012 Author 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
Administrators Farshad Mohajeri Posted June 11, 2012 Administrators Posted June 11, 2012 What does your complete code look like? Quote
larkante Posted June 11, 2012 Author 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
Administrators Farshad Mohajeri Posted June 12, 2012 Administrators Posted June 12, 2012 Probably because you don't have a component named: UniURLFrame1 Quote
larkante Posted June 12, 2012 Author 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
Administrators Farshad Mohajeri Posted June 12, 2012 Administrators Posted June 12, 2012 I can't reproduce in Chrome. Send a test case please. Quote
larkante Posted June 13, 2012 Author Posted June 13, 2012 I managed with this code: window.frames["iframe_UniURLFrame1"].document.getElementById("divtext").innerHTML; Thanks. Quote
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.