Jump to content

StRichard

Members
  • Posts

    1
  • Joined

  • Last visited

Everything posted by StRichard

  1. Hi everyone! I've googled this problem for a week now, but I can't seem to find any suitable answers.I'm trying to get the javascript to output the two different div's by navigator.userAgent.match.All this because Steve Jobs didn't like flash...Since I don't own an IPad or IPhone, I thought that getting it to work on Firefox or IE wouldbe a good place to start.It should be said that my 2 year old daughter, probably is better at this scripting then me.I've obviously got no clue of what I'm doing here... In Firefox I only get the second div(display:block) to output. With flash off, I getthe standard "To enjoy this site you'll need..." and not the "img src=" of the first div.IE doesn't give me anything. Is there any chance that one of you experts could take a glance at this and explain to me what I'm doing wrong here? Any reply at all is highly appreciated ***************************************************<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"><HTML> <HEAD><meta http-equiv="Content-Type" content="text/html;charset=utf-8"> <TITLE>Ål Kulturskule</TITLE> </HEAD><BODY> <div id="manglerflash" style="display:none"><center><param name="allowScriptAccess" value="always" /><img src="manglerflash.jpg" alt="manglerflash"><br><a href="https://itunes.apple.com/no/app/puffin-web-browser-free/id472937654?mt=8&uo=4" target="itunes_store">Puffin Web Browser - Denne linken tar deg direkte til AppStore.</a></center></div> <div id="aalkulturskule" style="display:block"><center><param name="allowScriptAccess" value="always" /><object type="text/html" data="http://aalkulturskule.wix.com/aalkulturskule?url=<?php echo urlencode(get_permalink($post->ID)); ?>&chs=200x100&force=true" style="height:1058px;width:980px;border:0;overflow:hidden"></object></center></div> <script language="javascript" type="content-type">if ((navigator.userAgent.match(/iPad/i) != null) || (navigator.userAgent.match(/iPhone/i) != null) || (navigator.userAgent.match(/iPod/i) != null) || (navigator.userAgent.match(/Firefox/i) != null) || (navigator.userAgent.match(/MSIE/i) != null)) { document.getElementById("manglerflash").style.display = "block"; document.getElementById("aalkulturskule").style.display = "none"; } </script> </body></html>*********************************************************
×
×
  • Create New...