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 5 of 5
  1. #1
    New to the CF scene
    Join Date
    Feb 2012
    Thanked 0 Times in 0 Posts

    .js file help - stuck on loading...

    ok guys im going to be honest here, i know nothing about javascript.
    ive been learning php and even that gets confusing at times.

    my issue:

    i bought a script off someone(php site) and it has a .php file that using .js files

    he had no idea how to fix the issue so im hoping you guys can help me fix it.

    this one .php page includes another .php file and 2 other .js files.

    i dont want to go and post every single file as one of them is like 1200 lines (i have if you like to hunt for errors)

    is there some code i can add in to make it show where its getting an error? i know you can in php and mysql

    the page get stuck on Loading... on the .php file which is line

    647: AJS.setHTML(AJS.$('load'), 'Loading...')

    ocNewFixed.php (Starting page)

    all files can be downloaded here:


    (too long to fit into 20k characters)

    Help would be appreciated.

  2. #2
    Administrator VIPStephan's Avatar
    Join Date
    Jan 2006
    Halle (Saale), Germany
    Thanked 1,285 Times in 1,255 Posts
    You can debug JS with Firebug in Firefox or similar debugging tools that are already built in in Opera and Safari (Win: Ctrl+Alt+I, Mac: Opt+Cmd+I). The console should show any error message that comes up.

    Do you happen to have the script online somewhere? I don’t feel like downloading and unpacking a RAR file (and I think many other people, too; you’ll get help faster if you make it most convenient for the people to check it out).

  3. #3
    Senior Coder alykins's Avatar
    Join Date
    Apr 2011
    Thanked 210 Times in 209 Posts
    "Loading" indefinitely seems to me that it is not an error per se- or you would get an error (that is if you are calling a php page- and that page errors out, it should bomb out on you) Are you stuck in a loop somewhere? I would look @ the .js and the .php file you listed for "for" loops, and "while" loops and see if there is any place where you could get stuck

    I code C hash-tag .Net
    Reference: W3C W3CWiki .Net Lib
    Validate: html CSS
    Debug: Chrome FireFox IE

  4. #4
    New to the CF scene
    Join Date
    Feb 2012
    Thanked 0 Times in 0 Posts
    i am installing the firefox addon as i write this.

    you can view the page at www.powerofdomination.com
    login details:
    user: demo
    Pass: demo

    click on Organized Crime (or once logged in click this link http://www.powerofdomination.com/inc...ocNewFixed.php)

    i have used it and it says this:

    missing } in XML expression
    getRequest()AJS.js (line 540)
    url = "http://www.powerofdomin...includes/ocNewFixed.php"
    data = undefined
    type = undefined
    loadJSONDoc()AJS.js (line 647)
    url = "http://www.powerofdomin...includes/ocNewFixed.php"
    sendInfo()ocNewFixed.php (line 112)
    action = "getOcStatus"
    form = undefined
    (?)()ocNewFixed.php (line 1)
    event = load
    [Break On This Error] 	
    netscape.security.PrivilegeManager.enablePrivilege("UniversalBrowserRead"); AJS.js (line 540)
    thanks for the help guys

    so where exactly is the error?

    its saying both the .php file and the .js file?
    Last edited by Silenced; 02-17-2012 at 11:01 AM.

  5. #5
    Master Coder felgall's Avatar
    Join Date
    Sep 2005
    Sydney, Australia
    Thanked 932 Times in 919 Posts
    You can debug JavaScript in ANY browser except Firefox by using the built in debugger - Firefox is the only browser that doesn't have one. The Venkmann extension for Firefox provides the same JavaScript debugger as the other browsers have built in. Firebug is intended more for debugging HTML and CSS and is not as powerful for debugging JavaScript.

    See http://javascriptexample.net/debug.php for instructions on how to find the debugger built into each of the different browsers.
    Last edited by felgall; 02-17-2012 at 08:12 PM.
    Learn Modern JavaScript - http://javascriptexample.net/
    Helping others to solve their computer problem at http://www.felgall.com/

    Don't forget to start your JavaScript code with "use strict"; which makes it easier to find errors in your code.


Posting Permissions

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