Closed
Bug 6573
Opened 26 years ago
Closed 25 years ago
image link works off local disk but not when running off remote server
Categories
(Core :: DOM: UI Events & Focus Handling, defect, P3)
Tracking
()
VERIFIED
FIXED
People
(Reporter: ekrock, Assigned: joki)
References
()
Details
This bug prevents us from making DHTML presentations viewable over the web. It
would be really helpful for marketing and QA if we could fix this.
In both M5 and 5/17 base build, on WinNT, to reproduce:
1) go to URL
2) click the right arrow blue image -- nothing happens; screen image flickers
ever so faintly as if page is being reflowed instantaneously several times
3) download
http://blues/users/ekrock/publish/bugs/M5/netbad/onclick2/onclick2.zip
4) unzip
5) open onclick2/index2.htm that you've unzipped locally
6) click the right arrow blue image -- it works fine
Why does the link work fine when the page is loading locally but not when the
directory has been posted to a web server?
Here's the HTML page onclick2/Basefile/next2.htm with the image link:
-------------------------------------------
<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>
<!--
HACK: ekrock 13 May
WAS: <A HREF="javascript:next_slide();">
Changed to work around #6222, javascript: URLs don't work in Nav5 M5.
-->
<A HREF="" onclick="return next_slide();">
<IMG SRC="spacer.gif" hspace=0 vspace=0 border=0 height=300 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, and on Nav3,
so leave as is -->
<!-- removed from above IMG to get stuff below to show: align=left -->
<FORM name="gotoform" onsubmit="goto_slide(this.slidenum.value); return false">
<CENTER>
<INPUT name="slidenum" TYPE="text" SIZE=3><BR>
<!--
HACK: ekrock 13 May
WAS: HREF="javascript:prev_slide();"
HREF="javascript:next_slide();"
Changed to work around #6222, javascript: URLs don't work in Nav5 M5.
-->
<A HREF="" onclick="return prev_slide();"><IMG SRC="left.gif" hspace=0 vspace=0
border=0 height=20 width=20></A>
<A HREF="" onclick="return next_slide();"><IMG SRC="right.gif" hspace=0
vspace=0 border=0 height=20 width=20></A>
</CENTER>
</FORM>
<A HREF="../help.htm" onClick="return openHelp();">Help</A>
</CENTER>
</BODY></HTML>
-------------------------------------------
Here's the JavaScript file onclick2/Basefile/navbar.js which is being invoked:
-------------------------------------------
// 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();
// HACK: work around fact that Nav5 M5 doesn't support alert()
var nav5SupportsAlerts = false;
// 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)
{ if (!is.nav5 || nav5SupportsAlerts) 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;
}
// ekrock added 13 May to work around #6222
return false;
}
// Display previous slide in sequence.
function prev_slide()
{ if (top.current_slide == 1)
{ if (!is.nav5 || nav5SupportsAlerts) alert("You are already at
the first slide.\nThere is no previous slide.");
}
else goto_slide(top.current_slide - 1);
// ekrock added 13 May to work around #6222
return false;
}
// Display next slide in sequence.
function next_slide()
{ if (top.current_slide == top.last_slide)
{ if (!is.nav5 || nav5SupportsAlerts) alert("You are already at
the last slide.\nThere is no next slide.");
}
else goto_slide(top.current_slide + 1);
// ekrock added 13 May to work around #6222
return false;
}
-------------------------------------------
Reporter | ||
Comment 1•26 years ago
|
||
CORRECTION: The URL for the downloadable ZIP file is:
http://blues/users/ekrock/publish/bugs/M5/netbad/onclick2.zip
Assignee | ||
Comment 2•25 years ago
|
||
Due to never ending up in a milestone this bug has hovered in space for a really
long time. Eric, does this work now?
Reporter | ||
Updated•25 years ago
|
Status: NEW → RESOLVED
Closed: 25 years ago
Resolution: --- → FIXED
Reporter | ||
Comment 3•25 years ago
|
||
Works in M12. Sorry I hadn't noticed. FIXED. Thanks!
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
•