1

I've got the following layout that is generated dynamically via jquery. Basically it creates a bunch of divs with images in them, the divs are floated left. On Chrome and IE the image loads correctly, but on FireFox the images don't load. If I try to inspect the image FireFox says the src failed to load. Any ideas?

 <div id="divButton" class="buttonToolBar">
   <img src="..." alt="buttonType" />
 </div>

.buttonToolBar
{
    float:left;
    border-color: #CCCCCC #999999 #999999 #CCCCCC;
    border-style: solid;
    border-width: 1px;
    margin: 1px 2px;
}

enter image description here vs enter image description here

UPDATE This is an example of the url of one of the images http://localhost:7499/CuteSoft_Client/CuteEditor/Themes/Office2007/Images/table.gif

UPDATE I am using the ResolveClientUrl method on the server side to render the correct url, maybe that is the problem?

NullReference
  • 4,404
  • 12
  • 53
  • 90
  • 1
    Have you tried using firebug to see what the response from the server is for those images? – Kyle Trauberman Jul 07 '11 at 00:14
  • Can you give an example image url ? also if you put the url in the browser does the image load ? (*in firefox*) – Gabriele Petrioli Jul 07 '11 at 00:22
  • Side issue: Be careful of directly pinching icons from Word, or wherever they are from, they may not be licensed for this usage. – Orbling Jul 07 '11 at 00:30
  • 1
    It doesn't have to do with ASP.NET or jQuery, it's just the handling of the image source URL. I need to see the actual URL itself exactly as it is written, or better, just compy paste the IMG tag "as it is" – Can Poyrazoğlu Jul 07 '11 at 00:32
  • I've added url to the question. If I paste the url into FF it does load the image correctly. – NullReference Jul 07 '11 at 00:56

2 Answers2

0

I have see this happens on Firefox when you type the wrong slash on the images.

For example this works /img/oneimage.jpg this not \img\oneimage.jpg

Aristos
  • 66,005
  • 16
  • 114
  • 150
0

Turns out it wasn't a problem with the url, it was how I was getting it. I was using the innerText property to get the url. In FF the innerText doesn't work.

'innerText' works in IE, but not in Firefox

Community
  • 1
  • 1
NullReference
  • 4,404
  • 12
  • 53
  • 90