Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7718857
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T03:16:14+00:00 2026-06-01T03:16:14+00:00

for some reason this code wont work, it doesn’t seem to read the javascript.php

  • 0

for some reason this code wont work, it doesn’t seem to read the javascript.php file, im trying to make a remote control, ive tried many different scenarios and can seem to get it working, i have a similar script that will change the contents of a div depending on the file contents that seems to work fine, so i used the major components from that script to make this one and it doesn’t want to open the javascript.php file, when the javascript.php file is opened it will read from the mysql database a value of 1-3 and delete the value from the database after the value has been printed

////////////////////////////repeat script////////////////////////////////
var c=0;
var t;
var timer_is_on=0;
function timedCount()
{
c=c+1;
//////////insert/////
check();
/////////insert////////
t=setTimeout("timedCount()",1000);
}
function doTimer(){
if (!timer_is_on){
timer_is_on=1;
timedCount();
}
}

////////////////////////////////////repeat script/////////////////////////////
function check(){

var html = $.ajax({
  url: "javascript.php",
  async: false
 }).responseText;

if (html==1){
    jwplayer().play();
    };

if (html==2){
    jwplayer().setMute();
    };

if (html==3){
    jwplayer().stop();
    };
}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-01T03:16:15+00:00Added an answer on June 1, 2026 at 3:16 am

    1) WTF? Well, you’ve made an infinite loop by calling that function over and over. And this is by no means how to do a proper ajax request.

    2) TO do it proper, just put your conditionals in the response function. Use async, that means it happens asynchronously and wont block your UI from functioning while it makes the request.

     $.ajax({
       url: "javascript.php",
       async: true,
       success: function(html) {
    
     if (html==1){
         jwplayer().play();
      };
    
     if (html==2){
         jwplayer().setMute();
         };
    
     if (html==3){
         jwplayer().stop();
         };
     }
    
     })
    

    3) javascipt.php is a terrible name in terms of code maintenance. Call it what it does.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

For some reason, this code does not actually draw my bitmap file... or show
For some reason my code here (this is the entire thing) doesnt actually render
For some reason This php script won't echo anything: <?php setcookie(pop,'hi',time()+604800); echo $HTTP_COOKIE_VARS['pop']; ?>
Im using oslib with the pspsdk toolchain and for some reason this doesnt work
For some reason this program is saying that 'switch' is not defined. What is
For some reason this function confused me: def protocol(port): return port == 443 and
Okay, so for some reason this is giving me a error as seen here:
For some reason I never see this done. Is there a reason why not?
For some reason I'm not getting this. (Example model below) If I write: var
For some reason I'm really struggling with this. I'm new to wpf and I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.