Solved

open pop up window without Javascript enabled

Posted on 2006-10-25
8
1,857 Views
Last Modified: 2012-06-27
How can I open a pop window of particular size even when the javascript is disabled on the browser  on my ASP page ?
0
Comment
Question by:ranirajesh
  • 2
  • 2
  • 2
  • +2
8 Comments
 
LVL 50

Expert Comment

by:Ryan Chong
ID: 17802258
if you want a resized pop up, sorry, you CAN'T do it without javascript, if you want open a pop up generally, it can be done by set the hyperlink's target to "blank", like:

<a href="test.asp" target="_blank">Test</a>
0
 

Author Comment

by:ranirajesh
ID: 17802288
This is what I use currently
Window.open(url, name, "toolbar=0,location=0,directories=0,status=yes,menubar=no,scrollbars=1,resizable=yes,width, height);

But it won't work when the Javascript is disabled . Also target =_blank opens a new window with all the toolbar which I don't want ..
0
 
LVL 50

Expert Comment

by:Ryan Chong
ID: 17802656
yup, and i think that's no perfect solutions here.. javascript must be enabled if you want to resize the pop up window.
0
Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

 
LVL 16

Expert Comment

by:HackneyCab
ID: 17803210
If someone is not using Javascript, then you can't control the behaviour of their browser. Which is probably why that person has disabled Javascript. Many people hate pop-ups, pop-unders, resized content windows, etc. You'll have to accept that you cannot get the result you want for visitors who are not allowing Javascript to run.

Do you really need to use a pop-up? Even for the people who have Javascript enabled, unwanted pop-ups are the sort of thing that persuade visitors to avoid a site. Even the triggered pop-ups are annoying if the new content could have been opened in the same window without consequence. These days people are becoming very capable of opening new content in a fresh window or tab using the right-mouse context menu.
0
 
LVL 16

Expert Comment

by:OliWarner
ID: 17808390
>> Also target =_blank opens a new window with all the toolbar which I don't want ..

I'm afraid, what you want and what you're going to get without JS enabled are two very different things. The nearest to what you want is just a plain target="_blank" popup.
0
 
LVL 6

Accepted Solution

by:
Basilisci earned 500 total points
ID: 17810181
Here's a solution that degrades gracefully. It will open a clean popup if javascript is enabled, and a normal new browser window if javascript is disabled.

<a href="test.asp" target="_blank" onclick="window.open('test.asp', 'somename', "toolbar=0,location=0,directories=0,status=yes,menubar=no,scrollbars=1,resizable=yes,width, height); return false;"
>Test</a>

Notice the return false; -statement in onclick, it prevents the normal link action from happening (opening new window) after the javascript is executed.
0
 
LVL 16

Expert Comment

by:HackneyCab
ID: 17811743
Basilisci's suggestion is probably the very closest you're going to get.
0
 

Author Comment

by:ranirajesh
ID: 17832091
Yes I guess Basilisci's is the closest solution  I can get to .

Thanx Basilisci ! Though I wish there was a way to get the pop up window in ASP !
0

Featured Post

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Why do we like using grid based layouts in website design? Let's look at the live examples of websites and compare them to grid based WordPress themes.
Although it can be difficult to imagine, someday your child will have a career of his or her own. He or she will likely start a family, buy a home and start having their own children. So, while being a kid is still extremely important, it’s also …
Viewers will get an overview of the benefits and risks of using Bitcoin to accept payments. What Bitcoin is: Legality: Risks: Benefits: Which businesses are best suited?: Other things you should know: How to get started:
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.

786 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question