Hi,

I have created a .gif image in photoshop,then i have linked the location in html coding.But i am unable to see that image in internet explorer.I am able to see a red crossed line.How to make that image to display??

Recommended Answers

All 6 Replies

Hi,

I have created a .gif image in photoshop,then i have linked the location in html coding.But i am unable to see that image in internet explorer.I am able to see a red crossed line.How to make that image to display??

It is hard to tell what is going wrong without seeing your code.

Here is one way to get an image to display, provided that the URL of the image source is available (online, so anyone with an internet connection can access it, or in the same directory as your html document if you only want to be able to view it on your computer):

<img src = "http://yourImageSourceHere" alt ="your text here"/>

code is here..

In the navigation frame i like to display an image PROFILE, when i click it, in main frame contents of my profile should display.the purpose is like to create online resume portfolio.The problem is PROFILE gif image is not displaying.

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>nav</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<script language="JavaScript" type="text/JavaScript">
<!--
function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
//-->
</script>
<link href="profile.css" rel="stylesheet" type="text/css">
</head>

<body bgcolor="cccc99" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" onLoad="MM_preloadImages('na.gif')<table width="150" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td><div align="center"><a href="profile.html" target="mainFrame" onMouseOver="MM_swapImage('profileW','','na.gif',1)" onMouseOut="MM_swapImgRestore()"><img src="na.gif" alt="Profile" name="profileW" width="130" height="30" border="0" id="profileW"></a></div></td>
  </tr>
</body>
</html>

I tried running your code in FireFox (using notepad++). I created my own gif and named it na.gif, the same as yours. I saved the gif file in the same place as the html file was saved. I made NO changes to your code at all. My na.gif image does show up.

edit: I also tried running it in IE8, and the image shows up there, too.

So...is your gif image saved in the same directory or folder as your html file?

It is a tribute to FF's tollerance to bad HTML that MyrtleTurtle got this to run without modification.

  • <body> tag : missing >
  • onLoad attribute in <body> tag : missing "
  • <table> tag : not closed, missing </table>

Also, those old MM_ functions are really looking their age these days. Global namespace pollution is legion. Nobody in thier right mind would write a lib that way now.

Airshow

Thanks for your reply...

i am able to display the image now....

I tried running your code in FireFox (using notepad++). I created my own gif and named it na.gif, the same as yours. I saved the gif file in the same place as the html file was saved. I made NO changes to your code at all. My na.gif image does show up.

edit: I also tried running it in IE8, and the image shows up there, too.

So...is your gif image saved in the same directory or folder as your html file?

congratz ..mark this thread as solved so that it will be helpful for othrs.......

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.