Jump to content

Calling on variables


adam291086

Recommended Posts

i have this script

var ImgWidth;
var ImgHeight;
function dimension (imagename)
{
var myImage = new Image();
myImage.name = "someimg.jpg";
myImage.onload = getWidthAndHeight;
myImage.src = "images/Pic/"+imagename;

function getWidthAndHeight() 
{
ImgWidth = this.width;
ImgHeight = this.height;
}

}

 

how can i call ImgWidth and ImgHeight within another function ??

 

 

Link to comment
https://forums.phpfreaks.com/topic/101982-calling-on-variables/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.