a1jit Posted December 7, 2005 Posted December 7, 2005 Hi Guys, I know how to get the resolution of user and i want to know how to put the height and width to represent this resolution using javascript.. The code that i use to get width of user resolution window is screen.width, and screen.height So when i place image, i tried doing the following but didnt work I replace the width to be equal to = screen.width <asp:image id="Image1" style="Z-INDEX: 70; LEFT: 0px; POSITION: absolute; TOP: 0px" runat="server" Width=screen.width Height="85px" ImageUrl=".jpg"></asp:image><br> Another question is how do i place or get the position just above the status bar in IE cause i want to place an image right at the bottom too.. Thanks very much for advice Quote
Cags Posted December 7, 2005 Posted December 7, 2005 When you say it didn't work what do you mean, the image didn't appear at all, it didn't appear in the place you wanted it to, or it wasn't the size you wanted it? Quote Anybody looking for a graduate programmer (Midlands, England)?
a1jit Posted December 8, 2005 Author Posted December 8, 2005 Hi Thanks for the reply... Actually i got an error when i use screen.width Parser Error Message: 'screen.width' can not be parsed as a unit as there are no numeric values in it. Examples of valid unit strings are '1px' and '.5in'. So how do i convert the screen.width to the format that the image property accepts? Quote
Cags Posted December 8, 2005 Posted December 8, 2005 This is just an idea as I've never really done asp, but have you tried screen.width + "px" Quote Anybody looking for a graduate programmer (Midlands, England)?
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.