Hello all,

I have a div that is repeated as such:
<div align="right" id="TotalPrice<?php echo $row_rsOrderItems[OrderItemId]; ?>">

and a javascript function that I would like to update the totals for as such:

case(''): alert("An error occured upda**** totals, please try again."); break;
default: document.getElementById('TotalPrice<?php echo $row_rsOrderItems[OrderItemId]; ?>').innerHTML = results;

I am passing the order_item_id in the javascript but when I change the div to:

I get an error that says that "document.getelementById("TotalPrice" + order_item_id) has no properties

What am I doing wrong?

how can I call a dynamic orderItemId inside the getElementById ??

Any help would be appreciated - Thanks