Adjusting A Picture To The Size Of A Window
Jul 20, 2005I'm a newbie...I'm having trouble changing the size of an image when I
use different window sizes when loading the and resizing the browser window.
I'm a newbie...I'm having trouble changing the size of an image when I
use different window sizes when loading the and resizing the browser window.
I have a background image that auto-resizes based on browser window / screen resolution. I want my top header menu, which requires links, to act in the same way and be in roughly the same position/size based on browser window. Is this possible? In the sample below, the image is just part of the background image to give you an idea of the look I am trying to duplicate.Is there a Javascript out there that will help me or will I be stuck having to rework my design?
View 6 Replies View RelatedIs there any possible way to get the picture size with JavaScript. Let's say from the file input box.
View 3 Replies View Relatedi have some pictures in a page. there are have difference sizes. some
of them are too widen for be arrange in a line. so
i been tried to adject their sizes to more suitable.
i add a event to that image likes:
<img id="img" onLoad="adjustSize(this)" src="123.jpg">
and write a function in javascript:
function adjustSize(obj){
if (obj.width>250){
sizeRate=250/obj.width;
obj.width=obj.width*sizeRate;
if (obj.hight>268)
obj.hight=268;
}}
but exactly,i can get the image's width and height. cuz the loading
hasn't finished while the function of adjustSize works.
Im working on a site for a friend, and we've setup a popup window for a couple pages, but with the code we have, the variables for the width and height are in the <script> portion of the code, and not on each individual popup code segment. Is there a way I can add "width=400" or something to each popup to change its width? Code:
View 1 Replies View Relatedwhere da boss wants our a large piece of our site to be fully dynamic and integrated on any screen size. This means changing font on size. Well I cam up with a solution, figured if no one has one better, then i'll share
[Code]..
I am new to Jquery mobile framework.I have an asp.net web application and I want to convert it into Jquery mobile framework.I have a datalist on an aspx page.The size of the datalist decreases according to the window size to certain extent after which the size of the datalist becomes constant and doesn't decrease with the window size.
View 2 Replies View RelatedI started learning javascript couple of days ago, so this may be a noobie question.
I wrote a simple code that should re-size the image (there's some other code in here just in case) code...
I started learning javascript couple of days ago, so this may be a noobie question.
I wrote a simple code that should re-size the image (there's some other code in here just in case) code...
I'd have thought this would be easy but I've been looking for hours and all I can find is info on getting the viewport size, which is normally useful but not in my situation.
In this case I need the actual browser size, including the scrollbars, toolbars, status bars etc. to get an idea of browsers which aren't maximised/full screen and how big they are, and to calculate the amount of the screen taken up by toolbars etc too.
Okay this is kind of an update/revision of what I posted before. Myproblem was that when I click on a picture that is supposed to open ina new window it never does. I tried downloading a newer version ofExplorer (IE6) but that did not help. I turned my pop-up software OFFso that would not interfere. When I click on the picture the bottomleft of my screen has the little explorer icon and says javascript:abrir ventana(??') the numbers vary from pic to pic and the "abrirventana" for "open window" is in spanish because the site has aspanish counterpart. This website worked for me on another computerwith XP but does not work with my windows ME. Could this be theproblem? Is there a way to fix this without upgrading to a differentversion of Windows?
View 1 Replies View RelatedSo I wrote some javascript to open a popup window when the thumbnail pictures are clicked. Everything works fine except for two minor details I would like to fix.
1. The images are distorted in the popup window.
2. I want to be able to resize the window and have the picture inside resize along with it.
<script type="text/javascript">
function enlargeImage(Url,width,height){
var enlarged = new Image();
enlarged.src = ''+Url+''
var prevW = window.open("","newWin","width="+width+",height="+height+",
top=140,left=200,scrollbars=yes,resizable=yes");
prevW.document.write('<html><head><title>Preview Image</title><style type="text/css">body{margin: 0px; padding:0px;}
img{margin: 0px; padding: 0px;}</style></head><body>
<img alt="Click to Close" title="Click to Close"
style="border: 0px; padding: 0px;"
src="'+Url+'" width="'+width+ '" height="'+height+'"
onclick="java script:window.close();" /></body></html>');
}
</script>
And here's a copy of one of the pictures I have in my table (the code I mean)
<TD rowspan=1 style="width: 104px"><center><a href="java script:">
<img alt="Click to Enlarge" title="Click to Enlarge" src="landscape/landscape/images/archery.jpg" width="120px" height="100px" style="border: 0px" onclick="enlargeImage(this.src,'800','600');" >
</a></center></TD>
I need a script that will open a new window (popup / new link) in a specific size, but will also close the old window (where the popup came from). I know the popup window is easy but finding a work-able close window script as the new window is opened is impossible!!
View 3 Replies View RelatedThe code is working 100%, but the only problem is with the function calling statement. It is working on the first img (picture) i want it to be called on the second picture.
<!DOCTYPE html PUBLIC "-w3cDTD xhtml 1.0 strict EN"
<html xmlns=http:www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns = http:www.w3.org/1999/xhtml">
[code]....
I am trying to change a picture in a program but I keeps being a broken picture link.
[Code]...
I've been working on photo gallery that can be seen here: [URL] I would like the title to change according to the picture selected. This works when you click on the thumbnail images. However, it current does not work with the drop-down menu, "back" and "next" buttons, or the automatic slide-show.
[Code]...
I've got this row of images (in the end there will be more rows of pics
as well). When a user clicks on the image, I want a new window to open
with a larger version of the image. I want that new window to be
customized to the size of the new larger image. Also, when users go
back to see other images in their larger size, I want the new window
(assuming they never closed the first one) to come back to the front.
I've only gotten as far as getting the larger images to open in a new
window at a set size in the function. I thought I could just make
specific scripts for each image, but that would be cumbersome to say
the least....
So I wish to be able to click on a small thumbnail (small_tn1.jpeg) and a bigger picture pops out in a new window. (big_tn1.jpeg).I have looked at lightbox-versions but they are to complex with code.I want to use one function openBig() to be able to use on all my pictures on the site. So all my pictures will be named; small_tn1.jpeg, big_tn1.jpeg, small_tn2.jpeg, big_tn2.jpeg...I haven't found any that full fill my request. The closest code I found is for only a single-image. http://www.pcurtis.com/popup_advanced.htm*It's a school assignment, so I can not use jQuery or target="_blank"*
View 3 Replies View Relatedi looking for a way to stretch picture in background and put some divs over that picture with links and text. what i find so far don't work in all browsers any one know something like this?
View 5 Replies View RelatedI'd like to know please if there is a Javascript solution for enlarging pictures.
The outcome I am seeking is for the user to click on a thumbnail picture which then links to a bigger picture I dont want to use a HTML hyperlink.
is there a way to get the available size inside the window?
technically a kind of otherHeight - (toolbarsH + scrollbarsH + etc).
I am using Dreamweaver to open a pop up window when you click in a thundnail to make the picture bigger. In Dreamweaver you have the option to specify the dimensions of the pop up window(in my case the same as the photograph). It seems to work fine in Explorer, but Safari leaves a white border along the right and bottom edges(aprox 14 pix). I have tried to do the window smaller but then in other browsers you need scroll bars. I would like the new window be exactly the same size of the photograph. Is there any easy way to control this?
View 3 Replies View RelatedIts the first time Ive used the showModalDialog function and was wondering how best to size the dialog to compensate for the window borders.
My command looks a bit like this:
500px; dialogWidth: 700px; dialogTop: 150px; dialogLeft: 150px; edge: Raised; center: No; help: No; scroll: No; status: Yes;")'
While I set the width and height to 700 and 500 respectively, the internal size of the window.document object comes out to be 694 and 448.
I have a "Roaming Companion" on my sites index page (www.studylinks.org - look for the red R) and I would like to fix its size and disable the expand and maximize functions. I assume it's in the Java rather than the HTML or CSS but do tell me if i'm wrong.I'm new to the forum so please forgive any posting/etiquette errors on my part. Javascript Document
function doPopups() {
if (!document.getElementsByTagName) return false;
var links=document.getElementsByTagName("a");
[code]....
I have a photo gallery which lists out a bunch of photos. You can click on one which will open the photo in another window for you to view. In this window then, you are able to go to the next image, to the previous one, etc.
Now, I have some images which are portrait style, some are landscape. I want to have the window that the images show in to be adjusted on the fly depending on the orientation of the photo. I.e., if the photo is landscape, I want to display it in a window which is 800x600 in size; if it's portrait, I want to display it in a window which is 600x800.
All the thumbnails have the following code for their href: Code:
i am having a problem with javascript. I have a page with a bunch of links on it, and whenever someone clicks on link i want it to popup, but each popup to have its own size, instead of a fixed size.lp.
<SCRIPT LANGUAGE="JavaScript">
<!-- Begin
function Help(URL) {
day = new Date();
[Code]....