470,643 Members | 1,356 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 470,643 developers. It's quick & easy.

Am I really the only one

who can't get onload to fire at all in IE on a Mac? Iım about to try the
suggestion of adding the script after the body tag. Iıd really rather do it
some ³right² way, if thereıs a right way that works . . .

I have to admit that itıs annoying to have to code around something that
doesnıt work in a browser thatıs no longer being supported on the platform.
Unfortunately, we have a couple of labs full of Macs, and a lot of people
like to use IE on them.

Tery

Jul 23 '05 #1
11 1257
Lee
Tery Griffin said:
This message is in MIME format. Since your mail reader does not understand

this format, some or all of this message may not be legible.

--B_3165943671_121966
Content-type: text/plain; charset="ISO-8859-1"
Content-transfer-encoding: 8bit

who can't get onload to fire at all in IE on a Mac? Iım about to try the
suggestion of adding the script after the body tag. Iıd really rather do it
some ³right² way, if thereıs a right way that works . . .


You've posted in MIME format to a text newsgroup and provided
a truly worthless subject line, and then continued your message
from the subject, so who knows what other sorts of mistakes you
might be making.

Jul 23 '05 #2
My sincerest and most humble apologies. I was unaware that Entourage posted
in MIME format. I guess I'll have to stop reading newsgroups with my e-mail
program -- no matter what it claims about its ability to handle them
properly.

I don't think the problem is mistakes in the code. At least, no one here or
on the IE/Mac group can find any. It just seems so unlikely that onload
wouldn't work -- it's not exactly an esoteric command. I figured if IE is
truly unhappy with onload, someone somewhere might have found a "legal"
workaround.

Back to the drawing board. But thanks so much for your assistance, Lee!

Tery


On 4/27/04 9:09 PM, in article c6*********@drn.newsguy.com, "Lee"
<RE**************@cox.net> wrote:
Tery Griffin said:
This message is in MIME format. Since your mail reader does not understand

this format, some or all of this message may not be legible.

--B_3165943671_121966
Content-type: text/plain; charset="ISO-8859-1"
Content-transfer-encoding: 8bit

who can't get onload to fire at all in IE on a Mac? Iım about to try the
suggestion of adding the script after the body tag. Iıd really rather do it
some ³right² way, if thereıs a right way that works . . .


You've posted in MIME format to a text newsgroup and provided
a truly worthless subject line, and then continued your message
from the subject, so who knows what other sorts of mistakes you
might be making.


Jul 23 '05 #3
who can't get onload to fire at all in IE on a Mac?


Please provide a link to the file or post the source.

This is a sign of a syntax error in the file. Bad quotes will do it.

Try running tidy on the html file. See:
http://tidy.sourceforge.net/

Robert
Jul 23 '05 #4
Hi Robert,

The page is at http://www.wsc.ma.edu/webstudents/Co.../CommSite8.htm .

I'll try running tidy, too.

Tery

On 4/27/04 11:47 PM, in article
rc*****************************@news...arthli nk.net, "Robert"
<rc*******@my-deja.com> wrote:
who can't get onload to fire at all in IE on a Mac?


Please provide a link to the file or post the source.

This is a sign of a syntax error in the file. Bad quotes will do it.

Try running tidy on the html file. See:
http://tidy.sourceforge.net/

Robert


Jul 23 '05 #5
Tery Griffin wrote:
Hi Robert,

The page is at http://www.wsc.ma.edu/webstudents/Co.../CommSite8.htm .

I'll try running tidy, too.

Tery

On 4/27/04 11:47 PM, in article
rc*****************************@news...arthli nk.net, "Robert"
<rc*******@my-deja.com> wrote:

who can't get onload to fire at all in IE on a Mac?


Please provide a link to the file or post the source.

This is a sign of a syntax error in the file. Bad quotes will do it.

Try running tidy on the html file. See:
http://tidy.sourceforge.net/

Robert



You are not even doing anything with the onLoad handler.

<BODY onLoad="code();">
Brian

Jul 23 '05 #6
"Tery Griffin" <te********@cox.net> wrote:
View/source shows me:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
Try removing the doctype and see what happens.
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">


Try removing this and see what happens.

Maybe IE on Mac is doing something weird with your doctype or content-type.

--
Matt Kruse
Javascript Toolbox: http://www.mattkruse.com/javascript/
Jul 23 '05 #7
In article <BC**********************@cox.net>,
Tery Griffin <te********@cox.net> wrote:
http://www.wsc.ma.edu/webstudents/Co.../CommSite8.htm


It fails for me on MacOS 10.2.8 with IE 5.2.1. There seem to be lots of
little bugs in IE on the Mac.

A crude fix, would be to check for IE on the mac and put up a fixed
image.

I know onload works. It something to do with the minimalist form.

Why don't you just link to the real page. Do everything on the host. I
am not an expert on host programming, but when a page request gets to
your sever cannot you invoke php and have it pick a random image without
the need for redirection?

I think other posters have suggested the same thing.

Robert
Jul 23 '05 #8
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>
Jul 23 '05 #9
Thank you! You're right -- it does make sense. I made several changes that
people here suggested. The only one that worked was skipping the html
entirely and loading the perl program directly into that frame. That throws
a blank screen up once in a while, though.

If I can't figure out what's causing the blank screen, I'll try this
approach. I'm glad not to have to abandon the design.

Thanks to everyone for the help.

Tery

On 4/29/04 12:17 AM, in article
c6**************************@posting.google.com, "Robert"
<rc*******@my-deja.com> 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>


Jul 23 '05 #10
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
Jul 23 '05 #11
Matt Kruse wrote:
"Tery Griffin" <te********@cox.net> wrote:
View/source shows me:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">


Try removing the doctype and see what happens.


What happens is that it becomes invalid and
thus less interoperable content, if that.
PointedEars
Jul 23 '05 #12

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by Peter Young | last post: by
2 posts views Thread by James | last post: by
35 posts views Thread by Richard | last post: by
6 posts views Thread by Zip Code | last post: by
3 posts views Thread by Roy Osherove | last post: by
131 posts views Thread by pemo | last post: by
1 post views Thread by Korara | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.