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?
bboyallAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

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

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Web Components

From novice to tech pro — start learning today.