Login ProductsSalesSupportDownloadsAbout |
Home » Technical Support » Elevate Web Builder Technical Support » Support Forums » Elevate Web Builder General » View Thread |
Messages 1 to 10 of 11 total |
TPage question |
Sun, Jan 27 2013 9:36 AM | Permanent Link |
Uli Becker | Hi,
in order to get the title of a website that I launch in a TPage control, I want to read the HTML of the site: <code> Memo1.lines.text := page1.documenttext; </code> I get this error: Uncaught TypeError: Cannot read property 'documentElement' of null In the js-file the error occurs here: <code> webctrls_tpage.$p.tpage_getdocumenttext = function() { var $t = this, $r; if ($t.tpage_floaded) $r = $t.tpage_fframe.contentDocument.documentElement.innerHTML; <------------ else $r = ""; return $r; }; </code> Any idea? Thanks Uli |
Sun, Jan 27 2013 4:47 PM | Permanent Link |
Uli Becker | Obviously I am not allowed to do so because of SOP.
|
Mon, Jan 28 2013 3:46 PM | Permanent Link |
Tim Young [Elevate Software] Elevate Software, Inc. timyoung@elevatesoft.com | Uli,
<< Obviously I am not allowed to do so because of SOP. >> Yep, security restriction. Tim Young Elevate Software www.elevatesoft.com |
Tue, Jan 29 2013 3:06 AM | Permanent Link |
Uli Becker | Tim,
> Yep, security restriction. OK, I see. So there is no way to get the current URL from a TPage control when the user navigates to another webiste within the frame? How does TinyURL do it? They use a script like this: javascript:void(location.href='http://tinyurl.com/create.php?url='+encodeURIComponent(location.href)) Sorry, if I ask silly questions: I am not that good in web-programming. Thanks Uli |
Fri, Feb 1 2013 4:53 PM | Permanent Link |
Tim Young [Elevate Software] Elevate Software, Inc. timyoung@elevatesoft.com | Uli,
<< So there is no way to get the current URL from a TPage control when the user navigates to another webiste within the frame? >> There is (WebDOM - THTMLFrameElement.src), but I'll have to add it to the TPage. If you have any other questions, please let me know. Tim Young Elevate Software www.elevatesoft.com |
Sat, Feb 2 2013 4:34 AM | Permanent Link |
Uli Becker | Tim,
> There is (WebDOM - THTMLFrameElement.src), but I'll have to add it to > the TPage. That would be really great. Please add it... Regards Uli |
Sun, Feb 3 2013 1:01 PM | Permanent Link |
Uli Becker | Tim,
> There is (WebDOM - THTMLFrameElement.src), but I'll have to add it to > the TPage. I changed WebCtrls like this: <code> TPage = class(TControl) private ... FSource: String; function GetSource: String; public ... property Source: String read GetSource; function TPage.GetSource: String; begin result := FFrame.src; end; </code> But FFrame.src returns the same as TPage.URL - if I navigate to another URL within the frame, FSource doesn't change. Actually it doesn't seem to be possible at all to get the current URL of a frame because of the SOP. Regards Uli |
Mon, Feb 4 2013 11:43 AM | Permanent Link |
Tim Young [Elevate Software] Elevate Software, Inc. timyoung@elevatesoft.com | Uli,
<< But FFrame.src returns the same as TPage.URL - if I navigate to another URL within the frame, FSource doesn't change. >> Are you looking at in in the OnLoad event or later ? << Actually it doesn't seem to be possible at all to get the current URL of a frame because of the SOP. >> It's always possible - it's completely up to the browser vendor/org to determine how they want things to work. Tim Young Elevate Software www.elevatesoft.com |
Mon, Feb 11 2013 5:42 PM | Permanent Link |
Uli Becker | Tim,
> Are you looking at in in the OnLoad event or later ? I tried both. The URL is always the same. Uli |
Tue, May 28 2013 11:57 AM | Permanent Link |
Matthew Jones | Did this ever get resolved? I really need this too, for a much better user
experience. I can see that the Chrome iFrame has a #properties element, and that knows the URL. Happy to hack it is appropriate, but my aim is to allow the user to store the URLs they are at. /Matthew Jones/ |
Page 1 of 2 | Next Page » | |
Jump to Page: 1 2 |
This web page was last updated on Friday, December 6, 2024 at 05:39 PM | Privacy PolicySite Map © 2024 Elevate Software, Inc. All Rights Reserved Questions or comments ? E-mail us at info@elevatesoft.com |