Client-side scripts with ASP.NET
-
So I'm trying to add script my ASP.NET objects using JScript on the client side (Just dumb stuff like resizing images, etc), and I have this code:
<!-- function Form_onResize() { Image1.width = 2 } -->
This code, when executed, shows a "Image1 not defined" in both Mozilla Firebird and IE6. Seeing the source code downloaded by the browser shows that they are indeed still named. Also, when I add the "name" tag to ASP:image, it underlines it, like it doesn't understand the tag.
-
So I'm trying to add script my ASP.NET objects using JScript on the client side (Just dumb stuff like resizing images, etc), and I have this code:
<!-- function Form_onResize() { Image1.width = 2 } -->
This code, when executed, shows a "Image1 not defined" in both Mozilla Firebird and IE6. Seeing the source code downloaded by the browser shows that they are indeed still named. Also, when I add the "name" tag to ASP:image, it underlines it, like it doesn't understand the tag.
Try
document.images["Image1"]
to get the images. Also, don't worry about what VS.NET thinks is "correct". The XML schema it uses for validation has errors and lacks many definitions.-----BEGIN GEEK CODE BLOCK----- Version: 3.21 GCS/G/MU d- s: a- C++++ UL@ P++(+++) L+(--) E--- W+++ N++ o+ K? w++++ O- M(+) V? PS-- PE Y++ PGP++ t++@ 5 X+++ R+@ tv+ b(-)>b++ DI++++ D+ G e++>+++ h---* r+++ y+++ -----END GEEK CODE BLOCK-----