Changing Window Size

Oct 5, 2003

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:

View 1 Replies


ADVERTISEMENT

Size Image To Fit Window (without Cropping Or Changing Ratio)

Oct 19, 2011

I'm trying to size an image to fit the browser window. It will be the only thing in the frame, so it doesn't matter if it's the background or not. I've found quite a few ways to have the image automatically resize itself where it either gets cropped off or changes ratio to stretch, but I've not found anything where it'll keep the full image and ratio and just have bars top and bottom or sides.

View 14 Replies View Related

Font Size Aspect Ratio Change With Window Size

Apr 14, 2011

where 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]..

View 7 Replies View Related

JQuery :: Adjust Content Size According To Size Of Window?

Aug 26, 2011

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 Related

Possible To Re-size Image To Fit Window Size?

Aug 31, 2011

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...

View 1 Replies View Related

Re-size Image To Fit Window Size?

Aug 31, 2011

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...

View 4 Replies View Related

How To Get Window Size (not Viewport Size)

Apr 6, 2010

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.

View 3 Replies View Related

Changing Image Size

Jul 23, 2005

I've made a gallery that has thumbnails along the top and clicking them
changes the source for the full size image below, but it seems I can't
change the image size.

A workaround I made up is to put the fullsize image tag inside a div
tag. Clicking a thumbnail changes the innerHTML of the div to an image
tag with the proper size and source.

I'm wondering if this is the way to do it or if there's a better, more
proper way?

View 1 Replies View Related

Changing Font-Size

Nov 9, 2006

More and more we see on web pages the option of choosing the font size.

I would like to offer the same option on my page, but I can get started.

I know that CSS and Javascripting are working together, I just not able to change the font-size property of the CSS.

View 2 Replies View Related

Changing Date Size

May 31, 2006

I have a java script that I like and recently changed the text on the page to 10 pt. but can't figure out how to change this script to 10.

<SCRIPT language="JavaScript" type="text/javascript">
<!--
// current date
// Array of day names
var dayNames = new Array("Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday");

var monthNames = new Array("January","February","March","April","May","June","July",
"August","September","October","November","December");

var dt = new Date();
var y = dt.getYear();

// Y2K compliant
if (y < 1000) y +=1900;

document.write(dayNames[dt.getDay()] + ", " + monthNames[dt.getMonth()] + " " + dt.getDate() + ", " + y);
// -->
</SCRIPT>

Any ideas?

View 3 Replies View Related

JQuery :: Font Size Not Changing?

Sep 15, 2011

I;m trying to implement increase/decrease font size buttons on a site, but nothing is happening. I've set breakpoints and tried changing $('html') to $('body') and although the code runs, no attributes are set. The code I'm using is:

[Code]...

Even if I remove the cookie, the code runs but nothing happens. Am I missing something obvious?

View 1 Replies View Related

InnerHTML / DIV Size Changing To Various Strings

Dec 21, 2010

I was playing around with some onmouseover/onmouseout and setting innerHTML to various strings depending on what has been mousedover/out. The DIV for the innerHTML was above the items being onmouseovered/out and because the strings sent were of different lengths, sometimes a one or two line wrap would happen and everything below it would be resized accordingly creating a horrible effect. For reference, what is a good way to approach building pages which are immune to this effect?

View 12 Replies View Related

Changing Image Size In Percentage?

Dec 1, 2011

I am implementing a zoom in feature, but actually tricking the user as a full screen image is simply being stretched.

I plan to apply it to several pages, and don't really fancy working out the pixels for each.

I believe that if you simply put width: 150% height 150% it will change the image size relative to the browser. I don't want that, I want it relative to the original image size. Could I do sort of height*1.5 or something? How would I write that if so?

