codetoad.com
  ASP Shopping CartForum & BBS
  - all for $20 from CodeToad Plus!
  
  Home || ASP | ASP.Net | C++/C# | DHTML | HTML | Java | Javascript | Perl | VB | XML || CodeToad Plus! || Forums || RAM 
Search Site:
Search Forums:
  STARTING a page dynamically  DavidH_TML at 03:02 on Saturday, December 06, 2003
 

I am learning all sorts of things about changing an already loaded page in amazing (sometimes even practical) ways, but what about controlling the start?

For instance, I can't figure out how (or when) to scale the first appearance of an image using for example:

width="' + the_image.width * zoom_size + '"

Ideally this would allow a simple 2x zoom (which looks fine in higher resolutions) without hard-coding the size of every image.

It would need to be done after the image is preloaded of course. I've tried using document.write() with various annoying results depending on placement (during load, after preloadImages(), in the document body).

The code works except when applying the image properties into the first use of the image itself. Placing the write method in the document body works - after refresh!

How do I call a function, being certain the image is ready, and have document.write() behave (not blanking the page)?

Or is there another way? Or am I just 18,406% better off using one of the more standard page-scaling tactics?

I'm too used to code that flows in order!








CodeToad Experts

Can't find the answer?
Our Site experts are answering questions for free in the CodeToad forums








Recent Forum Threads
•  Re: JavaSript Problem In Mac Safari Browser
•  Re: DHTML div positionning Problem
•  Convert script to NS6 compatible - Please Help!
•  Print .doc file from the website using System.Diagnostics.Process
•  Re: Fullscreen code
•  Re: iframe targeting
•  Excel n ASP
•  Remote Cart Shopping Cart
•  Mouse click coordinates on an ActiveX control?


Recent Articles
Communicating with the Database (Using ADO)
MagicGrid
Simple Thumbnail Browsing Solution
Type Anywhere
A Better Moustrap: FmtDate to replace FormatDateTime
ASP.NET Forum Source Code
Internal Search Engine
Javascript Growing Window
Simple date validation
Search engine friendly URLs using ASP.NET (C#.NET)


Site Survey
Help us serve you better. Take a five minute survey. Click here!

© Copyright codetoad.com 2001-2005