my dog learned polymorphism*
The moose likes HTML, CSS and JavaScript and the fly likes javascript help on popups: how to use different messages on the same function? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "javascript help on popups: how to use different messages on the same function?" Watch "javascript help on popups: how to use different messages on the same function?" New topic
Author

javascript help on popups: how to use different messages on the same function?

Peter Primrose
Ranch Hand

Joined: Sep 10, 2004
Posts: 755
Hi all,
I'm writing an application and would like to give the end-user some explanation about the functionality. For this, I added some '?' icons that when he clicks, a popup message comes up and explains what that specific functionality does.

I would like to read the explanation from a different file so I can keep track on all help files (not mandatory but for maintenance :-) )

Since my knowledge in JavaScript is very limited, I read some on the web and managed to do the following:



Reference to this message is:


So...when the user clicks the '?' icon, a popup message comes up and says in a nice gray layout: "The validity of a deal is determined by the ticket sale ending date + 30 days"

Q:
1. I'm trying to add another '?' icon on the screen with a different message and couldn't figure out how to do that.(I get the same message)

2. How can I align the message in the middle of the screen?

3. Is there a way to read all messages from a different file?

Thank you for any pointers!
[ September 20, 2007: Message edited by: Peter Primrose ]
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
could be as simpel as adding a title to the image

<img src="foo.gif" title="Your mesaage here" />


If you want to be fancier, you just need a tooltip script: http://dynamicdrive.com/dynamicindex5/index.html

Eric
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: javascript help on popups: how to use different messages on the same function?
 
Similar Threads
Positioning DIVs
Displaying iframe contents in parent window
using frameset
Creating CSS class at runtime
JSP...dynamic text box crteation with JavaScript