Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Controlling Initial Conditions

1 view
Skip to first unread message

James Bowman

unread,
Nov 17, 2009, 10:29:29 AM11/17/09
to
The pop-up blocker in Internet Exporer 8 is causing a problem at my website.
The website is a Toolbook 10 piece running in DHTML. I use Toolbook rather
than FrontPage because Toolbook displays the graphics more quickly.

When the user goes to my web site, an index.html file runs and routes the
user to my Toolbook piece (call it book 1). This router file is not a part
of a book. As book 1 begins, a startup sequence runs (the code is in the
on-load page event).

Book 1 contains a link to book 2. Since book 2 runs full screen, it uses
pop-up mode. When the user clicks the link, the pop-up blocker displays,
the user clicks "allow pop-ups" and IE 8 returns control to the current html
page (book 1) rather than running book 2. This behavior is a constraint in
IE 8. Since control was returned to book 1, the start-up sequence for book
1 runs again. I would like to prevent this startup sequence from running a
second time.

I think that I need to differentiate between two conditions. In condition
1, book 1 is started from the router file, index.html. In that condition,
the startup sequence should run. In condition 2, book 1 is started by the
user clicking "allow pop-ups". In this condition, the startup sequence
should not run.

Is there a way to differentiate between the two conditions and use the
information to control how book 1 starts?

Thanks.

Jim

James Bowman Associates

701 Canterbury Drive
Appleton, WI 54915
Phone: 800-731-7488
Fax: 920-731-7193
ja...@jbassoc.biz

Clifton Sleger

unread,
Nov 17, 2009, 10:40:20 AM11/17/09
to
Hi James,

Maybe write a cookie that contains the conditional information and then
delete the cookie after the whole process is successful.

Clifton
PG Software Development

Give the JavaScript PowerPac for ToolBook a test drive!
A 12 day free trial can be downloaded by visiting the tutorials here:
http:\\www.pgsoftwaretools.com\tutorials\index.html?nav=features
The current version is 8.26 and includes a number of refined and added
functions.

Jim Bowman

unread,
Nov 17, 2009, 1:07:48 PM11/17/09
to
If I could start book 1 at page 2 after the flow goes through the router
file, index.html, I could change the start-up conditions. The router file
contains this code:

<SCRIPT language="JavaScript">
<!--
if (screen.height>=768)
{
window.location="main-xga/index.html";
}
else
{
window.location="main-svga/index.html";
}
//-->
</SCRIPT>

Is it possible to start the book main-xga at page 2 rather than page 1?

Jim

Clifton Sleger

unread,
Nov 17, 2009, 1:13:31 PM11/17/09
to
Use
path/index.html#p2
"p2" is the page id as reported by toolbook. In other words page 2 of
the book may not be page id 2. Whichever id is assigned page 2 of your
book is the value to use to start the book on page 2.

Clifton
PG Software Development

Give the JavaScript PowerPac for ToolBook a test drive!
A 12 day free trial can be downloaded by visiting the tutorials here:
http:\\www.pgsoftwaretools.com\tutorials\index.html?nav=features
The current version is 8.26 and includes a number of refined and added
functions.

Jim Bowman

unread,
Nov 17, 2009, 4:48:18 PM11/17/09
to
Thank you Clifton. I would rather not use a cookie because some browsers
might not permit them.

I had hoped that starting book 1 on an alternative page would work but the
pop-up blocker, after pop-ups are allowed, restarts the book on the
alternative page.

Maybe my best option is to detect the pop-up blocker and display a message
telling the user what to do. Do you have any javascript for detecting a
pop-up blocker?

Thanks for the help.

Jim

Clifton Sleger

unread,
Nov 17, 2009, 7:02:36 PM11/17/09
to
Hi James,

Another option is to open your second book in an iframe embedded in your
first file. Iframes are unaffected by popup blockers. That is why even
with the blocker turned on you can still visit web pages that torment
you with popups. These are essentially iframe elements.

Clifton
PG Software Development
Oshkosh, WI

Give the JavaScript PowerPac for ToolBook a test drive!
A 12 day free trial can be downloaded by visiting the tutorials here:
http:\\www.pgsoftwaretools.com\tutorials\index.html?nav=features
The current version is 8.26 and includes a number of refined and added
functions.

Jim Bowman

unread,
Nov 18, 2009, 11:13:10 AM11/18/09
to
Book 1 (my web site) runs inside the browser. The user clicks a link in
book 1 that runs book 2 full screen. Since book 2 is a demo, I want it to
run full screen with no browser toolbars visible.

If I actuate book 2 through an iframe embedded in book 1, then book 2 will
run inside the browser, right?

Jim

Clifton Sleger

unread,
Nov 18, 2009, 1:17:43 PM11/18/09
to
Jim,

I believe the answer to your question is true. Maybe what you want is to
run a native book through neuron, which can be called from "book 1". If
you use the iframe solution, the only way to make it fullscreen is to
prompt the user to press F11, which isn't really so bad either.

Clifton Sleger
PG Software Development

Give the JavaScript PowerPac for ToolBook a test drive!
A 12 day free trial can be downloaded by visiting the tutorials here:
http:\\www.pgsoftwaretools.com\tutorials\index.html?nav=features
The current version is 8.26 and includes a number of refined and added
functions.

Jim Bowman

unread,
Nov 18, 2009, 1:38:11 PM11/18/09
to
Thanks again for the help Clifton. I don't want to ask the user to
download neuron. For now, I'm going to display a message, if the pop-up
blocker is enabled, that's instructs the user on what to do.

Perhaps Microsoft will eventually modify IE so it starts pop-ups
immediately after the user allows them.

Jim

0 new messages