PDA

View Full Version : .js file help - stuck on loading...



Silenced
Feb 16th, 2012, 11:50 AM
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...')

AJS.js
&
ocNewFixed.php (Starting page)


all files can be downloaded here:

http://uppit.com/1233dylkbrfu/help.rar

(too long to fit into 20k characters)





Help would be appreciated.

VIPStephan
Feb 16th, 2012, 07:45 PM
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).

alykins
Feb 16th, 2012, 09:47 PM
"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

Silenced
Feb 17th, 2012, 04:03 AM
VIPStephan
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/includes/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?

felgall
Feb 17th, 2012, 08:10 PM
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.