browserimage on all pages

Bringing the internet highway into your project? Building FTP, HTTP, email, chat or other client solutions?

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
AlexAdams
Posts: 38
Joined: Sat Jan 17, 2009 8:49 pm
Contact:

browserimage on all pages

Post by AlexAdams » Tue Sep 08, 2009 6:22 pm

I have been working from the InetBrowser stack provided in the browser sampler. I got the provided stack modified to my liking. When I try to reproduce the card in another stack, the new card works fine, but the browserimage is appearing on all cards in the stack.

I don't have a clue as to why this is occurring.

Any ideas?

Thanks,
Alex Adams
(a)2 Technology Parnters
alex@a2technology.com
www.a2technology.com
www.promisstudio.com
831-726-8013

Janschenkel
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 977
Joined: Sat Apr 08, 2006 7:47 am
Contact:

Post by Janschenkel » Tue Sep 08, 2009 8:06 pm

Hi Alex,

The 'browser' external control is a special and sometimes tricky pet to tame. In fact, what happens is that a browser is 'overlaid' on top of the stack window; but it doesn't know when you switch cards, that it should hdie itself, so that's your job; put something like this in the card script of the card where you want the browser to show:

Code: Select all

local sBrowserId

on openCard
  if sBrowserId is empty then
    put revBrowserOpen(the windowid of this stack, "about:blank") into sBrowserId
    -- finish setting up the rect etc.
  else
    revBrowserSet sBrowserId, "visible", "true"
  end if
end openCard

on closeCard
  if sBrowserId is not empty then
    revBrowserSet sBrowserId, "visible", "false"
  end if
end closeCard
This way, the first time the card is opened, the browser is setup and initialized; when you leave the card, it is hidden, and when you come back, it is shown once again.

HTH,

Jan Schenkel.
Quartam Reports & PDF Library for LiveCode
www.quartam.com

AlexAdams
Posts: 38
Joined: Sat Jan 17, 2009 8:49 pm
Contact:

Thanks Jan

Post by AlexAdams » Tue Sep 08, 2009 9:44 pm

Thank you. That is what I needed to know.
Alex Adams
(a)2 Technology Parnters
alex@a2technology.com
www.a2technology.com
www.promisstudio.com
831-726-8013

Post Reply