<script>
$('#in').click(function() {
$('#drag img').animate({
width: '150%',

[Code]....

View 2 Replies View Related

Moving Img While Gradually Changing Its Size

Apr 22, 2010

I'd like to move a gif gradually, starting at onload, from one location to another on the screen, while gradually making it larger. The moving part seems easy enough to do, using img.style. left=parseInt (img. style. left=1='px'; in a recursive function.But I understand that img.style.width (and img.width) and img.style.height are read-only properties, so I guess I can't use them to change the image's size (?). Is there a way to change the gif's size starting at onload?

View 4 Replies View Related

Script To Close Old Window And Open New Window With New Link And Specific Size

Jan 29, 2006

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 Related

Need To Customize The Size Of The Window.open Window For Different Links

Jul 23, 2005

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....

View 1 Replies View Related

Changing Font-size Property In Body Definition?

Mar 27, 2010

I've got a website with font sizes using 'em's. I've made it so that in my 'body' CSS styling, I can change the font size and it changes it right throughout the whole site.

I have hyperlinks to increase and decrease the font size but have no idea how to get the links to change the 'font-size' property in my 'body' definition. As a secondary requirement (but not essential) I also need to remember this value and store in a cookie so the user doesn't need to keep resizing the page on every reload.

View 4 Replies View Related

JQuery :: Changing Font-size Based On Characters Count?

Sep 10, 2010

I'm reading jQuery in Action for my learning and thought I could start with a simple exercise for my page: I have several divs of the class ".important_new" with headings in there which are links to the articles:

<div class="important_new">
<h1><a href="#">New York Knicks sign Patrick Ewing Jr.</a></h1>
<img class="important_new_flag" src="images/body/flags/USA.png" />
<span class="important_new_country">USA</span>

[Code]....

This results in displaying all the headings in an 8px font size except two of them (which don't have more than 40 characters either). The 40+ character headings also get reduced.

I've gone through it lots of times and changed a ton of things, but can get more than that. Can anyone see what my failing/s are?

View 2 Replies View Related

Link In New Window Changing Value Of <input> In Parent Window

Feb 28, 2002

I'm building a program for webmasters, and I need to have it so that I can have an <INPUT> button that, when clicked, will open up a new window (400x350 pixels) with a list of links. However, when the person clicks one of those links, the window closes, the value of an <input type="text" name="parentdoc" size="8" maxlength="8" readonly> is updated.

How would I accomplish this?

(As I mentioned above, I am very new to JavaScript, so please provide as much explanation and code as possible.)

View 6 Replies View Related

Changing Window Title From Parent Window

Jul 23, 2005

I'm opening a window with a SWF inside (no HTML, just the SWF) but in the
title bar appears something like

http://www.server.com/myDir/myWeb/Flash/myFlash.swf

i'd like to write something like "Wow!! look thos flash!!!".

Could I do that from the function who launch it??? with something like this?

myWin.title = 'Hello world!!!'

View 3 Replies View Related

Window Size Without Toolbars And Etc...

Feb 1, 2006

is there a way to get the available size inside the window?
technically a kind of otherHeight - (toolbarsH + scrollbarsH + etc).

View 2 Replies View Related

Pop Up Window Size And Border

Jan 19, 2006

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 Related

ShowModalDialog - Window Size

Sep 13, 2006

Its 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.

View 9 Replies View Related

Fixed Size Pop-up Window?

Apr 1, 2009

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]....

View 2 Replies View Related

Popup Window Each Has Own Size?

Feb 11, 2009

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]....

View 3 Replies View Related

Window Resize To Required Size

Jul 23, 2005

A dynamically created html page contains a body tag with a single (filled)
table in it. Sie size of the table changes in a wide scale (from 5% to 150%
of the screen size independent in height and width.
The page is displayed in a popup window opened either via an onclick-event
or a href anchor (depends on the navigation). Now the obvious problem is
this:
When choosing a fixed window size things look silly most of the time. Either
you have a nearly empty window or you have to scroll all the time...

So I want to resize the window. Resize it to what size? The size that is
required by the pages content when redered in the browser. That's all :-)

-- hmmm -- I tried around quite a lot with scrollHeigths, offsetWidth and so
on, but there does not seem to be any more or less reliable solution.,
Especially not when trying to make stuff usable for different browsers.
Does anyone have a hint what else I can try, where I could look?

View 2 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved