[Webinar] Streamline your web hosting managementRegister Today

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 327
  • Last Modified:

invoking the correct plugin...

I need to display a tiff image file in a browser.  I have a plugin which works well, but if the file has no extension, the (obviously) browser cannot determine what plugin to call.

In IE I can get around the problem by specifying the file name 'myimage?dummy.tif'  this fools IE into thinking that the file name ends in .tif.

This doesn't work in Netscape though, and I need this to work for both browsers.  I can either call the image directly as the source of a frame, or use the <EMBED> tag to display it in a HTML page.

Any suggestions?
0
bboyall
Asked:
bboyall
1 Solution
 
kpu8Commented:
Below is some javascript to try which may help just subsitute NameofPlugin for the actual name example (Shockwave)
and also substitute imagename for the exact name of your tiff

But why not just open up the tiff in
something like paint shop pro and save it as a true tif then this problem will be resolved - I think this code may help so let me know

<html>
<head>
<title>Test for Tiff or Tif</title>
</head>
<body bgcolor=white>
<h2>
<script language=javascript>
<!-- Hide script from old browsers
hasNameofPlugin = false
for (i=0; i<navigator.plugins.length; i++) {
        if (navigator.plugins [i].name.indexOf
        ("NameofPlugin") >= 0) {
        NameofPlugin = true

        }
}
if (hasNameofPlugin) {
        imagename.tiff
}
else {
      imagename*.*
}

// End hiding script from old browsers -->
</script>
</h2>
</body>
</html>

0

Featured Post

[Webinar] Improve your customer journey

A positive customer journey is important in attracting and retaining business. To improve this experience, you can use Google Maps APIs to increase checkout conversions, boost user engagement, and optimize order fulfillment. Learn how in this webinar presented by Dito.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now