views:

47

answers:

3

I've been staring at the source code of these two download pages for awhile now and i can't seem to find the problem.

I have two download pages, one where the javascript is working, one where it isnt.

working: http://justupload.it/v/lfd7 not: http://justupload.it/v/ljhv

The working one allows me to rotate the image and reveal the comments box by clicking on the comments button. The non-working one does not let me do that stuff.

Can anyone help me find the problem or recommend a program to help me do it?

+3  A: 
    Error: syntax error
Source File: http://justupload.it/v/ljhv
Line: 69, Column: 36
Source Code:
    $('#mainImage').rotateLeft( 90, ,  ); 

Firefox has a good JS error debugging console. Couple that with Firebug and you should be able to track down almost any issues regarding Javascript.

Tommy
Confirmed. Line 69: $('#mainImage').rotateLeft( 90, , ); You've got blank parameters.
zaf
Also, Line 74 has blank parameters as well.
Tommy
+1  A: 

Your Rotate right and rotate left functions are missing values on this page: http://justupload.it/v/ljhv

Here is your code from the problem page:

function rotateLeft()
{$('#mainImage').rotateLeft( 90, ,  );}

function rotateRight()
{$('#mainImage').rotateRight( 90, ,  );}

Each rotate function is missing two parameters. Compare that with the code for your working page:

function rotateLeft()
{$('#mainImage').rotateLeft( 90, 254, 190.5 );}

function rotateRight()
{$('#mainImage').rotateRight( 90, 254, 190.5 );}

If I were you I would copy the functions from http://justupload.it/v/lfd7 to http://justupload.it/v/ljhv and see how that works.

jeremysawesome
thanks, it was because a php function wasn't spitting out any info for the resolution of the images, thus the blank values.thanks
jiexi
+1  A: 
function rotateLeft()
68  {
69      $('#mainImage').rotateLeft( 90, ,  );
Uncaught SyntaxError: Unexpected token ,
70  }
71  

Same error, caught in the Chrome Developer console. It points out that there is an unexpected comma that it can't handle.

brainjam
thanks for the help
jiexi