Solved

open pop up window without Javascript enabled

Posted on 2006-10-25
8
1,855 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 49

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 49

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
 
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
Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

 
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

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

Both Easy and Powerful How easy is PHP? http://lmgtfy.com?q=how+easy+is+php (http://lmgtfy.com?q=how+easy+is+php)  Very easy.  It has been described as "a programming language even my grandmother can use." How powerful is PHP?  http://en.wikiped…
"In order to have an organized way for empathy mapping, we rely on a psychological model and trying to model it in a simple way, so we will split the board to three section for each persona and a scenario and try to see what those personas would Do,…
The viewer will learn how to count occurrences of each item in an array.
Any person in technology especially those working for big companies should at least know about the basics of web accessibility. Believe it or not there are even laws in place that require businesses to provide such means for the disabled and aging p…

744 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now