I want to enter url in field & have browser open in graphic
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
-
madamefeemy
- Posts: 3
- Joined: Sat Apr 25, 2015 6:53 am
I want to enter url in field & have browser open in graphic
I would like to be able to type a url into a field, press enter, and have the specified url pop up in a specified region of the screen. Any advice or direction to instructions on this topic would be much appreciated.
Thanks!
Thanks!
Re: I want to enter url in field & have browser open in grap
Hi,
What have you tried so far?
Here's an example:
Kind regards,
Mark
What have you tried so far?
Here's an example:
Code: Select all
put revOpenBrowser(the windowID of this stack,fld "Url") into gBrowserID
if gBrowserID is an integer then
revBrowserSet gBrowserID,"rect",the rect of grc "My Graphic"
else
beep
answer error gBrowserID
put empty into gBrowserID
end ifMark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode
Re: I want to enter url in field & have browser open in grap
If you open the Resource Centre from the menu bar in the LiveCode IDE (or whatever alternative method) if you expand the Tutorials section with the disclosure triangle, and the same with the Internet section, you will see a Browser Sampler, which you can investigate and make sure you have understood what Mark said.
-
madamefeemy
- Posts: 3
- Joined: Sat Apr 25, 2015 6:53 am
Re: I want to enter url in field & have browser open in grap
Thank you for the replies!
Re: Mark
I made a card with a field named "Url" and graphic named "My Graphic." Then, I tried putting the code you suggested into the code of the overcall card (I'm not sure what the proper term is - I just mean the window when no specific buttons or fields are selected).
But nothing happened. I'm definitely not doing something correctly, but I'm not sure what. Am I supposed to input this as the code for the field, or for the overall card?
Re: SparkOut
I tried playing around with the sample browser, but when I looked at the code of the url bar/field, it said the following
I'm not sure what "abLoadURL me" means, nor how this directs the website to display in a specific graphic. The code of the overcall card has nothing input either.
Re: Mark
I made a card with a field named "Url" and graphic named "My Graphic." Then, I tried putting the code you suggested into the code of the overcall card (I'm not sure what the proper term is - I just mean the window when no specific buttons or fields are selected).
Code: Select all
put revOpenBrowser(the windowID of this stack,fld "Url") into gBrowserID
if gBrowserID is an integer then
revBrowserSet gBrowserID,"rect",the rect of grc "My Graphic"
else
beep
answer error gBrowserID
put empty into gBrowserID
end ifRe: SparkOut
I tried playing around with the sample browser, but when I looked at the code of the url bar/field, it said the following
Code: Select all
on returnInField
gourl
end returnInField
on enterInField
gourl
end enterInField
on gourl
abLoadURL me
end gourlRe: I want to enter url in field & have browser open in grap
Hi Madamefeemy,
I suggest you read the documentation, the tutorials, the lessons and perhaps my book.
Regarding programming, start with making a new button on a card of a stack and give it the following script:
That should give you a minimal understanding of how things work and hopefully enough to know what to look for in the documentation.
Kind regards,
Mark
I suggest you read the documentation, the tutorials, the lessons and perhaps my book.
Regarding programming, start with making a new button on a card of a stack and give it the following script:
Code: Select all
on mouseUp
answer "Hello World"
end mouseUpKind regards,
Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode
