Programatically using zoom vs Setting zoom level

Using IE 7 & 8, I need to supply buttons on a page to allow the user to zoom 
in or out (I know they could simply user the browser to do this but......... 
it’s a long story!!)  Experimenting with ways to achieve this, I am having 
difficulty achieving the same level of functionality when programmatically 
applying a zoom as appears available using the browser menu.
On the very basic webpage below, if I use ctrl (+/-) to zoom the page, the 
page content is resized correctly and everything if fine; However, if I apply 
a zoom level by setting the .style.zoom property programmatically when 
pressing the "Go" button, the zoom occurs but the contained paragraph is not 
resized meaning that the text is now off the page and, despite setting the 
overflow property to "auto" no scrollbar is present.
Am I omitting a step somewhere?  Any help would be much appreciated!!


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<!-- DW6 -->
<head>
<!-- Copyright 2005 Macromedia, Inc. All rights reserved. -->
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Untitled Document</title>

<script>
function zoomIE()
{
	var content = document.getElementById("content");
	document.body.style.zoom = "1.2";
	document.body.style.overflow = "auto";
	content.style.overflow = "auto";
}	 
</script>
</head>

<div id="content">
   <h2 id="pageName">Zoom</h2>
   <input name="goButton" type="button" value="go" onclick="zoomIE();" />
    <h3>Feature Title </h3>
    <p> Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Donec 
molestie. Sed aliquam sem ut arcu. Phasellus sollicitudin. Vestibulum 
condimentum facilisis nulla. In hac habitasse platea dictumst. Nulla nonummy. 
Cras quis libero. Cras venenatis. Aliquam posuere lobortis pede. Nullam 
fringilla urna id leo. Praesent aliquet pretium erat. Praesent non odio. 
Pellentesque a magna a mauris vulputate lacinia. Aenean viverra. Class aptent 
taciti sociosqu ad litora torquent per conubia nostra, per inceptos 
hymenaeos. Aliquam lacus. Mauris magna eros, semper a, tempor et, rutrum et, 
tortor. </p>
  </div>
  
</div>
<br />
</body>
</html>

0
Utf
3/11/2010 3:26:01 PM
internetexplorer.general 1684 articles. 0 followers. Follow

1 Replies
1698 Views

Similar Articles

[PageSpeed] 20

Developer-specific resources include:

MSDN IE Development Forum (post such questions here instead)
http://social.msdn.microsoft.com/Forums/en-US/iewebdevelopment/threads

Tip: When posting in Developer forums, always include a link to your web 
site or test pages in your first post.

IE Developer Center
http://msdn.microsoft.com/en-us/ie/default.aspx

Learn IE8
http://msdn.microsoft.com/en-us/ie/aa740473.aspx

HTML and DHTML Overviews and Tutorials
http://msdn.microsoft.com/en-us/library/ms537623.aspx and

Cascading Style Sheets (CSS)
http://msdn2.microsoft.com/en-us/ie/aa740476.aspx

Expression Web SuperPreview for Internet Explorer (free, stand-alone visual 
debugging tool for IE6, IE7, and IE8)
http://www.microsoft.com/downloads/details.aspx?displaylang=en&FamilyID=8e6ac106-525d-45d0-84db-dccff3fae677

Expression Web SuperPreview Release Notes
http://www.microsoft.com/expression/products/Web_SuperPreviewReleaseNotes.aspx

Validators:
http://validator.w3.org/
http://jigsaw.w3.org/css-validator/


Jon Brown wrote:
> Using IE 7 & 8, I need to supply buttons on a page to allow the user to 
> zoom
> in or out (I know they could simply user the browser to do this 
> but.........
> it’s a long story!!)  Experimenting with ways to achieve this, I am having
> difficulty achieving the same level of functionality when programmatically
> applying a zoom as appears available using the browser menu.
> On the very basic webpage below, if I use ctrl (+/-) to zoom the page, the
> page content is resized correctly and everything if fine; However, if I
> apply a zoom level by setting the .style.zoom property programmatically 
> when
> pressing the "Go" button, the zoom occurs but the contained paragraph is 
> not
> resized meaning that the text is now off the page and, despite setting the
> overflow property to "auto" no scrollbar is present.
> Am I omitting a step somewhere?  Any help would be much appreciated!!
<SNIP> 

0
PA
3/11/2010 4:17:41 PM
Reply:

Similar Artilces:

