dcsimg
www.webdeveloper.com
Results 1 to 8 of 8

Thread: Javascript works in PC browsers but not mobile browsers. Looking for a solution.

  1. #1
    Join Date
    Oct 2013
    Location
    Baltimore, MD
    Posts
    5

    Javascript works in PC browsers but not mobile browsers. Looking for a solution.

    The following page, www.victorrossi.com/index.htm , works in Firefox, Chrome, Safari and Internet Explorer but does not work on Iphones and Android web browsers.

    There is a javascript that slowly displays the company name "Victor Rossi" before going to the next page, www.victorrossi.com/home.htm , after a 7 second delay. Users can skip the "Victor Rossi" letter by letter reveal javascript by clicking on the "Skip intro" in the upper right corner. However for those visiting my website for the first time, the 7 seconds until it goes to the next page may lead them to think my website isn't working.

    what can be added to the initial www.victorrossi.com/index.htm page just in case the web browsers are not "javascript capable" ? Here is the html page below:

    <html>
    <head><title>Victor Rossi</title>
    <meta name="description" content="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.">
    <meta name="keywords" content="after five, after six, beauty pageant, boutique, catalog, catwalk, chic, club dresses, collection, ****tail dresses, couture, debutante, designer, dresses, dress, elegant, evening wear, exclusive, fashion, fashion designer, holiday dresses, homecoming, look of the year, Miss Teen USA, Miss USA, Miss America, Miss World, Miss Universe, pageant, pageants, party dresses, prom, special occasion, haute couture, Bob Mackie, Carmen Marc Valvo, Randolph Duke, Mark Badgley, James Mishka, Badgley Mishka, Vera Wang, Alexander McQueen, John Galliano, Stephen Yearick, Sherri Hill, Jovani, Claire's Collection, Juan Carlos Pinera, Tony Bowls, DKNY, Zac Posen, Proenza Schouler, Saks, Saks Fifth Avenue, jones, jones apparel, jonesapparel, jones apparel group, jones new york, apparel, clothing, clothes, women's, men's, kids, juniors, department, store, mall, fashion, handbags, jewelry, accessories, jeans, sweaters, tops, knits, sportswear, better apparel, bridge, designer,denim, moderates, luxury">
    <meta http-equiv="refresh" content="7; Url=home.htm">
    </head>
    <body onLoad="self.focus()">
    <p align=right><a href="home.htm">skip intro</a>
    <center>
    <OBJECT classid="clsid27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" WIDTH="1024" HEIGHT="768" id="vr.swf" ALIGN="">
    <PARAM NAME=movie VALUE="vr.swf"> <PARAM NAME=quality VALUE=high> <EMBED src="vr.swf" quality=high bgcolor=#ffffff WIDTH="1024" HEIGHT="768" NAME="vr.swf" ALIGN="" TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/go/getflashplayer"></EMBED> </OBJECT> </center>
    </body>
    </html>

  2. #2
    Join Date
    Oct 2013
    Location
    Baltimore, MD
    Posts
    5
    whoops ! Near the bottom, the "smiley face" should be (the's a colon and the letter D)

  3. #3
    Join Date
    Feb 2003
    Location
    Michigan, USA
    Posts
    5,774

  4. #4
    Join Date
    Oct 2013
    Location
    Baltimore, MD
    Posts
    5
    Thanks for replying Toicontien ! I was trying to find a "noscript" or no javascript installed detect script like this:

    <noscript>
    <meta http-equiv="refresh" content="0; Url=http://www.victorrossi.com/home.htm"/>
    </noscript>

    but adding the "noscript" does not automatically skip the javascript which works on all web browsers. I have tried various potential solutions that I found online on http://stackoverflow.com/ with no luck !

  5. #5
    Join Date
    Oct 2013
    Posts
    597
    Please reread toicontien's post, and your own code that you posted. Plus when you right-click on your "splash page" it brings up all the Flash info. You are using Flash, not JavaScript. Therefore <noscript> will have no effect. FWIW, Adobe (current "owners" of Flash) has announced that they are ending development of Flash pretty soon, if not already. HTML5 is where animation is headed and Adobe has recognized that, which along with the non-support by mobile platforms, I'm sure led to that decision.

    Flash splash pages are on the bleeding edge of new-millenium web techniques , maybe it's time to move on. There's nothing wrong with your "home.htm" page being your index.htm page. Maybe with a little tweeking, like making the "Victor Rossi" image at the top a little larger, it would work

  6. #6
    Join Date
    Oct 2013
    Location
    Baltimore, MD
    Posts
    5
    Kevin2. Aha ! My knowledge of terminology like flash / java is obviously quite limited. I mistakenly thought that "flash animation" was a type of javascript. It makes sense. Thanks.

  7. #7
    Join Date
    Oct 2013
    Posts
    597
    You bet, man! Glad to help.

  8. #8
    Join Date
    Oct 2013
    Location
    Baltimore, MD
    Posts
    5
    Hey Kevin and Toicontien ..... FOUND THE SOLUTION here - http://www.kirupa.com/developer/mx/detection.htm ! I hope this helps others !!! I have posted the top portion only where the script is required. Please note that where I have used "http://www.victorrossi.com/index.htm for IF the user has flash OR "http://www.victorrossi.com/home.htm" IF the browser does not have flash, PLEASE USE the full website of your own instead of my www.victorrossi.com html pages. See below :

    <html>
    <head><title>Victor Rossi</title>
    <SCRIPT LANGUAGE=JavaScript1.1>
    <!--
    var MM_contentVersion = 7;
    var plugin = (navigator.mimeTypes && navigator.mimeTypes["application/x-shockwave-flash"]) ? navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin : 0;
    if ( plugin ) {
    var words = navigator.plugins["Shockwave Flash"].description.split(" ");
    for (var i = 0; i < words.length; ++i)
    {
    if (isNaN(parseInt(words[i])))
    continue;
    var MM_PluginVersion = words[i];
    }
    var MM_FlashCanPlay = MM_PluginVersion >= MM_contentVersion;
    }
    else if (navigator.userAgent && navigator.userAgent.indexOf("MSIE")>=0
    && (navigator.appVersion.indexOf("Win") != -1)) {
    document.write('<SCR' + 'IPT LANGUAGE=VBScript\> \n'); //FS hide this from IE4.5 Mac by splitting the tag
    document.write('on error resume next \n');
    document.write('MM_FlashCanPlay = ( IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash." & MM_contentVersion)))\n');
    document.write('</SCR' + 'IPT\> \n');
    }
    if ( MM_FlashCanPlay ) {
    window.location.replace("http://www.victorrossi.com/index.htm");
    } else{
    window.location.replace("http://www.victorrossi.com/home.htm");
    }
    //-->

    </SCRIPT>

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles