Avatar for Username

ძიება მხარდაჭერაში

ნუ გაებმებით თაღლითების მახეში. აქ არავინ უნდა მოგთხოვოთ ტელეფონზე დარეკვა, შეტყობინების გაგზავნა ან პირადი მონაცემების გაზიარება. რამე საეჭვოს შემჩნევისას გთხოვთ გვაცნობოთ „დარღვევის მოხსენებით“.

ვრცლად

iFrame counter showing on Firefox

  • 2 პასუხი
  • 0 მომხმარებელი წააწყდა მსგავს სიძნელეს
  • 2 ნახვა
  • ბოლოს გამოეხმაურა Morbus

I am running an iframe with rotating banner ads. It runs perfect in IE but when on Firefox, it ads a ">" above the iFrame content every time the ad cycles. Almost like a counter or something.

iFrame code is nothing complex, just using height and width code to keep the frame where I want it.

Link to website: http://www.hardinohio.org/new/Tourism.aspx

I am running an iframe with rotating banner ads. It runs perfect in IE but when on Firefox, it ads a ">" above the iFrame content every time the ad cycles. Almost like a counter or something. iFrame code is nothing complex, just using height and width code to keep the frame where I want it. Link to website: http://www.hardinohio.org/new/Tourism.aspx

ყველა პასუხი (2)

Hello.

Does the code work correctly on other browsers besides IE?

Looks like a problem with the JavaScript code that is used in that frame. Code like this that highly depends on manipulating the innerHTML code is almost impossible to maintain: var curImage = document.getElementById("cur_img"); curImage.src = nextImage.src; var DivStr = document.getElementById("div_img").innerHTML; if(DivStr.indexOf('href=')>-1){

  var lastindex = DivStr.indexOf("_blank")+7;
  var anchertag = DivStr.substring(0,lastindex);
  DivStr  = DivStr.replace(anchertag,"");
  DivStr = DivStr.substring(0,DivStr.length-4);

} You should use DOM methods like replaceChild or a combination of removeChild and appendChild to achieve what you want. See https://developer.mozilla.org/en/DOM/Node.replaceChild