473,387 Members | 1,572 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,387 software developers and data experts.

Basics - How to open/close window?

I'm new to JavaScript, but would like to include some basic functionality on
a web page. Any help is appreciated.

I use Dreamweaver MX and want to call a simple JavaScript function
onMouseOver on a hotspot in an image. When the user mouses over the
hotspot, a window opens; and when he mouses out, the window closes. There
are several hotspots in the image, and each one needs to have different text
associated with it. So each hotspot brings up a window with different
text - sort of like the Alt tag, or a tool tip. Is this very complicated to
code?

Thanks in advance.
Jul 23 '05 #1
2 2052
On Sun, 08 Aug 2004 13:38:46 GMT, deko wrote:
..So each hotspot brings up a window with different
text - sort of like the Alt tag, or a tool tip.
Pop-ups?
..Is this very complicated to
code?


Probably not, but it is even easier to
prevent, either intentionally and accidentally.

I have probably dealt with 4 cases in the last
3 days of new windows (Java applets, Javascript,
and HTML) not popping up correctly or at all,
that came back to a pop-up blocker ..usually
one that the poster had no idea was the problem,
even if the blocker was *telling* them so in
a little icon.

Pop-ups are going the way of the DoDo,
and web developers need to start thinking
around them.

--
Andrew Thompson
http://www.PhySci.org/ Open-source software suite
http://www.PhySci.org/codes/ Web & IT Help
http://www.1point1C.org/ Science & Technology
Jul 23 '05 #2
> Pop-ups are going the way of the DoDo,
and web developers need to start thinking
around them.


Good point. I think a better solution may be showing/hiding css layers with
a z-index. I should have enough control with a div to do what I need. One
problem that I'm experiencing in beta testing is that Layers seem to be
unsocial - they don't like other divs around them.

Here are the proposed Layers that will be shown/hidden
onMouseOver/onMouseOut:

<div id="layer01" style="position:absolute; left:144px; top ... [code
omitted]</div>
<div id="layer02" style="position:absolute; left:320px; top ... [code
omitted]</div>
[and so on for about 30 layers]

Here is the image/hotspot/map:

<img src="images/bigImage.gif" name="bigImage" width="760" height="520"
border="0" usemap="#bigImage">

<map name="oxpmainform14">

<area shape="rect" coords="28,54,52,411" href="#"
onMouseOver="MM_showHideLayers('layer01','','show' );MM_setTextOfLayer('text
for layer01')" onMouseOut="MM_showHideLayers('layer01','','hide') ">

[required JavaScript is generated nicely by Dreamweaver]

<area shape="rect" coords="226,185,474,237" href="#"
onMouseOver="MM_showHideLayers('layer02','','show' );MM_setTextOfLayer('text
for layer02')" onMouseOut="MM_showHideLayers('layer02','','hide') ">

<area shape="rect" coords="58,460,218,479" href="#" alt="" >
<area shape="rect" coords="264,45,481,55" href="#" alt="" >
[and so on for about 30 hotspots]
</map>

Okay, that works - but what about my external style sheet? I have several
other divs that are used in the page above and below the bigImage. The
problem is when I try to put a div id above the Layers, or try to put the
Layers inside a parent div - then my behaviors don't work. Why is this
happening?

<div id="bodyContent"> <== this screws up behaviors when placed above
Layers

<div id="layer01" style="position:absolute; left:144px; top ... [code
omitted]</div>
<div id="layer02" style="position:absolute; left:320px; top ... [code
omitted]</div>
[and so on for about 30 layers]

....
Jul 23 '05 #3

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

Similar topics

19
by: Albretch | last post by:
Hi, client wants for a window with no toolbars to open (technical and 'esthetical' reasons) after the window, user clicks on, is being closed. I told them about security settings in browsers...
18
by: Roger Withnell | last post by:
I open a new window from the current window to display maps. Several maps of different sizes can be displayed. The function is given the size of the map and adjusts the window size accordingly....
13
by: ldan | last post by:
Hi everybody, I would not consider myself an expert in javascript - but so far whatever I know, helped me reaching my goals. Recently I started to experience a lot of javascript errors related...
14
by: chitu | last post by:
Hi pals, Hope u all of r intersted in C programming.Let start from d basics.
2
by: Buddha Pest | last post by:
The 1st window opens the 2nd window. The 2nd window opens the 3rd window. From the 3rd window, how do I close the 3rd and 2nd windows then change the URL of the 1st window? Thanks.
11
by: Dave | last post by:
For some reason, the below lines only work on select machines. All machines are running IE6. IE SP's and OS's vary. When it doesn't work, default.aspx (the page that this code is in) opens and...
1
by: Socrates | last post by:
Hi - Have tried for half and hour to get this script to work: I am trying to close the parent window while opening a centred new child window I would be grateful if someone could correct the...
7
by: Toccoa | last post by:
After considerable googling - I mean searching with Google(r) - I could not find javascript on a button or <a href=... to close a window in the latest versions of IE and FireFox. There seemed...
4
by: sheldonlg | last post by:
Does anyone know how to open a window and have it close by itself? You may ask why, but here it is. I want to have it open (a php script), run that script, and then close itself. I have an...
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: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
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
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
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...

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.