Web browser in another card

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller

Post Reply
saviour
Posts: 26
Joined: Wed Feb 05, 2014 5:11 am

Web browser in another card

Post by saviour » Tue Feb 11, 2014 2:57 pm

How can i set up that click in button in one card open web page in another card??

Script in button on card1 as follows:

on mouseUp
go to card "card2"
set the yURL of card "card2" to ".................." (weburl goes here, i dont have permission to post links}
end mouseUp

But something is not working..Anyone help me out please :D !!!!
Last edited by saviour on Fri Feb 21, 2014 12:48 pm, edited 1 time in total.

Klaus
Posts: 14199
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: Web browser in another card

Post by Klaus » Tue Feb 11, 2014 3:10 pm

Hi Saviour,

1. welcome to the forum! :D

2. you are setting a custom property correctly:
...
set the yURL of card "card2" to ....
## Will set the custom property named "yURL" of card "card2" to a value
...

BUT you are not querying/using that custom property, but treat the cp like it is a VARIABLE, which it is NOT!
Script of cd "card2":
...
## Put the Custom property into a varaible and use that:
put the yURL of this cd into tURL
put revbrowseropen(the windowid of this stack, tURL) into tBrowserId
...

Or use it directly:
...
put revbrowseropen(the windowid of this stack, the yURL of this cd) into tBrowserID
...


Best

Klaus

saviour
Posts: 26
Joined: Wed Feb 05, 2014 5:11 am

Re: Web browser in another card

Post by saviour » Tue Feb 11, 2014 3:42 pm

Thanks, It worked. Really appreciated.
Last edited by saviour on Tue Feb 11, 2014 5:23 pm, edited 1 time in total.

Klaus
Posts: 14199
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: Web browser in another card

Post by Klaus » Tue Feb 11, 2014 4:18 pm

Hi Savior,
saviour wrote:Now I want to create a back button. what will be script to close the browser and go back on the previous card??? :D
well, you found "revbrowseropen", will you also find "revbrowserclose"? 8)

Hm, you know how to:
...
go cd "card2"
...
Will you also find out how to go to another card?
You get the picture! :D

Hint:
Look up all terms in the dictionary, there are also always cossreference links and "See also"s!


Best

Klaus

Post Reply