473,383 Members | 1,984 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,383 software developers and data experts.

Opening a popup window faster

Hello,

on our homepage, when pressing an anchor tag, a special sized popup
window opens via javascript. but it opens very slowly.

on other web pages, there are also javascript-opened windows, but they
load very very fast, within 2-3 seconds.

i tried several things such as :

// directly in href attribute
<a href="javascript:window.open('the_url','','toolbar =0, location=0,
directories=0, status=0, menuBar=0, scrollBars=1, resizable=0,
width=624, height=500, top=15');">test1</a>

// in an onclick event
<a href="#" onclick="javascript:window.open('the_url','','tool bar=0,
location=0, directories=0, status=0, menuBar=0, scrollBars=1,
resizable=0, width=624, height=500, top=15');">test2</a>
// or in a function, first open popup,
// then load content into popup via reference
var anotherPopup = null;
function openAnotherPopup() {
anotherPopup = window.open('','anotherPopup','width=600,height=32 3,status=no,toolbar=no,menubar=no,directories=no,l ocation=no,scrollbars=no,resizable=yes,alwaysRaise d=no,screenX=20,screenY=5,titlebar=yes,z-lock=yes,left='
+ (screen.width - 728) / 2 + ',top=' + (screen.height - 586) / 2);
anotherPopup.location = "the_url";
anotherPopup.focus();
}
in the web page i've mentioned before (the one that opens popups very
fast) the first approach is used.

i use IE 6.0, windows 2000 prof and have 1 gb ram.
the popups of our site doesn't open a bit faster even no other
application is running on my system.

firefox opens the popup very fast, ok, but how does it come, that IE
6.0 opens a popup of a site much faster than the popups of another ?
can anybody help with this problem ?
Jul 23 '05 #1
3 4261
On 30 Dec 2004 05:00:35 -0800, Mehmet Gunacti <ms*****@gmx.net> wrote:

[snip]
<a href="javascript:window.open('the_url','','toolbar =0, location=0,
directories=0, status=0, menuBar=0, scrollBars=1, resizable=0,
width=624, height=500, top=15');">test1</a>


1) It's almost always wrong to use the javascript: pseudo-protocol
in links[1]. In this particular case, it most certainly is. Never
open a pop-up like this. Not only will users without Javascript
be unable to reach the page, but people like me who middle-click
links[2] will get nothing but a blank page.
2) The feature string should not contain spaces.
3) You should never attempt to make a window fixed in size, nor
attempt to remove the status bar. Decent browsers won't let you,
anyway.

The more acceptable way to present that link would be:

<a href="http://www.example.com/" target="myWindow"
onclick="window.open(this.href, this.target,
'status,scrollbars,resizable,width=624,height=500, top=15');
return false;">

Now it will work for everyone.

Notice that I omitted several of the features - those that are missing are
automatically disabled (with an exception or two, like the title bar).

[snip]

Mike
[1] I would *always* consider it wrong on the Web.
[2] Middle-clicking a link in most (all?) tabbed browsers opens the
link in a new tab.

--
Michael Winter
Replace ".invalid" with ".uk" to reply by e-mail.
Jul 23 '05 #2
Mike,

actually it's the opening windows' size was not my decision, and i don't
want to quarrel with the programmers here. but i appreciate what you
explained and how a link should look like. i'll modify the way the popup
opens.

but the popup still opens very very slowly. the opener window freezes
until the popup appears. do you know a way to make this faster ?

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Jul 23 '05 #3
On 30 Dec 2004 07:55:29 -0600, Mehmet Serkan Gunacti <ms*****@gmx.net>
wrote:
[...] the opening windows' size was not my decision,
It's not necessarily the size that's a problem, but the fact that original
code tried to prevent the window from being resized. What if a user
overrides the font sizes and makes them larger to compensate for their
poor eyesight? Thankfully the window would provide scrollbars, but it
would be much nicer if the user could make them unnecessary by making the
window bigger.

[snip]
but the popup still opens very very slowly. the opener window freezes
until the popup appears. do you know a way to make this faster ?


No, not really. The speed at which a new window opens will vary based on
what the window will contain (complex nested tables [which should be
avoided] will take longer to render than simple semantic mark-up), how
well the browser was written, and various load factors on the computer.
So, aside from making sure your mark-up is simple (and valid), I doubt
there is anything you can do.

Mike

--
Michael Winter
Replace ".invalid" with ".uk" to reply by e-mail.
Jul 23 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Jawahar Rajan | last post by:
All, I have a printer friendly page that is opened when a user clicks a link on my page to get the printer friendly version, How ever when they close out the printer friendly version and return to...
1
by: MJEASSOC | last post by:
I need some help with closing a popup window. I'm making an online portfolio, that has one base page with text and thumbnails. When a user clicks on a thumb, a new window opens containing a larger...
1
by: Todd Cary | last post by:
I am using PHP to create a button on a window so that a new window is created when the button is clicked. Is there a way to create a new window inline; that is create a window on top of the...
14
by: D. Alvarado | last post by:
Hello, I am trying to open a window containing an image and I would like the image to be flush against the window -- i.e. have no padding or border. Can I make this happen with a single call to a...
0
by: Jack Addington | last post by:
I have a 'quickadd' type window for doing quick data entry. The window is launch from a MDI child and is suppose to be a re-sizable popup/child window. This is an excel type datagrid for doing...
5
by: Jay | last post by:
I have a situation where the user clicks on a button in a DataGrid to launch a popup window via javascript. In the popup window the user does some things that result in changes to the underlying...
2
by: Matt Hamilton | last post by:
I have an application page with a datagrid with a checkbox on each row. The user should check the rows they want to modify and then click a button. When the button is clicked, I have a Click...
1
by: Jennyfer J Barco | last post by:
Hello I have a datagrid and a linkbuttom in the datagrid that says Picture, every time I click on the link "Picture" my program opens a popup window showing a picture of the item the selected and...
26
by: Nospam | last post by:
I am trying to open a link in a new template window : <a onclick="windowopen('example.html','example');return false;" href="http://www.example.com" target="_blank"example link</a> such that...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.