Sum Value using ALT+ENTER
i have enter the record in the row, and inside the cell, i'm using ALT+Enter to make more line for the record, but i would like to know how to sum of the value in this cell?? e.g. C1 C2 C3 R1 1 1 XD R2 2 2 YY R3 1 XY R3 2 A R4 3 3 how can i get the value of A = 3, that is the sum of R3C1(1+2) also, how can i put the dollar sign automatically in cell R3C1 if i'm using "ALT+ENTER" to make more line. -- kilianli -------------------------------...

Programatically do a recall
Does anyone know how to programitcally via the api/SQL to recall a transcation or specifically a quote. We have a custom button that calls a dot net program to provide the lsit of quotes but the information does not completely get re-populated into the transaction screen. We are specifically not able to get line item comments back in. Any help greatly appreciated. On Wed, 18 Apr 2007 11:26:02 -0700, Scarpa <Scarpa@discussions.microsoft.com> wrote: >Does anyone know how to programitcally via the api/SQL to recall a >transcation or specifically a quote. We have a custom bu...

Using Visio 2000, can I get org chart shapes to show four fieds?
I'm trying to create an org chart that displays and prints the following for each position: Name Title Department Telephone Number I've used the stencil to create a shape that has department and telephone fields in it, but when I try to convert an existing shape to this new one it still only displays the name and title. The department and telephone number are stored in the Custom Properties of the shapes, and the original chart was created using the org chart wizard and was populated from an Exel spreadsheet. I'm using Visio 2000 SR1 (6.0.2072). Any help would be apprec...

Use Promotional Pricing in Order Management for Business Portal 3.
The promotional price sheet that is set up in Extended Pricing is not used when you enter an order in Order Management for Business Portal 3.0 When you enter an order in Order Management for Business Portal 3.0 in Microsoft Dynamics GP, the promotional price sheet that is set up in Extended Pricing in Microsoft Dynamics GP is not used. The ability to use promotional pricing in Order Management should be available ---------------- This post is a suggestion for Microsoft, and Microsoft responds to the suggestions with the most votes. To vote for this suggestion, click the "I Agree&q...

emailing from excel, which program does it use?
hi, I needed to help a friend who was having trouble sending an excel spreadsheet, I got the email address cleared up, but was wondering, can you set it up to use certain programs? It seems to be setup for outlook express? But When I click the address book in the TO: it appears to be the OE address book instead of the contacts in Outlook? Is there a way to see what program it is using? Also when you send from Excel are those emails saved in either the outlook or outlook express sent folders? thanks Bruce Hi Bruce See if Outlook is your mail program for Office On the Control Panel>Int...

