*
The moose likes HTML, CSS and JavaScript and the fly likes Having problem using Ajax Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "Having problem using Ajax" Watch "Having problem using Ajax" New topic
Author

Having problem using Ajax

Sapan Shah
Greenhorn

Joined: Jan 01, 2010
Posts: 25

Kindly see the below the link

Venus Diamond.

In this page there is Diamond DNA column. When you click on the images of Diamond DNA column the next row which was hidden while show the content of another jsp page which is index1.jsp .

Now we have a requirement of using tooltip on the image which is on index1.jsp but we are unable to do so and the content of tooltip is displaying below the image.


Regards

Sapan Shah
Saurabh Pillai
Ranch Hand

Joined: Sep 12, 2008
Posts: 506
How is the tooltip contents available on index1.jsp? Is it part of JSP (hard coded) or being pulled from database?
Sapan Shah
Greenhorn

Joined: Jan 01, 2010
Posts: 25
It is hard coded.
Saurabh Pillai
Ranch Hand

Joined: Sep 12, 2008
Posts: 506
After little bit of debugging, it looks like, image and the tool tip text both are on index1.jsp. Why don't you use 'title' attribute of <img> tag.
Sapan Shah
Greenhorn

Joined: Jan 01, 2010
Posts: 25
I cannot use title because the content contains <br/> tag . For example :- This is first line.<br/>This is second line.

Saurabh Pillai
Ranch Hand

Joined: Sep 12, 2008
Posts: 506
Sapan Shah wrote:I cannot use title because the content contains <br/> tag

And you can not remove <br>? Also, tool tip supposed to be short.
Sapan Shah
Greenhorn

Joined: Jan 01, 2010
Posts: 25
The tooltip content contains max 10 lines and on every line there will be max 30 characters.That's why after 30 character there will be <br/> tag which breaks the line.
Saurabh Pillai
Ranch Hand

Joined: Sep 12, 2008
Posts: 506
Sapan Shah wrote:The tooltip content contains max 10 lines and on every line there will be max 30 characters.That's why after 30 character there will be <br/> tag which breaks the line.

Is this supposed to be tooltip or tool description. Anyways, you can call a javascript function on mouseover event which will render a floating div tracking mourse position having your tooltip text.
Sapan Shah
Greenhorn

Joined: Jan 01, 2010
Posts: 25
I have tried doing the same way has you said but it is not working.

index.jsp




and index1.jsp





Saurabh Pillai
Ranch Hand

Joined: Sep 12, 2008
Posts: 506
Sapan Shah wrote:I have tried doing the same way has you said

It does not look like that way. What does call_shw() function do? Where is the function that creates tooltip.

Sapan Shah wrote:but it is not working.


'It is not working' does not help anyway. Separate out the problem and paste specific code here.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: Having problem using Ajax
 
Similar Threads
JSP and Ajax interaction
displaying images in jsp page..
JSP reloads on hash change
How to display a list box with values from an "Array List" in "Struts2"
How to include image in a JSP?