473,387 Members | 1,440 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.

dynamic variable in js tooltip

229 100+
Hi, Can anyone can help me?


I have a javascript tootip and am trying to have the var tip dynamically put in the page from my asp database inteface. with code like this

[code]..asp
<%=rsCard("CardDescription")%>

The tip is an id like this

Expand|Select|Wrap|Line Numbers
  1. ..html
  2.  
  3. id="<%=rsCard("CardDescription")%>"
  4.  
  5.  
..html
this gets the id from the database and works fine where card description I am using fro the id.

The javascript var tip is as follows.

Expand|Select|Wrap|Line Numbers
  1. ..javascript
  2.  
  3. var tip6 = '<img src="a/6.jpg"><div class="tp2">dddddd</div>';
  4.  
  5.  
..javascript

and sits in the head section.

I can use other asp lines of script like I am using for the id like the following

Expand|Select|Wrap|Line Numbers
  1. ..javascript
  2. var tip6 = '<img src="<%=Server.URLPathEncode(rsCard("ThumbnailURL"))%>"><div class="tp2"><%=FontName%></div>';
  3.  
  4.  
..javascript

these work, but I am still stuck with the var tip6. This needs to be dynamically created too but doesnt work when I put an include there too.
Basically I need the var without having to define them all on the page or externally but created by the info in the database.
Any ideas for someone who knows nothing.
Richard
Jul 28 '07 #1
1 1434
fran7
229 100+
Hi, Just to say I solved it as follows.

<a onmouseover="doTooltip(event,'<img src=&quot;<%=Server.URLPathEncode(rsCard("Thumbnai lURL"))%>&quot; alt=&quot;&quot; border=&quot;0&quot;><div class=&quot;tp2&quot;><%If Trim(rsCard("Author"))<>"" Then%> <%=rsCard("Author")%><%End If%></div>' )" onmouseout="hideTip()" href="http://<%=rsCard("DefaultHeadline")%>" target="_blank"><%If Trim(rsCard("Author"))<>"" Then%> <%=rsCard("Author")%><%End If%></a>
</font>

Thanks
Richard
Jul 29 '07 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

4
by: Bass Pro | last post by:
Hi, I am creating textbox, radiobuttonlist and checkboxlist dynamically depending on data from a table. It is a questionnaire. I add the control on a Panel control during the 1st load_page event....
9
by: vinodhshere | last post by:
Hi, My application has a rich text box.When i hover the mouse over certain keywords typed in the text box i want a tool tip to be displayed.Any idea of how i can accomplish this???? i will be...
2
by: Rich | last post by:
Hello, Some database applicatins have a tooltip feature where when you are dragging the scrollbar of the table view a tooltip appears next to the mouse cursor displaying the approximate record...
1
by: Steve Richter | last post by:
I am using <div align=centerto center a horizontal menu on the page. Problem is the center align of the div is rippling down to the menu items and causing the text of the dynamic popup sub menu...
1
by: Sundhas | last post by:
Hey! I am working on jrxml to create dynamic re0ports. I have parameterized the columns i.e. the jrxml for that report can be used to generate other reports as well. However, i have not managed...
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: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...

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.