Control Page Setup with Code

  • 12 years ago

    Is there any way to control "Page Setup" attributes with JavaScript?  For example, I would like to set margins and page orientation when the user views my webpage automatically.

    Any assistance provided would be much appreciated.  Thank you in advance!

    Aaron



  • 12 years ago

    Look at the document or window collection, you can manipulate all the settings, befor CSS was around, Javscript was used to set all the style components of the browser.

    Hoever, I would err a note of caution because people do not like having their windows manipulated, eg, size, position, etc, I am one of those people and if your one of those sites that pulls stunts like that, moving or changing the size of my window, gets you an alt+F4 or a double quick click on the X close window.

    So bewarned, you could be alienating yourself from potential repeat visitors.

Post a reply

Enter your message below

Sign in or Join us (it's free).

Contribute

Why not write for us? Or you could submit an event or a user group in your area. Alternatively just tell us what you think!

Our tools

We've got automatic conversion tools to convert C# to VB.NET, VB.NET to C#. Also you can compress javascript and compress css and generate sql connection strings.

“Weeks of coding can save you hours of planning.”