The Web Design Group

... Making the Web accessible to all.

Welcome Guest ( Log In | Register )

> loading img file
mbessey
post Apr 18 2012, 01:32 PM
Post #1





Group: Members
Posts: 3
Joined: 18-April 12
Member No.: 16,940



Hello,

I am trying to get a image to load into a src tag from a value from a function. can someone steer me in the right direction here? here is some sample code.


<div id="layer1" style="position: absolute; width: 1193px; height: 691px; z-index: 1; top: 46px; left: 11px">
<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></div>


// function to display alarm jpg
function getImage()
{
var @AlarmDate = 1;
var image = @AlarmDate.value + ".jpg"
document.getElementByTagName('PlaceToPostSnapshots').setAttribute('src', image)
}

User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post

Posts in this topic
mbessey   loading img file   Apr 18 2012, 01:32 PM
pandy   You misunderstand getElementsByTagname(). Yes, it...   Apr 18 2012, 05:31 PM
Christian J   <iframe name="I1" id="I1" src ...   Apr 18 2012, 05:34 PM
mbessey   I tried your suggestions but they didn't work....   Apr 19 2012, 07:59 AM
mbessey   BTW i got rid of the iframe   Apr 19 2012, 12:17 PM


Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



- Lo-Fi Version Time is now: 18th April 2024 - 07:03 AM