Jump to content


 


Register a free account to unlock additional features at BleepingComputer.com
Welcome to BleepingComputer, a free community where people like yourself come together to discuss and learn how to use their computers. Using the site is easy and fun. As a guest, you can browse and view the various discussions in the forums, but can not create a new topic or reply to an existing one unless you are logged in. Other benefits of registering an account are subscribing to topics and forums, creating a blog, and having no ads shown anywhere on the site.


Click here to Register a free account now! or read our Welcome Guide to learn how to use this site.

Photo

page with javascript on our website that does not work on either Chrome or Safari. Help !


  • Please log in to reply
2 replies to this topic

#1 vr100

vr100

  • Members
  • 2 posts
  • OFFLINE
  •  
  • Local time:11:24 PM

Posted 16 June 2010 - 07:48 PM

We have a page with javascript on our website, http://www.victorrossi.com/home.htm , that does not work on either Chrome or Safari although it seems to work fine in Internet Explorer and Firefox. What can be done to allow the "animated jpeg" created by the javascript to work on Chrome and Safari ? Many people we work with tend to use MACs with Safari and they mention there is blank space where the javascript "animated jpeg" should be.

I have done an extensive search on the internet but with no success. Any solutions ? Is there a "browser detect" redirect to an alternate file that we can use. We would like to re-direct Chrome & Safari users to an alternate page with an animated gif instead and although the animated gif doesn't look as great at the javascript "animated jpeg"

Here is the page below: (the area in question is the JAVASCRIPT portion)
<html>
<head><title>Victor Rossi</title>
<body bgcolor="#FFFFFF" text="#808080" topmargin="0" leftmargin="0" marginwidth="0" marginheight="0" onLoad="self.focus()">
<center>
<strong><img src="VR-logo.jpg" width="157" height="33"><br>
<a href="home.htm">Home</a> |
<a href="catalog.htm">Catalog</a> |
<a href="gallery.htm">Fashion Gallery</a> |
<a href="size.htm">Size Chart</a> |
<a href="media.htm">In the Media</a> |
<a href="about.htm">About Us</a> |
<a href="contact.htm">Contact</a></strong>
<p><hr width=50%><p><center>

<table cellspacing=0 cellpadding=0 width="702" border=0>
<tr>
<td valign=top>
<b><font color=#808080 size=3>Victor Rossi has evolved from its custom couture design roots into one of the world's most reliable design houses, private label manufacturers and global sourcing agents. Our combination of innovation, stellar craftsmanship, exceptional customer and client care are our hallmarks.</font>
<center>

<script LANGUAGE="JavaScript">
<!--
var speed=1333;								 
var counter=1;									
function rollPics() {
document.getElementById("display").src=counter+".jpg";   //Display image "counter".jpg
counter ++;										  // Add 1 to counter
if (counter>29) {								   // If counter is greater than 29 images then reset it
counter=1
}
}
<!-- END -->
</SCRIPT>
<IMG ID="display" SRC="1.jpg" onLoad="setTimeout('rollPics()',speed)">
<!-- the last number here is the delay in one thousanths of a second - you can change this-->
</BODY>
</center>
<p><hr width=25%><p>
</td></tr>


<tr><td align=center>
<p>
<FORM METHOD=POST ACTION="http://us.1.p10.webhosting.yahoo.com/forms?login=singh100">
<b><font color=#808080 size=3>Join the Victor Rossi mailing list !</b></font><br>
<table border=0>
<tr><td><font color=#808080>name:<BR>
e-mail: <BR></td>
<td><INPUT size=27 name="name"><br>
<INPUT size=27 name="e-mail"></font></td></tr>
<tr><td colspan=2 align=center><INPUT type=submit value="Submit to Victor Rossi">
<INPUT NAME=subject TYPE=HIDDEN VALUE="e-mail list">
<input type="hidden" name="required_fields" value="name,e-mail">
<input type="hidden" name="next_url" value="http://victorrossi.com/thankyou.htm">
</FORM>
</td></tr>
</td></tr>
</table>
</td></tr>
</table>
</center>
</body>
</html>


BC AdBot (Login to Remove)

 


#2 groovicus

groovicus

  • Security Colleague
  • 9,963 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:Centerville, SD
  • Local time:09:24 PM

Posted 16 June 2010 - 08:25 PM

Your page is not properly formed. You have an opening '<body>' tag, and two closing tags for starters, and it just gets worse from there. That is why it doesn't work, and by all rights, it shouldn't work in any browser. Try using the validation service at W3C:
http://validator.w3.org/

#3 vr100

vr100
  • Topic Starter

  • Members
  • 2 posts
  • OFFLINE
  •  
  • Local time:11:24 PM

Posted 17 June 2010 - 09:10 AM

I agree, the code is a MESS ! It somehow renders ok in IE and Firefox but not Chrome or Safari. I had read that javascripts do not always function properly on Chrome and Safari but it is most likely bad coding like you said.

Thanks for the validation service link. I will look into it :thumbsup:




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users