Asheh Posted May 14, 2007 Share Posted May 14, 2007 new Ajax.Request('dcwidth', { method: 'get', parameters: {'custom_text': strNewImage} , onSuccess: function(x) { var msg = x.responseText; var tmp = msg.split(':'); var width = tmp[0]; var height = tmp[1]; var left = ((576/2) - width/2) + 2; parent.frames['plate_display'].document.getElementById(strId).style.left = left; parent.frames['plate_display'].document.getElementById(strId).style.width = tmp[0]; parent.frames['plate_display'].document.getElementById(strId).style.height = tmp[1]; } }); Hi guys the above code doesnt seem to want to work in firefox? Does anyone know why this might be? I call it in an OnChange for a textbox so i can resize an image dynamically but the image disapears in firefox so im assuming it sets the width/height to an invalid number. Hope you can help Regards Ash. Quote Link to comment Share on other sites More sharing options...
mainewoods Posted May 17, 2007 Share Posted May 17, 2007 ff needs the width, height, etc. set with a unit type as well, like: 10px 110% 100em parent.frames['plate_display'].document.getElementById(strId).style.left = left + 'px'; Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.