Preserved Topic: Can JS find the width and height of an image before it has been rendered on screen? (Page 1 of 1) |
|
---|---|
Paranoid (IV) Inmate From: Northumberland, England |
posted 11-26-2003 20:54
Ok, |
Bipolar (III) Inmate From: Israel |
posted 12-01-2003 20:58
Hi, |
Paranoid (IV) Inmate From: Northumberland, England |
posted 12-02-2003 00:25
Hi, |
Bipolar (III) Inmate From: Israel |
posted 12-02-2003 07:34
Hi, |
Paranoid (IV) Inmate From: Northumberland, England |
posted 12-02-2003 18:35
Thanks mate, |
Maniac (V) Mad Scientist From: 100101010011 <-- right about here |
posted 12-02-2003 18:51
You can also just not put the height and width params in the img tag you are swapping as well. |
Paranoid (IV) Inmate From: Northumberland, England |
posted 12-02-2003 22:42
Hi Bitty, code: javascript :(function(){ function htmlEscape(s){s=s.replace(/&/g,'&');s=s.replace(/>/g,'>');s=s.replace(/</g,'<');return s;} x=window.open(); x.document.write('<pre>' + htmlEscape('<html>\n' + document.documentElement.innerHTML + '\n</html>')); x.document.close(); })(); |
Maniac (V) Mad Scientist From: 100101010011 <-- right about here |
posted 12-03-2003 00:46
No it generates height and width attributes from the loaded image it doesn't force parameters. |
Paranoid (IV) Inmate From: Northumberland, England |
posted 12-04-2003 13:07
ok the first one doesn't seem to work in moz (maybe that's just me) |
Paranoid (IV) Inmate From: Northumberland, England |
posted 12-04-2003 13:17
ok bitty, I found the problem stopping the first one working in moz: |