Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

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

Posted
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?
Anybody looking for a graduate programmer (Midlands, England)?
Posted

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?

Posted

This is just an idea as I've never really done asp, but have you tried

screen.width + "px"

Anybody looking for a graduate programmer (Midlands, England)?

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...