Ask your JavaScript questions! Pay money and get answers fast! (more info)

Drag & Drop not working on live site but fine on Local JavaScript

  • SOLVED

Hi,

I've designed a site for a client and most of the div/image elements on the page utilise a drag and drop script it works fine when I test it on my local machine but when I make the site live the javascript doesn't seem to be picked up/recognised. This is the site [[LINK href="http://www.djbenibee.com"]]http://www.djbenibee.com[[/LINK]]

I have triple checked the file paths tried relative and full url extensions but nothing works. I know next to nothing about Javascript so treat me like an absolute novice in that regard. I used the same script and coding as this site: [[LINK href="http://www.de-war.de"]]http://www.de-war.de[[/LINK]]
I also tried uploading that site to the hosting but it didn't work either. I also changed all the permissions on the js files to 777 still no change...

Help greatly appreciated...

Cheers,

Jayden

Answers (2)

2010-11-16

Jimish Gamit answers:

Please, replace following JS file


Jayden Osborne comments:

Replaced the JS files with the ones your provided but no change? Still not working unfortunately...


Jimish Gamit comments:

clear your browser cache and then check again...let me know still if u get error
also remove following code from HEAD part and put it just after starting of BODY TAG
<script type='text/javascript'>
window.onload = function()

{
xEnableDrag2('hello');
xEnableDrag2('bookings');
xEnableDrag2('logo');
xEnableDrag2('presspack');
xEnableDrag2('bio');
xEnableDrag2('bomb');
xEnableDrag2('facebook');
xEnableDrag2('myspace');
xEnableDrag2('twitter');
xEnableDrag2('soundcloud');
xEnableDrag2('jml');

xEnableDrag2('bigcircle');
xEnableDrag2('bigtri');
xEnableDrag2('cross');
xEnableDrag2('donut');
xEnableDrag2('half');
xEnableDrag2('hex');
xEnableDrag2('segment');
xEnableDrag2('square');
xEnableDrag2('tri');
xEnableDrag2('grid');





}
</script>


Jimish Gamit comments:

and don't use compressed one JS file..i can see compressed javascript file which i sent u


Jayden Osborne comments:

Hey Jimish,

I cleared the browser cache etc with no change. However I rectified this issue myself, my ftp was messing with the javascript uploading it in one line with no page breaks etc so I changed ftp programs...

Another question I have if you have a fix for it I will give you the prize money is my form on the [[LINK href="http://www.djbenibee.com/jml.htm"]]join mailing list page[[/LINK]] is not sending could this be something to do with the double click listener of the javascript... do I need to add that listener to the form button somehow? I've tried two different form to email CGI scripts with the same result the send button doesn't seem to be recognised...

Thanks for your help...


Jimish Gamit comments:

I was knowing that problem is because of line breaker
anyways problem is You used form TAG for every element and thats y its not submitting nothing else just remove all form tags expect top one which having ACTION attribute...it will work...


Jimish Gamit comments:

and also put SUBMIT button befor form tag get close

2010-11-16

Rainner Lins answers:

Hey, glad you got the JS code working, i was going to send you the cleaned up files.
About the Send button, i noticed it is places outside your form tags, try putting it inside, right before the </form>