How to force open a new window in HTML?

  • (2 Pages)
  • +
  • 1
  • 2

15 Replies - 4203 Views - Last Post: 29 September 2010 - 11:42 PM

#1 Bbob  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 20
  • Joined: 09-September 10

How to force open a new window in HTML?

Posted 29 September 2010 - 01:37 AM

Hi

How do I open a new window (not tab) in HTML with a specific size?
Is This A Good Question/Topic? 0
  • +

Replies To: How to force open a new window in HTML?

#2 Dormilich  Icon User is offline

  • 痛覚残留
  • member icon

Reputation: 3490
  • View blog
  • Posts: 10,058
  • Joined: 08-June 10

Re: How to force open a new window in HTML?

Posted 29 September 2010 - 01:41 AM

if I recall right, only with Javascript (window.open). HTML itself doesn’t care, where the window will be opened, as it only provides a content filled structure.
Was This Post Helpful? 2
  • +
  • -

#3 PhunkRabbit  Icon User is offline

  • D.I.C Regular
  • member icon

Reputation: 81
  • View blog
  • Posts: 406
  • Joined: 23-August 10

Re: How to force open a new window in HTML?

Posted 29 September 2010 - 01:45 AM

Dormilich is right, if you want a specific size then you are going to need to use Javascript.

Generally, it is better to use a modal window (like alight box but for HTML content, much like facebook) rather than an attual browser window. It keeps the user focused on your site and retains the consistancy between your site and the new windows content.

That is unless you have a specific need (popup ad? eek.)
Was This Post Helpful? 1
  • +
  • -

#4 Bbob  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 20
  • Joined: 09-September 10

Re: How to force open a new window in HTML?

Posted 29 September 2010 - 04:40 AM

Thanks for the quick response.

Is modal window a HTML or JS script? This is the first time Ive heard of it :sweatdrop:


As for my purpose, Im using this as an alternative to a jQuery upload script - havent quite got this code yet, so I decided to use a popup window for now.
Was This Post Helpful? 0
  • +
  • -

#5 Dormilich  Icon User is offline

  • 痛覚残留
  • member icon

Reputation: 3490
  • View blog
  • Posts: 10,058
  • Joined: 08-June 10

Re: How to force open a new window in HTML?

Posted 29 September 2010 - 04:48 AM

a modal window is part of the GUI (graphical user interface). and as such definitely not HTML.
Was This Post Helpful? 1
  • +
  • -

#6 Bbob  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 20
  • Joined: 09-September 10

Re: How to force open a new window in HTML?

Posted 29 September 2010 - 04:56 AM

Thanks for a the reply. Ill do some digging in regards to modal windows.
Was This Post Helpful? 0
  • +
  • -

#7 PhunkRabbit  Icon User is offline

  • D.I.C Regular
  • member icon

Reputation: 81
  • View blog
  • Posts: 406
  • Joined: 23-August 10

Re: How to force open a new window in HTML?

Posted 29 September 2010 - 04:56 AM

View PostDormilich, on 29 September 2010 - 10:48 AM, said:

a modal window is part of the GUI (graphical user interface). and as such definitely not HTML.


Maybe I miss represented what I ment.

Modal window asin an image lightbox but rather than just display an image they can display content/HTML etc.

It dim's the page and presents the desired content ontop.

It is generated in HTML using Javascript/JQuery. Effectivly a popup window/new window within the original.
Was This Post Helpful? 0
  • +
  • -

#8 Dormilich  Icon User is offline

  • 痛覚残留
  • member icon

Reputation: 3490
  • View blog
  • Posts: 10,058
  • Joined: 08-June 10

Re: How to force open a new window in HTML?

Posted 29 September 2010 - 05:00 AM

as example, a Javascript prompt/alert/confirm is a modal window. lightbox does something similar, but it‘s not a modal window itself (it’s just an element overlaying the content, not a window instance itself)
Was This Post Helpful? 1
  • +
  • -

#9 PhunkRabbit  Icon User is offline

  • D.I.C Regular
  • member icon

Reputation: 81
  • View blog
  • Posts: 406
  • Joined: 23-August 10

Re: How to force open a new window in HTML?

Posted 29 September 2010 - 05:14 AM

Nice, thanks for the clarification Dormilich.
Was This Post Helpful? 0
  • +
  • -

#10 Bbob  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 20
  • Joined: 09-September 10

Re: How to force open a new window in HTML?

Posted 29 September 2010 - 06:25 AM

Hi

I dont think I wont be able to use Modal Window :( as the uploading script I would use is in PHP, which would require the page to reload. So Im stuck with the window :(
Was This Post Helpful? 0
  • +
  • -

#11 Bbob  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 20
  • Joined: 09-September 10

Re: How to force open a new window in HTML?

Posted 29 September 2010 - 06:32 AM

Hi

How do I open a new window (not tab) in HTML with a specific size?

The purpose is to use this pop up window for an upload script
Was This Post Helpful? 0
  • +
  • -

#12 husseycoding  Icon User is offline

  • D.I.C Head
  • member icon

Reputation: 52
  • View blog
  • Posts: 174
  • Joined: 23-June 10

Re: How to force open a new window in HTML?

Posted 29 September 2010 - 08:06 AM

Hi Bbob,

I will assume you mean Javascript not HTML seeing as this is posted in the javascript forums...

You can open a link in a new window using HTML, but you cannot define any properties of it. For this, you can use the window.open Javascript method. This allows you to set a good number of parameters for the window to be created including the size of it.

This page describes the method and how to use it

Note that there is a likely hood many browsers popup stoppers will block the window.open method, so you may instead want to instead use a lightbox type div overlay affect instead...
Was This Post Helpful? 0
  • +
  • -

#13 macosxnerd101  Icon User is online

  • Self-Trained Economist
  • member icon




Reputation: 10397
  • View blog
  • Posts: 38,467
  • Joined: 27-December 08

Re: How to force open a new window in HTML?

Posted 29 September 2010 - 06:23 PM

Duplicate topics merged. Please avoid duplicate posting.
Was This Post Helpful? 0
  • +
  • -

#14 ninechances  Icon User is offline

  • D.I.C Head

Reputation: 6
  • View blog
  • Posts: 188
  • Joined: 08-February 10

Re: How to force open a new window in HTML?

Posted 29 September 2010 - 09:17 PM

i would suggest looking for some jQuery tutorials for displaying content in a lightbox as mentioned above. They are mostly plug-ins and easily customizable.

noupe.com is a decent resource
Was This Post Helpful? 0
  • +
  • -

#15 Bbob  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 20
  • Joined: 09-September 10

Re: How to force open a new window in HTML?

Posted 29 September 2010 - 11:36 PM

Hi

Sorry for the duplicate thread. I though I was suppose to repost this in the JS forum as this is a JS related problem.


Is it possible to reload or redirect to itself a lightbox/modal window?
Was This Post Helpful? 0
  • +
  • -

  • (2 Pages)
  • +
  • 1
  • 2