PHP variables to JS

Javascript coding ..

Moderators: macek, egami, gesf

Post Reply
User avatar
gesf
Moderator
Moderator
Posts: 1717
Joined: Sun Dec 29, 2002 5:03 am
Location: Portugal / Sweden
Contact:

Post by gesf » Tue Jul 05, 2005 4:52 am

Make sure you're really accessing the image file.

var pictureWidth = <?php echo $pictureWidth; ?>; whould be the better way to assign $pictureWidth to the javascript vaiable.
The Javascript error can also be related to the var pictureWidth... if no "size" was assign to it (First line).

Use error_reporting(E_ALL); so you can make sure about PHP's errors.

Also try to pass the JS code to the Body part of the HTML.

Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests