Connecting Tech Pros Worldwide Help | Site Map

How to get a pop-up box (not a new window) appears on mouse click?

piggy
Guest
 
Posts: n/a
#1: Dec 12 '05
I want to do something, but i dont know how clear i'm going to explain
it. Please help me with this matter. Following is what i want to b
done.

i'm doing a web site which has several items (which suppos to b links)
listed one after one.

When u click on each item, there is a description to b appeared over
the page. What i want is, this description page (or rather a box)
should appear over the excisting details of the page, and also i want a
close button (something like this to click >>> CLOSE [X] ) on it too.

This shouldn't b another (pop-up) window, but some kind of a box which
come on top of the page, and on a possition a give.

i would b appreciate If anybody can help me with this issue.

Thanks a lot...!!! :)

Randy Webb
Guest
 
Posts: n/a
#2: Dec 12 '05

re: How to get a pop-up box (not a new window) appears on mouse click?


piggy said the following on 12/12/2005 4:02 AM:[color=blue]
> I want to do something, but i dont know how clear i'm going to explain
> it. Please help me with this matter. Following is what i want to b
> done.[/color]

No matter how many times you copy/paste that post, the answer will
remain the same. Also, changing your posting name won't change the
answer either. Read the reply to your last post with this same exact
question in it.

--
Randy
comp.lang.javascript FAQ - http://jibbering.com/faq & newsgroup weekly
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
hansschmucker@gmail.com
Guest
 
Posts: n/a
#3: Dec 12 '05

re: How to get a pop-up box (not a new window) appears on mouse click?


1. Piggy, you really shouldn't post multiple times
2. Randy, try to be a little nicer. Just try. You can do it (Refering
to your comment in the previous post as well)

3. Solution:
Create a div containing your message and place it somewhere on the
page. You can use a WYSIWYG editor for that, just make sure it's all in
one div and giv it an id, like id="messagePopup", also make sure that
the stylesheet definition includes "display:none;"
So it should look something like:
<div id="messagePopup" style="display:none; position:absolute;
left=20px; top=15px;">Your message</div>
Then, when you want it to appear, let's say when the user clicks an
imagem add an event handler which removes display:none :
<img src="something.png"
onclick='javascript:document.getElementById("messa gePopup").style.display="";'
/>
For your close button inside the div you do exactly the same, only that
you set display:none again:
<img src="something.png"
onclick='javascript:document.getElementById("messa gePopup").style.display="none";'
/>

Hope that makes sense.

Randy Webb
Guest
 
Posts: n/a
#4: Dec 13 '05

re: How to get a pop-up box (not a new window) appears on mouse click?


hansschmucker@gmail.com said the following on 12/12/2005 7:46 AM:

Please quote what you are replying to.

If you want to post a followup via groups.google.com, don't use the
"Reply" link at the bottom of the article. Click on "show options" at
the top of the article, then click on the "Reply" at the bottom of the
article headers.
[color=blue]
> 1. Piggy, you really shouldn't post multiple times[/color]

Agreed.
[color=blue]
> 2. Randy, try to be a little nicer. Just try. You can do it (Refering
> to your comment in the previous post as well)[/color]

Do I have to? Aww man, this is gonna be tough but I will try :)
[color=blue]
> 3. Solution:[/color]

All of that is covered in the article I gave the URL to. It also covers
a lot more than that but it is all related, in depth, and well explained.

--
Randy
comp.lang.javascript FAQ - http://jibbering.com/faq & newsgroup weekly
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
piggy
Guest
 
Posts: n/a
#5: Dec 21 '05

re: How to get a pop-up box (not a new window) appears on mouse click?


Thank dude...

i'm really sorry if i'v been annoying to send multiple masages... i
sent the same for the second time, bocs os that other one didnt try to
answer me, and i thot wen u guys see a massage which hav been replyed,,
so any other one wont look at it & try to answer..

thanks alot again....

Closed Thread


Similar JavaScript / Ajax / DHTML bytes