Hi Ove,

I think you sent me an email over at learningqjuery.com, but I'll answer here for the record.

it would go something like this:

var height = $("#myElement").height();
var width = $("#myElement").width();
var originalSrc = $('someImage').attr('src');
$('someImage').attr('src', '/umbraco/ImageGen.aspx?image=' + originalSrc + '&width=' + width + '&height=' + height);



--Karl
_________________
Karl Swedberg
www.englishrules.com
www.learningjquery.com



On Jan 31, 2008, at 6:45 AM, Azzlack wrote:


I am trying to change the source of an image when the page loads to
include some code in front, and after the url.

Like this:

Original src:
http://www.teamviewer.com/images/teamviewer.png

How I want it to look like:
/umbraco/ImageGen.aspx?image=" + (original-src) + "&width=" +
width + "&height=" + height;

height = $("#myElement").height();

width = $("#myElement").width();


Regards,
Ove Andersen


Reply via email to