Help - Search - Members - Calendar
Full Version: JavaScript for PC vs. Mac
HTMLHelp Forums > Programming > Client-side Scripting
UptonGirl

I don't know that there is a difference. What I know is that the
person I created this site for (the problem is specific to this page:
http://althea.cs.umass.edu/TMurray/jvInterview.html ) is having number
of problems with it that I don't have. I offered to give him a zip
file, or even a burned CD - but he said there was no need as he pulled
the info off the server. The .css, the DW templates, and the JavaScript
files are all there. If not, the page would not work at all. I kept
as much as I could external, since he wants to be able to reuse the same
files for different content.

But, I'm on a PC - and he's on a MAC. So, I wonder if my JS and other
external style sheets aren't compatible with his OS. (if so, I need to knwo what to do abut this)
I've sent him a link to the MAC Os version of the external JS - but I don't know that
it's actually different. There must be some difference, as I can;t read
it here and if it didn't matter - the person who created the tutorial
would not have offered both versions, right?

However, he's using an XML cms to update the page as the "cases"
involved change. (I just wrote to get the name of it). So that may play
into the issue as well.

He (name: Tom) tells me this:

===== TOM ====

Its been a bit of work taking apart the files, partly because I am not
using templates. Also, the css files seem to go invisible some times.
I can't figure out why. Sometimes they load with my HTML page, and
sometimes they don't. Clearing the cache does not always fix it. have
you ever run into this sort of problem?

Right now I'm stuck on this: I can't find anywhere in the
jvInterview.html file where it loads in the Batmo javascript file. The
audio widget is not showing up, and I can't figure out how the JS code
is found.

any clues??

Just to be more clear about that last question, The code is:


CODE


<div class="intAs"> <div class="audio"><script language="JavaScript"
type="text/javascript">
   <!-- Call external JavaScript file to embed player
   embedPlayer("Hear the Answer:","audio/Jitendra_Vanedra_02.mp3"); //
title, filename
   // -->
</script>
<noscript><a href="audio/Jitendra_Vanedra_02.mp3"
target="_blank">You don't have JavaScript enabled. Please enable
JavaScript or download the answer MP3 here.</a></noscript></div>The
Diflosticyne process is complicated  . . .necessary to the product's
effectiveness.
         </div>



I don't see how it actually knows that the javascript it need for the
audio is in the Batmo...js file. I can't find it in any of the
template or css files either.

======/TOM=====

Any ideas? Migrating this kind of work from Macs to PCs is something I
really need to get a handle on. wacko.gif

Ev


Darin McGrew
The validator is your friend:
http://htmlhelp.com/cgi-bin/validate.cgi?u...mp;warnings=yes
Darin McGrew
FWIW, all four MP3 players work for me on Mac (Firefox and Safari).
UptonGirl
QUOTE(Darin McGrew @ Jun 24 2009, 02:57 AM) *

FWIW, all four MP3 players work for me on Mac (Firefox and Safari).



They work for Tom, too. What isn't working is his using my code as base for new content.

He says:


QUOTE
the css files seem to go invisible some times. I can't figure out why. Sometimes they load with my HTML page, and
sometimes they don't. Clearing the cache does not always fix it. have you ever run into this sort of problem?

I can't find anywhere in the jvInterview.html file where it loads in the Batmo javascript file. The audio widget is not showing up, and I can't figure out how the JS code is found.


This guy is a doctorate level computer scientist - used to programming. I'm just a noob designer. But - .css and JavaScript are not his languages. I did show him where the line to call the Batmo . . . js file is. The rest of it I'm lost on. But, like I said, I'm not sure what XML program he's using. AND - the source files I based my JS work on come in both MAC and PC flavors. Obviously, I used the PC one.

What has me really confused is that I've never looked at code loaded to a server that didn't read like any ohter code of that form I'd seen before - no matter what it was written on.

I'm stumped. sad.gif
UptonGirl
QUOTE(Darin McGrew @ Jun 24 2009, 02:27 AM) *



I'll look over that. At first glance I don't see how those errors can case the problems he describes - but we'll see! The should be fixed anyway.

Thanks.
Christian J
QUOTE(UptonGirl @ Jun 24 2009, 05:28 AM) *

I can't find anywhere in the jvInterview.html file where it loads in the Batmo javascript file.

Isn't that this one:

CODE
<script src="BatmosphereAudioEmbed.js" type="text/javascript"></script>

?

QUOTE
The audio widget is not showing up

On Windows, IE7 and FF3 load a Quick-Time plugin. Chrome loads a Media Player plugin. Opera and FF2 try to load a Media Player plugin but can't find one.

Apparently the plugin detection is not working properly. According http://althea.cs.umass.edu/TMurray/BatmosphereAudioEmbed.js :
QUOTE
// Windows browsers (except for Internet Explorer) will play back the file with the Windows Media Player *plugin.* Internet Explorer will use Windows Media Player.
// Non-Windows browsers will play back the file with their standard audio handler for the MIME type audio/mpeg. On Macs, that handler will usually be QuickTime.
UptonGirl
QUOTE(Christian J @ Jun 24 2009, 03:29 AM) *

QUOTE(UptonGirl @ Jun 24 2009, 05:28 AM) *

I can't find anywhere in the jvInterview.html file where it loads in the Batmo javascript file.

Isn't that this one:

CODE
<script src="BatmosphereAudioEmbed.js" type="text/javascript"></script>

?

QUOTE
The audio widget is not showing up

On Windows, IE7 and FF3 load a Quick-Time plugin. Chrome loads a Media Player plugin. Opera and FF2 try to load a Media Player plugin but can't find one.

Apparently the plugin detection is not working properly. According http://althea.cs.umass.edu/TMurray/BatmosphereAudioEmbed.js :
QUOTE
// Windows browsers (except for Internet Explorer) will play back the file with the Windows Media Player *plugin.* Internet Explorer will use Windows Media Player.
// Non-Windows browsers will play back the file with their standard audio handler for the MIME type audio/mpeg. On Macs, that handler will usually be QuickTime.




Yes - the line that calls the Batmosphere . . .js you noted is the one. I don't know why Tom couldn't find it. (tht was his quesiton to me - I knew where it was cuz I put it there wink.gif I've pointed it out to him but have not yet heard back. He keeps saner hours than I rolleyes.gif

As for the plug ins - well - that IS interesting!

Doesn't explain all his issues - but maybe some.

I've clean up the page code a bit - ignoring some of the warnings (like no alt - in some cases here it's not relevant - this is a mockup)

As for lack of detection - isn't that part of what NOSCRIPT is for?

This site has been merry hell - I've learned tons - but DAMN!
UptonGirl
Went back to the validator - got this: http://htmlhelp.com/cgi-bin/validate.cgi?u...mp;warnings=yes

I don't understand this (below) what do change?

QUOTE

Line 103, character 74:

... ng" width="500" height="49" /></div>
^



I can't get the carat to point to the right place here - but it seems to be complaining about this: /></


As for <NOSCRIPT> -- what are my alternatives? I've tried both upper and lower case and the validator has issues (though not he SAME issues) either way.

thanks again.
UptonGirl
A related question:

Other than the very pricey pay services I've seen, is there a way other than actually loading 20 or so browsers to check FUNCTIONALITY (not just the look) of a page - cross platform as well as cross-browser?
Frederiek
About the validation errors:
The first concerns the lack of the ALT attribute on the image.
The second error comes from the fact that NOSCRIPT isn't defined in the document type you are using.

See the W3C validation of your page: http://validator.w3.org/check?uri=http%3A/...vInterview.html for an explanation.

BTW, I also found two TITLE tags in the header and a <p><p>...</p></p> near the end of the page.
Christian J
QUOTE(UptonGirl @ Jun 24 2009, 09:54 AM) *

ignoring some of the warnings (like no alt - in some cases here it's not relevant - this is a mockup)

You can always use an empty alt="" to make it validate.

QUOTE
As for lack of detection - isn't that part of what NOSCRIPT is for?

No the content of a NOSCRIPT element (in lower case if you write XHTML) will only be displayed when JS is disabled. So if JS is enabled but the browser doesn't understand the script you might be in trouble.

See also http://www.htmlhelp.com/reference/html40/block/noscript.html
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2009 Invision Power Services, Inc.