943,929 Members | Top Members by Rank

Ad:
  • PHP Discussion Thread
  • Unsolved
  • Views: 916
  • PHP RSS
Dec 22nd, 2008
0

Check and redirect

Expand Post »
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

PHP Syntax (Toggle Plain Text)
  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>
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
elbuhleini is offline Offline
17 posts
since Apr 2008

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in PHP Forum Timeline: tinymce
Next Thread in PHP Forum Timeline: MYSQL_QUERY problem





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC