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

javascript var id from datbase

229 100+
Hi, Anyone know how to solve the following, if I can describe it well enough.

I have a database with interface.
I have a webpage with javascript popups. the links are as follows

[HTML]<a href="http://www.site.com" id="tip297">name</a>[/HTML]
in the head I have the external js file linked where all the ids are kept.
they are like this

Expand|Select|Wrap|Line Numbers
  1. var tip6 = '<img src="a/6.jpg"><div class="tp2">name</div>';
As I have over 300 ids the external file is big, and having a search function on the site I dont want to have to download the whole file when only a few links with ids are thrown up, but instead only the ids associated with the links found in the search.
So I am trying the following. I have an unused form field in my database interface that will insert text into the page for each link dynamically. I am trying to insert the line like

Expand|Select|Wrap|Line Numbers
  1. var tip6 = '<img src="a/6.jpg"><div class="tp2">name</div>';
into the page.

The insertion code is asp like this

Expand|Select|Wrap|Line Numbers
  1. <%=rsCard("CardDescription")%>
I believe if put right it could include the js ref for each link. But anyone know how and where? In the link I have an id="" so I imagine the insertion code should go in the head but know idea how!

Hope someone understands my language.
Thanks
Richard
Jul 26 '07 #1
1 1565
pbmods
5,821 Expert 4TB
Heya, Richard.

Please use CODE tags when posting source code. See the REPLY GUIDELINES on the right side of the page next time you post.
Jul 26 '07 #2

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

Similar topics

4
by: Roger Redford | last post by:
Dear Experts, I'm attempting to marry a system to an Oracle 817 datbase. Oracle is my specialty, the back end mainly, so I don't know much about java or javascript. The system uses javascript...
3
by: pankajsingh5k | last post by:
Dear all, I have a formview in which i have a DropDownList for selecting languages...there is also a add more button which when clicked shows 5 more dropdownlists so the user can select more...
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: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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.