CODE
<iframe name="I1" id="I1" src = PlaceToPostSnapshot style="width: 1112px; height: 664px">" class="style2" style="height: 642px; width: 1061px"Your browser does not support inline frames or is currently configured not to display inline frames.
</iframe>
The above is incorrect syntax, it should probably be:
CODE
<iframe name="I1" id="I1" src = PlaceToPostSnapshot style="width: 1112px; height: 664px" class="style2" style="height: 642px; width: 1061px">Your browser does not support inline frames or is currently configured not to display inline frames.
</iframe>
Note that the second STYLE attribute's values should override the first. I also advice against using inline styles for practical reasons, use an embedded or external stylesheet instead.
CODE
var @AlarmDate = 1;
I don't think a JS variable can begin with an "@" character, also it causes JS syntax errors in my browsers.
CODE
var image = @AlarmDate.value + ".jpg"
A variable normally doesn't have a value property (unless the variable would be say an HTML INPUT element). Instead you might use:
CODE
var image = AlarmDate + ".jpg"
Finally, this returns a collection of all "PlaceToPostSnapshots" elements, but no such HTML element exists:
CODE
document.getElementByTagName('PlaceToPostSnapshots')
(even if it did exists you wouldn't want a collection of all of them found on the page, just like pandy wrote). Use this instead:
CODE
document.getElementById('I1').setAttribute('src', image);
or just
CODE
document.getElementById('I1').src = ...
like in pandy's example.
But I don't see the point in loading an image in an iframe. Why not load it in an IMG element as usual?