set Image and lable text in javascript

In my application, I have a Javascript function which get called after every minute. This javascript function returns me new comma seprated string each time which contains image path and image name. I simply split this string and set the Image path to image and text to lable. Goel is to achive effect like image slide show. Every thing works fine. The Images and name get change successfully on mizilla. When I browse this in IE the image and name not change at one time. Name get change first and then Image get changed. It was loosing the slide show effect. I don't know why this is happening. Is it because of browse..? I need to change both Image and name at a time. Can anyone tell me how to do it...? Here is the sample javascript function I use to set the Image function setImage(response) { if(response.value != null) { var imgArr=response.value.split(','); var SN=document.getElementById('ctl00_MC_cntrlGal_ScreenName'); var mainImage=document.getElementById("Img"); if(SN!=null && Img!=null) { SN.innerHTML=imgArr[0]; mainImage.src=imgArr[1]; } } }
a sample of your current code would be helpfull

以上就是set Image and lable text in javascript的详细内容,更多请关注web前端其它相关文章!

赞(0) 打赏
未经允许不得转载:web前端首页 » JavaScript 答疑

评论 抢沙发

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址

前端开发相关广告投放 更专业 更精准

联系我们

觉得文章有用就打赏一下文章作者

支付宝扫一扫打赏

微信扫一扫打赏