Anyone Using IronMail Out There?
We are getting ready to implement Exchange 2003 and I am considering switching our current SPAM filtering software (NetIQ's MailMarshal) for the IronMail appliance. I am wondering if anyone is currently using the IronMail appliance or has any other product that is good at reducing the SPAM. Thanks, Fred The company I work for (not inventrix) uses IronMail. We have 60,000 users and we filter out about 5 million messages as SPAM. A critical piece is to ensure you implement the LDAP piece that will allow IronMail to drop recipients that are not in AD. Teo "Fred Yarbrough&quo...

How to use relative file:// protocol in html resource used by CDHTMLDialog?
Howdy, I'm writing a C++ CDHTMLDialog based application in VS .net. Of course I have an HTML resource that contains the html code for display by CDHTMLDialog (which wraps the Webrowser control). I understand how to reference program resources in my HTML using the res: protocol, but I'm having trouble getting the file: protocol to work with relative references. For example, if my embedded HTML resource includes this absolute path in my htmlcode it works fine: < IMG src="file:///C:\Documents and Settings\jim\My Documents\temp\CHtmlApp\Debug\ugly2.bmp" > But if I pu...

counting using multiple criteria
Hi, I have a problem for which I can't seem to find a working solution. On the one hand I have a vertical table with employee names, the number of years they have been with the company, and all this sorted by the employee's age (in years). This table will be updated from time to time, and as such it doesn't have a fixed length. On the other hand I have a table which shows the number of employees in a particular age category (-20, 21-25, 26-30, etc) horizontally, and the number of years they have been with the company (again in groups: 0-5 yrs, 5-10 yrs, etc) vertically. ...

macro to insert rows between sets of records
I have data that looks like this: name class title joe class1 assistant mary class1 assistant zelda class1 assistant al class1 professor ben class1 professor cleo class1 professor dan class1 professor alice class2 student barb class2 student claire class2 student ...and so on the spreadsheet goes. What I want to do is create a macr that will insert 2 blank lines between each 'title' group and insert line above the groupings with the title on it.. so that the resultin spread sheet looks like: name class title assistant joe class1 as...

XML editor using MFC
Hello, I need to develop XML editor using MFC. It needs to feature Tree View of XML. And have to use MFC language. Could you please let me know any pointers? TIA If you don't mind using their library, this one might work for you (you could extend it I think): http://www.firstobject.com/ Tom <adiideas@gmail.com> wrote in message news:ecb8fb5d-b55e-4a9a-b38a-944306d39e32@s19g2000prg.googlegroups.com... > Hello, > > I need to develop XML editor using MFC. It needs to feature Tree View > of XML. > > And have to use MFC language. > > Could you please let ...

Outlook 2000 default map settings
Can you steer me in a direction. I have Outlook 2000 on my computer. The map lookup function was working correctly and pointing to Expedia. I installed Mappoint 2000 on my computer and now Outlook points to the MapPoint RUN CD.I would prefer to reset the default location in Outlook back to Expedia. Thanks, Russ Seeney Just found answer. Ran detect and repair and it reset Outlook 2000 back to using Expedia default setting. Russ >-----Original Message----- >Can you steer me in a direction. I have Outlook 2000 on my >computer. The map lookup function was working correctly &g...

Stop using Passport logon
I want to stop using Passport logon, but do not no how to stop. See http://umpmfaq.info/faqdb.php?q=116. "Patrick Simonds" <ordnance1@comcast.net> wrote in message news:OYB5q6$2EHA.824@TK2MSFTNGP11.phx.gbl... >I want to stop using Passport logon, but do not no how to stop. > In microsoft.public.money, Patrick Simonds wrote: >I want to stop using Passport logon, but do not no how to stop. > Try File->PasswordManager. "Dick Watson" <littlegreengecko@mind-enufalready-spring.com> wrote: >See http://umpmfaq.info/faqdb.php?q=116. At ...

Print a HTML document programatically
Hi, I need to print a html docment dynamically produced at runtime, at that instance. I'm using shellexecute for this, which is popping up the Windows default PrintDialog. I want it to be printed directly. Can anyone suggest a solution or give some sample code for this. Please do reply. Thanks in Advance. Regards, Ajay Kumar Have you looked at IWebBrowser2::ExecWB? This also might be helpful: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnie55/html /wb_print.asp -- Ajay Kalra [MVP - VC++] ajaykalra@yahoo.com "Ajay Kumar" &...

How to use Outline on a protected sheet
I have late in the process of making a template for job estimation, found out that if I protect a worksheet, the outline bar to the side of the sheet will also become protected. I never even considered the possibility of this when I decided to use outline since it does not change any data in the sheet. I use it to enable the user to only expand the part of the sheet he/she is working on. Now I either have to "get back to the drawing board" or leave the worksheet unprotected. Neither is very appealing so the question I have is if anyone know a way around this. I really only need to pr...

Using a function
How do I install the below function in an excel spreadsheet? i received it as suggestion to handle my question below! Function ShowFormula(MyCell) ShowFormula = MyCell.Address & " " & MyCell.Formula End Function I am trying to display in a spreadsheet, the formula in an adjent cell. Any suggestions? EXAMPLE: cell A2 contain formula: =Mid(c3,5.2) In cell B2 i would like to insert a formula displaying above formula. I know that I can copy the formula to cell B2 and save as text by inserting a space before = sign. What I am looking for is an automatic fix. T...

Using the Connection filtering
I read the article KB823866 "How to configure connection filtering to use REaltime Blacklist" and followed the directions for my 2003 exchange server. When I test the configuration using telnet, I do not get an access denied message. It says that it will accept mail from the made up recipient from the domain that is supposed to be denied from connecting to our server. Any suggestions? Reagrads, How are you testing Connection Filtering using telnet?, you would have to simulate the IP address of the SMTP server being blocked? -- Mark Fugatt Exchange MVP http://www.exchanget...

How to use VLookup with a range of numbers?
Hi I'm trying to solve this problem I have and could use some help, I was wondering if its possible to use VLookup to check through a range of data in one cell, ex: 89-100 or 71-74. But I'm not sure if there is a way to make excel understand FROM 89 TO 100 0r 71 TO 74. (Yes I've just started learning excel on my own) This is the problem I'm trying to solve: To calculate the data in the 20 Point Scale column, enter a formula that converts each student’s Final Percentage to a number grade on the 20 Point Scale as outlined below:- 80% and above = 1 75-79% ...

using SetBitmap
Hi, I wrote a program that is a dialog box and has a callback function. In the callback function i need to change a picture that is in the dialog box. Since the Callback function isnt in the same class as the dialog box i cant use -(CStatic*) GetDlgItem( IDC_IMAGE); and have to use - (CStatic*) GetDlgItem(g_hwnd, IDC_IMAGE); In the first case it works... In the second case (which is what i actually need) it throws an exception. the code looks like this - hBitmap = (HBITMAP)::LoadImage( NULL, "c:\\tactix.bmp", IMAGE_BITMAP, 0, 0, LR_DEFAULTSIZE | LR_LOADFROMFILE); pImage = (CStat...

Forecasting using SUMPRODUCT and dates
I am having a problem with counting data that is within a certain date. for example, I have 4 columns. SERVERNAME, LOCATION, TYPE LEASEENDDATE. I am currently using SUMPRODUCT to count the number o servers I have for a particular location and type. A B C D SERVERNAME LOCATION TYPE LEASEENDDATE Server1 MN Web 6/30/2004 Server2 CA App 8/15/2004 SUMPRODUCT((B2:B200="MN")*(C2:C200="Web")) On another sheet, I would like to forecast of how many servers I hav that are not expired...

Heap corruption detected at 01670000 While Using CString
The Following is my function: CString CMem::GetALLData(UINT uStartStep, CString cRequests) { CString Package = "",sSteps, Buffer = ""; cs_Mem.Lock(); try{ int PLen = cRequests.GetLength(), Size = 0, Steps; if( Valid() && pMemStatus != NULL && pMediaBuff != NULL && PLen != 0){ for( int i = 0; i < PLen * 8; i++) { // if the request part is not in the list if( uStartStep + i > CurrentStep && uStartStep + i < CurrentStep + MemSize) { Steps = uStartStep + i - CurrentStep; //if( pMemRSTimes[Steps] &...

Update data from sql, using ODBC
Hi. (Excel 2007) I am preparing a model to be used by multiple users every week. A part of the model is a list of active project in the company. The project informations comes an sql database. In the model I have a table, which should be updated when the excelmodel is opened. The users do not have access to the sql database. Is there a way to set he table (properties, ... ) with the password stored in the model e.g. the users do not have to know and enter the password. Med venlig hilsen Peter ...

Thread using GetSystemTime() problem
Hi. This code compiles fine but generates an "unhandled win32 exception" error at runtime: UINT Thread1(LPVOID Param){ LPSYSTEMTIME time; GetSystemTime(time); return 0; } I call it in the OnInitDialog() method: CWinThread *th=AfxBeginThread(Thread1,this); If I just remove GetSystemTime(time) everything runs ok. Any ideas? azsx wrote: > Hi. This code compiles fine but generates an "unhandled win32 > exception" error at runtime: > UINT Thread1(LPVOID Param){ > LPSYSTEMTIME time; > GetSystemTime(time); > return 0; > } The API requires a pointer ...

Setting up another account outlook 2007
I have a user on exchange 2003sp2 and outlook 2007. He wants an account where he can send from for an account at another domain which is hosted by a provider as pop3/imap. currently emails to his account at that domain get forwarded to his exchange account. What would be the best method to allow him to send from this account in his outlook 2007. Im thinking just add an account POP3 and declare another folder for that mail to go to. Any better methods?? regards Craig Change his reply address to the other account's address. -- Ed Crowley MVP "There ...

2003 insisting on using US Date Format
There I was, plodding along, setting up a flowchart. I was just about to hit print, when I noticed that the dates were set to US format (which could have caused real confusion, had it been yesterday or earlier!) My entire system is set to UK - including the Office Global Language settings. Is this a known issue with Visio - I seem to recall something similar with FrontPage a couple of versions ago where it would only spell check in American English (irrespective of what flavour of English the system was using). This doesn't reflect well on me when I'm trying to put together a profess...

Paste Data to Sheet programatically
I want to be able to "Copy and Paste" one Sheet to another using th Excel Com component for version 2000. At the moment I have written something like the code below, but th THEN-part doesn't work. Here is an example: // source_worksheet is a WorkSheet from another WorkBook that ma contain data. IF WorkSheetFound (workbook=myWorkBook, string sheetName=strSheetName) THEN { dest_worksheet = getWorkSheet (myWorkBook, trSheetName); //dest_worksheet is an existing WorkSheet in currentWorkBook //Paste Source to Destination - worksheet source_worksheet.Paste (Destination = dest_work...