Hello and welcome to our community! Is this your first visit?
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    New Coder
    Join Date
    Jun 2012
    Thanked 0 Times in 0 Posts

    Javascript functions suddenly stopped functioning across the whole website

    I am stuck with a weird situation.

    I have changed nothing. Not on my file neither updated my browser etc.
    But all javascript functions that were functioning properly till yesterday arent working now.

    For example, I have created a test page on the website with simple 1 line javascript function here. Its dead.

    To tell more specifically, java script stopped executing ajax commands.
    and also codes like this dont work
     $("#id").html('say something');
    I have talked with my host (bluehost) and they found nothing on server side.
    Its turning out to be a tumor in the head now.
    Can anyone give a fix to this?

    ( this is a ptc website almost like traffic exchange, where the site heavily relies on javascript functions. Can it be some hackers trying to sabotage?)

    Best Regards.
    Last edited by sanomani; 04-20-2013 at 08:19 AM.

  2. #2
    Supreme Master coder! Philip M's Avatar
    Join Date
    Jun 2002
    London, England
    Thanked 2,699 Times in 2,675 Posts
    Try setting up a test using vanilla Javascript, not jQuery.

    It is your responsibility to die() if necessary….. - PHP Manual

    All the code given in this post has been tested and is intended to address the question asked.
    Unless stated otherwise it is not just a demonstration.

  3. #3
    New Coder
    Join Date
    Jun 2012
    Thanked 0 Times in 0 Posts
    Now, it worked again, without changing anything anywhere. At times system works and at times it doesnt. I am running this exchange site for more than 1 year and never experienced such stuffs.

    Trying vanilla.

  4. #4
    Supreme Master coder! Old Pedant's Avatar
    Join Date
    Feb 2009
    Thanked 4,947 Times in 4,908 Posts
    That code on that page you linked to, http://shareyt.com/testingjava.php, will *NEVER* WORK as coded.

    You are trying to use jQuery syntax but you DID NOT LOAD the jQuery library!

    This has NOTHING to do with any server. You can't use jQuery if you don't have a line that includes it in the web page.
    Be yourself. No one else is as qualified.


Posting Permissions

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