Robert wrote:
Lee <RE**************@cox.net> wrote in message news:<c6*********@drn.newsguy.com>...
Tery Griffin said:
The actual code for the page in question seems to be:
Actually, I copyied this link in to Netscape 7.1 and IE. 5.2.1 on
MacOS 10.2.8 and I got a random set of images when I created a new
window and did the pastes.
http://www.wsc.ma.edu/webstudents/Co...s_2.pl?1234567
I added the numbers 1234567 just to see if it worked with the numbers
following.
Now, back to the original HTM file...
The problem seems to be that the form didn't contain a submit button.
I got this script to work in IE 5.2.1 and Netscape 7.1 on MacOS
10.2.8:
<html>
<head>
<title>redirection test</title>
<style type="text/css">
.hiddenStyle {position:relative; visibility:hidden;}
</style>
<SCRIPT language="JavaScript">
function submitform()
{
alert("in function submitform");
document.form.submit();
}
</SCRIPT>
</head>
<body onload="alert('in onload');submitform();">
<p>Hide the form so we do not see the submit button.</p>
<div id="formNotThere"
class="hiddenStyle">
<form name="form"
action=
"http://www.wsc.ma.edu/webstudents/CommWebSite/randomimages_2.pl">
<input type="submit" value="Submit form">
</form>
</div>
<p>Seems IE on the Mac expects a submit tag. Makes sense, if you
think about it.</p>
<p>I left the alerts in, so we can see what is going on.</p>
</body>
</html>
Wow. Why in the world are you doing it this way? This is the most
convoluted way of redirecting I have seen yet. It is like a Rube
Goldberg machine (
www.rube-goldberg.com). I know you have been working
a while to get this working properly, but you really should just scrap
it, and use a better method.
If you need a redirect, why dont you just do this?
<HTML><HEAD><SCRIPT>document.location =
"http://www.wsc.ma.edu/webstudents/CommWebSite/randomimages_2.pl"</SCRIPT></HEAD></HTML>
Or use a META refresth tag in the head... it doesnt even require javascript
:
<meta http-equiv="refresh"
content="1;url=http://www.wsc.ma.edu/webstudents/CommWebSite/randomimages_2.pl">
If you really want it to work, use both... but there is no reason at all
to redirect the way you are. What if the user doesnt even have
Javascript enabled?
Another solution without requiring Javascript, is to use a single frame
that takes up all of the browser window:
<frameset border=0 rows="100%,*" frameborder="no" marginleft=0
margintop=0 marginright=0 marginbottom=0>
<frame
src="http://www.wsc.ma.edu/webstudents/CommWebSite/randomimages_2.pl"
scrolling=auto frameborder="no" border=0 noresize>
<frame topmargin="0" marginwidth=0 scrolling=no marginheight=0
frameborder="no" border=0 noresize>
</frameset>
This method, of course, will not change the actual location, which is OK
if you like the looks of the first URL better than the second. It is
used in domain redirecting all the time. For instance, my website,
brian.genisio.org goes to a funny domain server that uses the mentioned
code to take me to my university site. The university site URL is
messy, so I use this method, and the user always seed brian.genisio.org
as the URL.
Brian