> how to make div id's as unique (since it need to identify a unique div for each row)

One way would be to create a separate counter (e.g. i) which would be incremented for each "for each" block and create an ID dynamically by appending the common name with this counter value. Something like: <div id="<%= puts 'someDiv' + i %>"> (an approximation since I don't know ruby)

I am needing a bit of help here also.

I have a Dynamic table which is populate from a MySQL database. The information is pulled through a php file and a bit of HTML within it. Part of the user experience involves a popup. The issue I am having is that the popup works well, however if there are multiple popups on the same page they all load at once and ontop of each other.

I think that if I tell my php to generate a unique ID it will solve the problem.

Below is a sample of the code:

<td>
  <div style="display: inline; text-align:center;" id="tooltip-8" class="tooltip-toggler">$</div>
  <script type="text/javascript">new ToolTip('tooltip-8', '<strong>Salary: </strong><?php	if(!is_null($fields->getFieldById(32))) { 
	$link_style = $fields->getFieldById(32);
			
	echo '' . $link_style->getOutput(2) . '';
		}?>', { mode: 'cursor', display: 'inline', width: 180, style: 'default', sticky: 1 });</script>
</td>

You can see (two) references to "tooltip-8" I need both of these to be dynamic.
The page loading this is for each listing in my directory I have built. Remember I am using a CMS.

Any help is appreciated!

James

Hi

is the getFieldById(32) is related to tooltip-8

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.