-
varying DIV id
http://www.dynamicdrive.com/dynamici...lapcontent.htm
Hi,
I would appreciate very much help on varying id using the above link:
my boss told me to use the above link to enable overlap content.
The content is shown indeed very nice, as long as it uses for a contant div.
Unfortunately, I ought to display data from a db, looping on the recordset.
However, the overlapping DIV is stuck on the first raw since the id of the
DIV does not change. It is delared as follows (partially):
<a href="#" onClick="overlayclose('subcontent'); return false">
...
and:
<td onClick="return overlay(this, 'subcontent')" class="tbranchTxt"
dir="rtl" align="center" background="images/branch_bg.gif" width="96"
height="35" style="cursor: hand;">
I tried to use DIM to make the id as a counter and another way as dynamically allocated string that appends a letter each loop, but
the given code reads it as f***ing CONSTANT!!!
( I saw few javascript funcs that enmurate div id. Still here it is a CONSTANT! ... so it does not help me. I need to both make it a var and looping it)
Thank you
-
-
If your entire page is dynamically generated, why not just get the server to append a unique integer to the end of each overlapping content's ID attribute, so they are unique? This is simply a case of dynamically altering your page's source slightly so IDs within the HTML being generated are unique. The same needs to be done with any JavaScript that relies on the ID attribute of elements, not just the overlapping content script.
-
-
10x but can you give a code example?
-
-
It depends completely on how your pages are generated and using what language. How are your pages set up?
-
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
Bookmarks