This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes HTML, CSS and JavaScript and the fly likes Display a Pointer Box When Page Opens Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "Display a Pointer Box When Page Opens" Watch "Display a Pointer Box When Page Opens" New topic
Author

Display a Pointer Box When Page Opens

Steve Dyke
Ranch Hand

Joined: Nov 16, 2004
Posts: 1393
I do not really know what to call what I want so hoplfully this explanation will do.

When a web page opens I would like a comment in the form of a box with a pointer(maybe a bubble) pointing to a particular control on the page with text inside the box giving instruction. This would be superimposed on the web page.

I know how to use DIV tags for popups but I want a fancier display than just a rectangle.
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60739
    
  65

Give the div a background image containing your "bubble" image. Make sure the image is a PNG or GIF with a transparent background.

Here's a figure from my jQuery book showing this technique:



[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Steve Dyke
Ranch Hand

Joined: Nov 16, 2004
Posts: 1393
Bear Bibeault wrote:Give the div a background image containing your "bubble" image. Make sure the image is a PNG or GIF with a transparent background.

Here's a figure from my jQuery book showing this technique:



I did not get the figure you mentioned.
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60739
    
  65

Hmm, it's displaying fine for me. Are you using IE6? (which has poor PNG support)
Steve Dyke
Ranch Hand

Joined: Nov 16, 2004
Posts: 1393
Bear Bibeault wrote:Hmm, it's displaying fine for me. Are you using IE6? (which has poor PNG support)


No, I am using IE7.

I put the background-image attribute in my CSS DIV definition. The image displays when I view the page in design mode but in preview mode the div displays as a colored rectangle.
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60739
    
  65

"Preview mode"? In what? And all that matters is what it looks like when it's deployed.
Steve Dyke
Ranch Hand

Joined: Nov 16, 2004
Posts: 1393
Bear Bibeault wrote:"Preview mode"? In what? And all that matters is what it looks like when it's deployed.


I use Websphere as my development IDE. When working on a JSP file I have three options, Design Mode, Source, and Preview.

Anyway, you are right, when I run it on the browser it woks.

Thanks.
Gregg Bolinger
GenRocket Founder
Ranch Hand

Joined: Jul 11, 2001
Posts: 15299
    
    6

If you're using jquery, Beauty Tips is an excellent plugin so such things.


GenRocket - Experts at Building Test Data
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Display a Pointer Box When Page Opens
 
Similar Threads
How to control the display from a porlet?
How to efficiently generate alerts
Opening a JSP page in dialogue window
how can i create dynamic text box...
Simple getFocus() question