Display webpage without browser function
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
-
- Posts: 49
- Joined: Sat Nov 30, 2013 6:40 am
Display webpage without browser function
Dear all,
how do i display webpage in an image area without browser function?
regard's
Saman Sjr.
how do i display webpage in an image area without browser function?
regard's
Saman Sjr.
-
- VIP Livecode Opensource Backer
- Posts: 3901
- Joined: Sat Mar 24, 2007 2:54 am
- Location: Palo Alto
Re: Display webpage without browser function
Hi Saman,
Now this is an odd request
Are there images in the html page? Is there javascript in the page?
I'm trying to guess why you'd want a webpage as an image... Here lets waste some time together;
In Windows you do a prtSc of your browser and save it as an image.
HoHum, do I go on?
Simon
Now this is an odd request
Are there images in the html page? Is there javascript in the page?
I'm trying to guess why you'd want a webpage as an image... Here lets waste some time together;
Code: Select all
set the filename of img 1 to url("http://www.mycrazysite.com/myImage.jpg")
Code: Select all
set the htmlText of fld 1 to url("http://www.myTimeSpent.com/guessingAtTheQuestion.html")
export snapshot from fld 1....
HoHum, do I go on?
Simon
I used to be a newbie but then I learned how to spell teh correctly and now I'm a noob!
-
- Posts: 49
- Joined: Sat Nov 30, 2013 6:40 am
Re: Display webpage without browser function
Hello Simon,
maybe i'm made a wrong explanation about the browser function.
actually what i want is how to disable a link in browser object (image area).
nice to meet you Simon.
maybe i'm made a wrong explanation about the browser function.
actually what i want is how to disable a link in browser object (image area).
nice to meet you Simon.
-
- VIP Livecode Opensource Backer
- Posts: 3901
- Joined: Sat Mar 24, 2007 2:54 am
- Location: Palo Alto
Re: Display webpage without browser function
Hi Saman,
Is "on browserBeforeNavigate" what you are looking for?
If you know the URL (or part of it) then you can block it.
Simon
Is "on browserBeforeNavigate" what you are looking for?
If you know the URL (or part of it) then you can block it.
Simon
I used to be a newbie but then I learned how to spell teh correctly and now I'm a noob!
-
- Posts: 49
- Joined: Sat Nov 30, 2013 6:40 am
Re: Display webpage without browser function
Simon,
it's my first time learning about internet related stuff with livecode,
hope you can give detail example "on browserBeforeNavigate".
Kind regard's
Saman Sjr.
it's my first time learning about internet related stuff with livecode,
hope you can give detail example "on browserBeforeNavigate".
Kind regard's
Saman Sjr.
Re: Display webpage without browser function
if you look in the dictionary under browserbeforenavigate, you can see that its does what it says. The message fires before the navigation actually occurs.
Near the bottom of the dictionary entry it says this: "To prevent the navigatation from occurring, set the global variable browserCancel to true."
so, to stop navigation from happening something like this should work..
You could always check the URL of course to see if you actually want to cancel or not.
Near the bottom of the dictionary entry it says this: "To prevent the navigatation from occurring, set the global variable browserCancel to true."
so, to stop navigation from happening something like this should work..
Code: Select all
on browserbeforenavigate pInstance,pUrl
global browserCancel -- define the scope.. I think this is necessary.
put true into browserCancel -- sets the variable to true so LC knows to cancel the navigation.
end browserbeforenavigate
Re: Display webpage without browser function
So sorry but i still can not understand it clearly (((sturgis wrote:if you look in the dictionary under browserbeforenavigate, you can see that its does what it says. The message fires before the navigation actually occurs.
Near the bottom of the dictionary entry it says this: "To prevent the navigatation from occurring, set the global variable browserCancel to true."
so, to stop navigation from happening something like this should work..
You could always check the URL of course to see if you actually want to cancel or not.Code: Select all
on browserbeforenavigate pInstance,pUrl global browserCancel -- define the scope.. I think this is necessary. put true into browserCancel -- sets the variable to true so LC knows to cancel the navigation. end browserbeforenavigate
Re: Display webpage without browser function
If a user clicks on a link, before the navigation to the new URL is done, the message "browserbeforenavigate" is sent.
Say you have a page with 3 links on it. And you only want one of the links to actually do something..
If your links are:
htp://www.myurl.com/link1
htp://www.myurl.com/link2
htp://www.myurl.com/link3
And you only want link2 to work you can set things up like this..
Say you have a page with 3 links on it. And you only want one of the links to actually do something..
If your links are:
htp://www.myurl.com/link1
htp://www.myurl.com/link2
htp://www.myurl.com/link3
And you only want link2 to work you can set things up like this..
Code: Select all
on browserbeforenavigate pInstanceid, pUrl -- pInstancId is the id of the browser, pUrl is the link clicked.
if pURL is not "http://www.myurl.com/link2" then put true into browserCancel -- will cancel any link except link2
end browserbeforenavigate
-
- VIP Livecode Opensource Backer
- Posts: 9842
- Joined: Sat Apr 08, 2006 7:05 am
- Location: Los Angeles
- Contact:
Re: Display webpage without browser function
With great power comes great responsibility.
There may be many good reasons to alter the behavior of links from pages hosted on your own site, but altering the behavior of links from sites owned by others can be viewed as hijacking that link.
For example, we could open a page with a link to the user's bank, and then route the request to a page we've designed to spoof the bank to obtain the user's login credentials.
If the user discovers any form of link hijacking on their own (any differences in behavior between how a page reacts to links in your browser vs. any other browser), in these security-conscious times they may become suspicious of all URL handling within your app. Given the speed with which things flow through social media, any minor mistake can quickly become a PR nightmare.
Tread carefully.....
There may be many good reasons to alter the behavior of links from pages hosted on your own site, but altering the behavior of links from sites owned by others can be viewed as hijacking that link.
For example, we could open a page with a link to the user's bank, and then route the request to a page we've designed to spoof the bank to obtain the user's login credentials.
If the user discovers any form of link hijacking on their own (any differences in behavior between how a page reacts to links in your browser vs. any other browser), in these security-conscious times they may become suspicious of all URL handling within your app. Given the speed with which things flow through social media, any minor mistake can quickly become a PR nightmare.
Tread carefully.....
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn