Source language: Translate to:

Webobject issue

General questions about NeoBook

Moderator: Neosoft Support

Re: Webobject issue

Postby fkapnist » Tue Dec 30, 2014 10:19 am

..
Last edited by fkapnist on Tue Dec 30, 2014 10:25 am, edited 1 time in total.
User avatar
fkapnist
 
Posts: 348
Joined: Mon Nov 17, 2014 4:24 pm
Location: Greece

Re: Webobject issue

Postby fkapnist » Tue Dec 30, 2014 10:24 am

Gaev wrote:fkapnist:
Not working... Everything that finishes downloading returns a "Done" value, including iframe ads

If it does not work for a particular web page content, go back to the basics i.e. capture the [WebBrowser1Addr] values at each event trigger ... then examine the values to determine best way to capture desired url (or post the log of all captured url values here).



The Status data is correct, but the Address goes haywire....


ADDRESS

User avatar
fkapnist
 
Posts: 348
Joined: Mon Nov 17, 2014 4:24 pm
Location: Greece

Re: Webobject issue

Postby Neosoft Support » Tue Dec 30, 2014 11:42 am

Try adding this to your browser's Navigate Complete action:

Code: Select all
BrowserExecScript "WebBrowser1" "window.external.nbSetVar('BrowserURL',document.URL);" "JScript"


This sets a NeoBook variable called [BrowserURL] to the current page URL. (You can change the variable name if you like.)
NeoSoft Support
Neosoft Support
NeoSoft Team
 
Posts: 5593
Joined: Thu Mar 31, 2005 10:48 pm
Location: Oregon, USA

Re: Webobject issue

Postby fkapnist » Sat Jan 03, 2015 9:43 am

Neosoft Support wrote:Try adding this to your browser's Navigate Complete action:

Code: Select all
BrowserExecScript "WebBrowser1" "window.external.nbSetVar('BrowserURL',document.URL);" "JScript"


This sets a NeoBook variable called [BrowserURL] to the current page URL. (You can change the variable name if you like.)


Bravo! A month of hair-pulling solved with a snippet of code... My browser project Address Bar is "TextEntry1" And both of the following work:

BrowserExecScript "WebBrowser1" "window.external.nbSetVar('BrowserURL',document.URL);" "JScript"
SetObjectCaption "TextEntry1" "[BrowserURL]"


----------------------------
BrowserExecScript "WebBrowser1" "window.external.nbSetVar('BrowserURL',document.URL);" "JScript"
SetVar "[TextEntry1]" "[BrowserURL]"


----------------------------

Which would be best to finally use in my PUB?

:?:
.
User avatar
fkapnist
 
Posts: 348
Joined: Mon Nov 17, 2014 4:24 pm
Location: Greece

Re: Webobject issue

Postby Neosoft Support » Mon Jan 05, 2015 11:54 am

Both do essentially the same thing, but you could cut the code down to a single like like this:

Code: Select all
BrowserExecScript "WebBrowser1" "window.external.nbSetVar('TextEntry1',document.URL);" "JScript"
NeoSoft Support
Neosoft Support
NeoSoft Team
 
Posts: 5593
Joined: Thu Mar 31, 2005 10:48 pm
Location: Oregon, USA

Previous

Return to General NeoBook Discussions

Who is online

Users browsing this forum: No registered users and 1 guest