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. Link to comment https://forums.phpfreaks.com/topic/51292-ajax-request-doesnt-work-in-firefox/ 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'; Link to comment https://forums.phpfreaks.com/topic/51292-ajax-request-doesnt-work-in-firefox/#findComment-255050 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.