473,399 Members | 2,278 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,399 software developers and data experts.

IE shows site directory after onclick window.open

Jaz

Is this how it's done? IE 6.0 after opening bigger.html in a new page,
then shows the site directory contens in the main window. ?!

The popup page bigger.html shows a larger pic of a product. In my main
page I define a function 'open_popup' and call it for all the product
images, in case the customer wants a bigger pictures.

function open_popup(page) {
window.open(page,'Larger_Image','width=400,height= 300,resizable=yes,toolbar=no,statusbar=no,scrollba rs=no');
}

<body>
<a href="" onclick="return open_popup('bigger.html')">
<img src="small.jpg" alt="Small" width="50" height="50"></a>

Any advice? If this is a really bad thing to do then what's
reommended?
Thanks
(Please excuse the 'burp' when replying)
Jul 20 '05 #1
4 3330
On Fri, 30 Jan 2004 22:01:39 GMT, Jaz wrote:
Is this how it's done? IE 6.0 after opening bigger.html in a new page,
then shows the site directory contens in the main window. ?!
'cause href attribute on your A tag is empty; and your open_popup function
hasn't a "return false" statement.
function open_popup(page) {
window.open(page,'Larger_Image','width=400,height= 300,resizable=yes,toolbar=no,statusbar=no,scrollba rs=no'); Add in this point:

return false;
}

<body>
<a href="" onclick="return open_popup('bigger.html')">


And use

<a href="#"

or

<a href="javascript:void(0)"

or use a html file, useful for users with JS disabled:

<a href="/nojs.htm"
--
C'ya,
ZER0 :: coder.gfxer.webDesigner();

"When you have eliminated the impossible, whatever remains,
however improbable, must be the truth." (S.H.)
Jul 20 '05 #2
Jaz
ZER0 <ze********@libero.it> forgot to take the pills and typed:
On Fri, 30 Jan 2004 22:01:39 GMT, Jaz wrote:
Is this how it's done? IE 6.0 after opening bigger.html in a new page,
then shows the site directory contens in the main window. ?!


'cause href attribute on your A tag is empty; and your open_popup function
hasn't a "return false" statement.
function open_popup(page) {
window.open(page,'Larger_Image','width=400,height= 300,resizable=yes,toolbar=no,statusbar=no,scrollba rs=no');

Add in this point:

return false;
}

<body>
<a href="" onclick="return open_popup('bigger.html')">


And use

<a href="#"

or

<a href="javascript:void(0)"

or use a html file, useful for users with JS disabled:

<a href="/nojs.htm"


Thank you! I also noticed that if I just remove href altogether then
it behaves (but I supposed this sloppy).

Another question while I'm at it -- if I pick another image, the .html
loads into the popup (good -- I don't want many popups), but the popup
windows falls to the back (underneith the main window) -- is there a
way to keep it on top?

Thanks again!
(Please excuse the 'burp' when replying)
Jul 20 '05 #3
On Fri, 30 Jan 2004 22:22:22 GMT, Jaz wrote:

[cut]
Another question while I'm at it -- if I pick another image, the .html
loads into the popup (good -- I don't want many popups), but the popup
windows falls to the back (underneith the main window) -- is there a
way to keep it on top?
Of course, try with this code:

window.open(<your settings here>).focus();
Thanks again!


Don't worry :)

--
C'ya,
ZER0 :: coder.gfxer.webDesigner();

"When you have eliminated the impossible, whatever remains,
however improbable, must be the truth." (S.H.)
Jul 20 '05 #4
Jaz
ZER0 <ze********@libero.it> forgot to take the pills and typed:
On Fri, 30 Jan 2004 22:22:22 GMT, Jaz wrote:

[cut]
Another question while I'm at it -- if I pick another image, the .html
loads into the popup (good -- I don't want many popups), but the popup
windows falls to the back (underneith the main window) -- is there a
way to keep it on top?


Of course, try with this code:

window.open(<your settings here>).focus();
Thanks again!


Don't worry :)


Thank you! Thank you! Thank you! Thank you! Thank you! Thank you!

That works great! :^)
(Please excuse the 'burp' when replying)
Jul 20 '05 #5

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

Similar topics

1
by: ck388 | last post by:
I am trying to open a frameset in a new window......where the frame called "main" shows the file called customerGeneral.aspx. I can't get it to work though...i always get something like...
5
by: Mike | last post by:
In my previous post, I wrote: > ... > GOAL: (very simple) Provide a hyperlink which, when clicked, > calls a javascript function which opens a new URL. > ... > PROBLEM: The following code...
8
by: Bijoy Naick | last post by:
It seems like the BBC sports site is able to get past popup blockers.. For eg.. http://news.bbc.co.uk/sport1/hi/cricket/default.stm. Click on the Video icon under "Watch and Listen" - right hand...
2
by: Trent | last post by:
Hey All, I am new to javascript and currently coding a site with scripts that are beyond my level of understanding. The problematic page has thumbnail images that can be clicked on to zoom in....
3
by: vivek9856 | last post by:
I am making a website and I need help promptly. Here is the code first off -----File Header.htm----- <HTML> <HEAD> <TITLE>Black Hawk Down</TITLE> </HEAD> <LINK REL=stylesheet...
5
by: VB Programmer | last post by:
Here's the quick situation: 1. Using VS.NET I create 1 fully functioning aspx page, with code behind. (Simple webform: It has a few text boxes, 1 hyperlink, 2 and buttons.) 2. I uploaded it to...
4
by: jodleren | last post by:
Hi all I have a file I open in a smaller window, like this: <a href="#" onclick="window.open.... but it also causes the main window to jump to the top. What have people done to avoid that?...
2
by: tridirk | last post by:
Hi; I am getting a Objceted Expected Error on my forum site. I can't find what is wrong? Line: Char: Error: Object expected Code:0 the site is My SMF Forum
2
by: registry | last post by:
<%@Language="VBSCRIPT" CODEPAGE="1252"%> <html> <head> <title>Registry Network Hospital Detail</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <script...
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?
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...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new...

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.