Here's some code:
<!--PM Notification Box, showed when a new PM is found-->
{if $pm ge 1}
<div id="pm_box" class="pm-notify">
PM BOX
</div>
<script type="text/javascript">
{literal}
// Get user's screen width and height
var dimensions = $('pm_box').getDimensions();
var w = (screen.width - dimensions.width) / 2;
var h = (screen.height - dimensions.height) / 2;
$('pm_box').setStyle({width: '450px', height: '300px'});
{/literal}
</script>
{/if}
For anyone who doesn't understand the different syntax, I'm using Smarty and Prototype.
I want to add the value of the variables w and h into $('pm_box').setStyle({width: '450px', height: '300px', top: H VALUE, left: W VALUE}); but the top and left attributes do not show. I know there is a value to both the W and H var's, just not sure how to display it in that function.
Any help would be appriciated.
- Chris.
