If you enter :
view-source:http://www.neosoftware.com/ in the browser address bar, it works with Chrome, Firefox and Opera, but not Edge or IE11. Why is view source not allowed by Microsoft? All you get with a right click is a small "developer" window that makes it difficult to copy code. What is the easiest way with Neobook for a user to get the source code of the current page?
.
view-source
Moderator: Neosoft Support
Re: view-source
fkapnist:
BrowserExport "WebBrowser1" "What is the easiest way with Neobook for a user to get the source code of the current page
Code: Select all
"
or
InternetGet "[Webbrowser1Addr]" "[Result]"
Re: view-source
Gaev wrote:fkapnist:BrowserExport "WebBrowser1" "What is the easiest way with Neobook for a user to get the source code of the current pageCode: Select all
" or InternetGet "[Webbrowser1Addr]" "[Result]"[/quote] Thanks Gaev. Since I am in Europe most of the pages are foreign language UTF-8 encoded. This doesn't work at all: [b]InternetGet "[WebBrowser1Addr]" "[Result]" ""[/b] It produces error message: [b]"the parameter is incorrect."[/b] But this does work: [b] BrowserExport "WebBrowser1" "[Code]"[/b] But if I try to view the result in Neobook it struggles and takes a long time and finally displays garbled text. However if I save it to file I can open it in Notepad [b]FileWrite "[PubDir]Test.txt" "All" "[Code]"[/b] I guess I will have to create a source code reader outside of Neobook. But how? Maybe I can do it with NeoAppBuilder HTML and display it in a Neobook webBrowser object :?: :?: .
Re: view-source
Most browsers give you a "page details" window with an uninteresting display:
I am going to include a "formatted view" like you see in Facebook and Twitter. I think that extra mile makes all the difference.
I am going to include a "formatted view" like you see in Facebook and Twitter. I think that extra mile makes all the difference.
Re: view-source
fkapnist:
... to see what was being messed up ?
In an earlier post you said ...
Did you try ...Since I am in Europe most of the pages are foreign language UTF-8 encoded.
This doesn't work at all:
InternetGet "[WebBrowser1Addr]" "[Result]" ""
It produces error message: "the parameter is incorrect."
Code: Select all
AlertBox "WebBrowser1Addr" "[WebBrowser1Addr]"
InternetGet "[WebBrowser1Addr]" "[Result]" ""
... not surprising since NeoBook does NOT do UTF-8.But this does work:
BrowserExport "WebBrowser1" "[ code]"
But if I try to view the result in Neobook it struggles and takes a long time and finally displays garbled text.
How about ...However if I save it to file I can open it in Notepad
FileWrite "[PubDir]Test.txt" "All" "[ code]"
I guess I will have to create a source code reader outside of Neobook. But how?
Code: Select all
Run "[PubDir]Test.txt" "" "options" "subroutine" "variable"
In an earlier post you said ...
I read that it was done for security reasons.view-source:http://www.neosoftware.com/ in the browser address bar, it works with Chrome, Firefox and Opera, but not Edge or IE11. Why is view source not allowed by Microsoft?
According to this page ... http://stackoverflow.com/questions/1367 ... m-the-page ... you might be able to use outerHTML ... so you could do a BrowserExecScript that uses outerHTML to store the content in a (javascript) variable ... followed by one of the encoding scripts discussed in an earlier topic.What is the easiest way with Neobook for a user to get the source code of the current page?
Re: view-source
Yes, I will save the source code to a variable and then display it in a webBrowser object using javascript. But I want the source code to have different colors for particular strings like function, or style, etc.Gaev wrote:BrowserExecScript that uses outerHTML to store the content in a (javascript) variable.
I noticed that Neobook "BrowserExport" can store UTF-8 source code as a variable, but Neobook cannot directly display it....
Re: view-source
fkapnist:
You would run it inside an HTML document ... within a WebBrowser object or standalone Browser Tab
Good hunting.
Take a look at ... http://alexgorbatchev.com/SyntaxHighlighter/ ... demo at http://alexgorbatchev.com/SyntaxHighlig ... nual/demo/But I want the source code to have different colors for particular strings like function, or style, etc.
You would run it inside an HTML document ... within a WebBrowser object or standalone Browser Tab
Good hunting.
Re: view-source
Gaev wrote:fkapnist:
Take a look at ... http://alexgorbatchev.com/SyntaxHighlighter/ ... demo at http://alexgorbatchev.com/SyntaxHighlig ... nual/demo/But I want the source code to have different colors for particular strings like function, or style, etc.
You would run it inside an HTML document ... within a WebBrowser object or standalone Browser Tab
Good hunting.
Thanks, I finally used the gorbatchev highlighter....