Check and redirect

Reply

Join Date: Apr 2008
Posts: 17
Reputation: elbuhleini is an unknown quantity at this point 
Solved Threads: 0
elbuhleini's Avatar
elbuhleini elbuhleini is offline Offline
Newbie Poster

Check and redirect

 
0
  #1
Dec 22nd, 2008
I want to create a function, which checks if user has myApp installed and if not, he is being redirected to my landing page. Now, the landing page works as it should, the problem is with function mentioned above. Also, the function has to work for the whole media content on the page, not to call it for each and every file. Here is my code so far and I am asking for a little help

  1. <html>
  2. <head>
  3. <script type="text/javascript">
  4. toolbar=0;
  5. function ToolBarInit(tool) {
  6. toolbar=1;
  7. }
  8.  
  9. function checkToolbar(){
  10. if(toolbar!=1) {
  11. window.location.href=url;
  12. }
  13. }
  14. </script>
  15.  
  16. </head>
  17. <body>
  18. <script language="javascript">
  19. document.getElementById('mask').style.visibility='visible'
  20. document.getElementById('mask2').style.visibility='visible'
  21.  
  22. document.getElementById('mask').style.height=document.body.clientHeight
  23.  
  24. function loadContent(){
  25.  
  26. if(toolbar==1){ document.getElementById('cont').innerHTML='<div width=500 height=500 style="overflow: hidden;" id=media_container><embed src= "http://www.odeo.com/flash/audio_player_standard_gray.swf" quality="high" width="300" height="52" allowScriptAccess="always" wmode="transparent" type="application/x-shockwave-flash" flashvars= "valid_sample_rate=true&external_url=<?=$_GET[url];?>" pluginspage="http://www.macromedia.com/go/getflashplayer"> </embed></div>'
  27. document.getElementById('mask').style.visibility='hidden'
  28. document.getElementById('mask2').style.visibility='hidden'
  29.  
  30. }
  31. }
  32.  
  33. function confirmDL(){
  34. location.href='http://mydomain/myApp.exe';
  35. }
  36.  
  37. </script>
  38. <div id=('cont')
  39. <h1><a href="http://mydomain/flash_game.swf">Play!</a></h1></div>
  40. </body>
  41. </html>
If you think you are the smartest, you definetly are not. But you can strive to be one. Cashwizz Affiliate network
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the PHP Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC