Closed
Bug 6222
Opened 26 years ago
Closed 26 years ago
M5: page turn function on preso template fails to load new page, progress bar spins forever
Categories
(Core :: DOM: UI Events & Focus Handling, defect, P3)
Tracking
()
People
(Reporter: ekrock, Assigned: joki)
References
()
Details
[It would be *really* helpful for marketing if we could get this fixed for M6,
as this is a stopper preventing marketing from using the DHTML preso
template within Nav5 in live presentations and online.]
In M5:
1) Open URL
2) Click upper right edge of page (it's the right-side frame, which has a
transparent GIF).
This should cause the center content frame to "turn page" to the next preso
slide, but the progress bar spins forever and the next page is never loaded.
Repeat in Nav4 or IE5 and it works fine.
Details:
1) The right frame you're clicking is the document
http://blues/users/ekrock/publish/bugs/M5/nav5hack/basefile/Next.htm
... which has a transparent spacer GIF with an onclick event handler that should
"turn" the center content page to the next page, and here is the HTML markup for
Next.htm:
-----------------------------------
<html><head><title>header</title>
<SCRIPT LANGUAGE="JavaScript"
SRC="navbar.js">
</SCRIPT>
</head>
<!-- removed to test bugfix: onLoad="goto_slide(1)" -->
<BODY bgcolor="#FFFFFF">
<CENTER>
<A HREF="javascript:next_slide();">
<IMG SRC="spacer.gif" hspace=0 vspace=0 border=0 height=350 width=66>
</A>
<!-- we'd like to push the following elements lower on the page
for aesthetic reasons, but we need to be sure to run
(including the goto button) on 640x480 screens, so leave as is -->
<!-- removed from above IMG to get stuff below to show: align=left -->
<!-- TEMPORARILY CUT: TODO: Nav5 support! -->
<FORM name="gotoform" onsubmit="goto_slide(this.slidenum.value); return false">
<A HREF="javascript:goto_slide(document.forms['gotoform'].slidenum.value)">
<IMG SRC="goto.gif" hspace=0 vspace=0 border=0>
</A>
<INPUT name="slidenum" TYPE="text" SIZE=3>
</FORM>
<!-- -->
</CENTER>
</BODY></HTML>
-----------------------------------
2) Next.htm loads the JS file Navbar.js, which is at:
http://blues/users/ekrock/publish/bugs/M5/nav5hack/basefile/Navbar.js
... and here is the JS code for Navbar.js:
-----------------------------------
// navbar.js
// (Global variables are declared in slide.js.)
// Display previous/next slide in sequence, or goto other slide.
// 22 May 98: rewrite to calculate base index.htm directory URL and add
filename;
// this eliminated need for caller_in_base_directory argument *and*
// finally eliminated the occasional slide "Not found" error message!
// 20 May 98: add Help window code
// 10 April 98: IE4 compatibility added.
// This is a simplified version of the JavaScript Client Sniffer code
// found at
http://developer.nextscape.com/docs/examples/javascript/browser_type.html
// This is a simplified version of the JavaScript Client Sniffer code
// found at
http://developer.nextscape.com/docs/examples/javascript/browser_type.html
function Is ()
{ // convert all characters to lowercase to simplify testing
var agt=navigator.userAgent.toLowerCase();
// --- BROWSER VERSION ---
this.major = parseInt(navigator.appVersion);
this.minor = parseFloat(navigator.appVersion);
this.nav = ((agt.indexOf('mozilla')!=-1) && ((agt.indexOf('spoofer')==-1)
&& (agt.indexOf('compatible') == -1)));
this.nav2 = (this.nav && (this.major == 2));
this.nav3 = (this.nav && (this.major == 3));
this.nav4 = (this.nav && (this.major == 4));
this.nav4up = (this.nav && (this.major >= 4));
this.nav5 = (this.nav && (this.major == 5));
this.nav5up = (this.nav && (this.major >= 5));
this.ie = (agt.indexOf("msie") != -1);
this.ie3 = (this.ie && (this.major < 4));
this.ie4 = (this.ie && (this.major == 4));
this.ie4up = (this.ie && (this.major >= 4));
this.ie5 = (this.ie && (this.major == 5));
this.ie5up = (this.ie && (this.major >= 5));
this.opera = (agt.indexOf("opera") != -1);
}
var is = new Is()
// Go to slide number slide_num.
function goto_slide(slide_num)
{ var indexURL = top.location.href; // get URL of top-level frameset doc
var baseURL = indexURL.substring (0, indexURL.lastIndexOf("/") + 1);
if(slide_num < 1 || slide_num > top.last_slide)
{ alert("Please enter number between 1 and " + top.last_slide);
}
else
{ top.current_slide = Math.abs(slide_num);
top.frames["slide"].location = baseURL +
top.filename[slide_num];
// update displayed page count in goto field
// TODO: Nav5 support!
// top.frames["next"].document.forms["gotoform"].slidenum.value
= top.current_slide;
}
}
// Display previous slide in sequence.
function prev_slide()
{ if (top.current_slide == 1)
{ alert("You are already at the first slide.\nThere is no previous
slide.");
}
else goto_slide(top.current_slide - 1);
}
// Display next slide in sequence.
function next_slide()
{ if (top.current_slide == top.last_slide)
{ alert("You are already at the last slide.\nThere is no next
slide.");
}
else goto_slide(top.current_slide + 1);
}
-----------------------------------
3) For this code to successfully execute, the current slide number must be
retrieved; it is data stored on the top frameset document in the variable
top.current_slide. I wonder whether there is a frameset data hosing problem
here? That seems especially likely as page turning works when you specify which
page number to go to. (See #4)
4) This might be related to bug #6220:
http://bugzilla.mozilla.org/show_bug.cgi?id=6220
In that bug, if you type in the page number on the "goto" field, the page *is*
changed, but the progress bar never stops. The mysterious part is: why does it
work to specify a specific page number, but fail to retrieve the current page
number, stored in a variable on the top frameset, and add 1 to it? This causes
me to suspect a problem with getting the data off the top frameset.
Assignee | ||
Updated•26 years ago
|
Status: NEW → RESOLVED
Closed: 26 years ago
Resolution: --- → DUPLICATE
Assignee | ||
Comment 1•26 years ago
|
||
javascript: urls are broken. That's why clicking the links doesn't work.
duping this with the javascript: url bug.
*** This bug has been marked as a duplicate of 1646 ***
Updated•6 years ago
|
Component: Event Handling → User events and focus handling
You need to log in
before you can comment on or make changes to this bug.
Description
•