Solved

open pop up window without Javascript enabled

Posted on 2006-10-25
8
1,856 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
3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

 
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

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

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

Popularity Can Be Measured Sometimes we deal with questions of popularity, and we need a way to collect opinions from our clients.  This article shows a simple teaching example of how we might elect a favorite color by letting our clients vote for …
Foreword (July, 2015) Since I first wrote this article, years ago, a great many more people have begun using the internet.  They are coming online from every part of the globe, learning, reading, shopping and spending money at an ever-increasing ra…
This tutorial walks through the best practices in adding a local business to Google Maps including how to properly search for duplicates, marker placement, and inputing business details. Login to your Google Account, then search for "Google Mapmaker…
The is a quite short video tutorial. In this video, I'm going to show you how to create self-host WordPress blog with free hosting service.

920 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

15 Experts available now in Live!

Get 1:1 Help Now