Click here to Skip to main content
15,897,226 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi , This code is working fine but unable to display the image.....


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

 <head>
 
 

 <title>Reading Registry Value</title>
 </head>
<div>
<img border="0" src="C:\Documents and Settings\nawab.a\Desktop\header.gif" alt="Pulpit rock" width="904" height="128">
</div>
<div>
<script type="text/javascript">
// jre update function ...

function jre_update()
{
   window.open("jre.html",'');
}

// onload function ...
function detectBrowser()
{
        document.write("<a href='jre.html','width=100' title='KNOW Your JRE VERSION'>JRE Version</a>");

		//<a href="../html-link.htm" target="popup"  önclick="window.open('../html-link.htm','name','width=600,height=400')">Open page in new window</a>
		document.write("<br/>");
	    document.write("<br/>");

        var N= navigator.appName;
		var UA= navigator.userAgent;
		var temp;
		var browserVersion= UA.match(/(opera|chrome|safari|firefox|msie)\/?\s*(\.?\d+(\.\d+)*)/i);
		if(browserVersion && (temp= UA.match(/version\/([\.\d]+)/i))!= null)
		browserVersion[2]= temp[1];
		browserVersion= browserVersion? [browserVersion[1], browserVersion[2]]: [N, navigator.appVersion,'-?'];

		document.write("Browser & ContentVerse Software Property")
		document.write("<br>");
		
		document.write("Browser Name & Version:  " + browserVersion);
		document.write("<br>");

        document.write("<br>");

        

		

readValue(); // function for get dll details......

}

// readvalue function call......
function readValue()
{

  
	try
		{
              var WshShell = new ActiveXObject("CVOOCX");
              // var value = WshShell.RegRead("HKLM\\Software\\computhink\\Contentverse OnLine\\Contentverse Flavor");
              //  document.write("Value of ContentVerse Flavor: " + value);
 			  document.write("<br>");
			  document.write("ContentVerse Software Property")
			  document.write("<br>");
			  document.write("ContentVerse Flavor: " + WshShell.Flavor);
			  document.write("<br>");
			  document.write("ContentVerse Installed path " + WshShell.Home);
   			 document.write("<br>");
		//	 document.write(" JRE Installed Path is "+WshShell.BrowserJavaVersion);
		//	  document.write(" JRE Installed Path is "+WshShell.CurrentVersion);
	     //	   document.write(" JRE Installed Path is "+WshShell.BrowserJavaVersion);
			 document.write("<br>");
			   
			  }
			  catch(e)
			  {
				 document.write("Contentverse Dll is not registered");
				 document.write("<br>");
				 document.write("Note: To know to ContentVerse related information please open this page in IE")
			  }


 }

		

 </script>
<div>
 <body onload="javascript:detectBrowser();"><pre lang="HTML"><pre lang="HTML"><pre lang="HTML"><pre lang="HTML">

</body>
</html>
Posted

1 solution

Well, no. It won't.
HTML
<img border="0" src="C:\Documents and Settings\nawab.a\Desktop\header.gif" alt="Pulpit rock" width="904" height="128">
Specifies an absolute file address - which is not available, since the file is on the server, and it's hard drive is no more accessible to the client than the client's hard drive is to the server - and for the same reasons.
Move the image to a folder under your website and display it from there:
HTML
<img border="0" src="images/header.gif" alt="Pulpit rock" width="904" height="128">
 
Share this answer
 
v2
Comments
Rayan Khan 12-Nov-13 5:16am    
No pathis not a problem when i run it from my destop also same problem is comming ..
Plz run it and check....
OriginalGriff 12-Nov-13 5:18am    
Yes it is. Try it.
Rayan Khan 12-Nov-13 5:21am    
Nope not working....
OriginalGriff 12-Nov-13 5:24am    
Sorry, that was a little blunt.
But then, if you ask for help, get given it, and then just bluntly go "no, I won't do what you say because I know better than you" what do you expect? You are just going to annoy people...

As I said: try it.
The path is the problem. When you run it on you desktop for development, you are running it with a cut down version of IIS which acts as a web host server. It is not logged in as you, so it has no access to your general HDD files - just to the files under the website that you are trying to display. It can't access the image, so it doesn't display.

Move the image to the website folder and reference it there, and it will work.
Rayan Khan 12-Nov-13 5:30am    
what u said i did that only but sorry not working..
i know that u know more than me....

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900