Thank you all...

I have created 2 pages and as John Youngman suggested

instead of cfincluding the img.cfm, do a

<cfif fileExists(theFile)>
    <img src="...img2.cfm">
</cfif>

I did the same and it works great now. Text gets displayed and the image is
shown below. Thanks John.

Points to clarify.

1. Shawn -- creating virtual directory, thats a wonderful idea. I didnt
think about it. I will ask my netw admin to go this route in future. Thanks.

2.Mark Fennell -- thanks, i did the same thing and it works now.

3.Howard Fore -- Thanks, I realised CFContent was not sufficient. I had to
to something else to make cfcontent work.
About the slashes, how many slashes do I need. I thought its 2 if its server
name and 4 if its appended with file:// i.e.

<img src = "file:\\\\nameofshare\clientname\CF_Chart_Share\testimage.jpg">

Your example had 5 in it.. Err, wrong slashdirection....
file://///servername/nameofshare/clientname/CF_Chart_Share/testimage.jpg

Do I need 5 slashes ?

Thanks for the quick response. I really appreciate everyone's help in this
issue.

Ajas.


On 5/12/08, Howard Fore <[EMAIL PROTECTED]> wrote:
>
> Ajas,
>
> If you're trying to display more than just the image in the browser
> CFContent isn't of much use to you. Check out the livedocs for the
> description of why. It will only display the referenced content on the page
> and nothing else (which is why your text disappears).
>
> The web browser doesn't understand the server/share format for the image.
> If you don't want to put a webserver up to serve that image from the server,
> you'll have to use the "file://" protocol header on the URL. That's just the
> way it works. If you drag the image from the server to a web browser window
> you'll see the properly formatted URL. I don't think your earlier examples
> had enough slashes.
>
> This all assumes that the user and machine running the browser will have
> network access to the server and share. If that's not the case, take the
> webserver route.
>
> On Mon, May 12, 2008 at 11:06 AM, Ajas Mohammed <[EMAIL PROTECTED]>
> wrote:
>
> > so I tried cfcontent like this and it works but only problem is that
> > only image is being shown and the text i have before the cfcontent tag
> > doesnt show.
> >
> > For examle,
> >
> > <cfset theFile = "
> > \\servername\nameofshare\clientname\CF_Chart_Share\testimage.jpg">
> >
> > <cfif fileExists(theFile)>
> > *exists*
> > <cfelse> does not exist <br>
> > </cfif>
> >
> > <cfcontent type="image/GIF" file="
> > \\servername\nameofshare\clientname\CF_Chart_Share\testimage.jpg">
> >
> >
> > <img src="
> > \\servername\nameofshare\clientname\CF_Chart_Share\testimage.jpg">
> > This doesnt show the result *exists* from the cfif statement but simply
> > displays the image in the browser window. I tried to add the code <cfcontent
> > type="image/GIF" file="
> > \\servername\nameofshare\clientname\CF_Chart_Share\testimage.jpg"> in a
> > seperate file img2.cfm and I included that in first page but still the same
> > result. *Only image* gets displayed but not the text *exists*.
> >
> > Any suggestions?
> >
> >
> >
> >
> >   On 5/12/08, Howard Fore <[EMAIL PROTECTED]> wrote:
> >
> > >  The format of the address will change depending on it's use. If you
> > > drag an image from that server to your browser window you can then see in
> > > the URL window how it should be formatted for display in the browser.
> > > Obviously this is only going to display for those users with access to 
> > > that
> > > same server and share. I don't think your example below has enough slashes
> > > up front. If you want people without server share access to see the image 
> > > in
> > > the browser you need to put a web server in the mix, either an IIS virtual
> > > directory or an Apache directory/alias/location directive.
> > >
> > > On Mon, May 12, 2008 at 10:48 AM, Ajas Mohammed <[EMAIL PROTECTED]>
> > > wrote:
> > >
> > > > Hi, any example how to do it using CFContent?
> > > >
> > > >
> > > > <cfset theFile = "
> > > > \\servername\nameofshare\clientname\CF_Chart_Share\testimage.jpg">
> > > >
> > > > <cfif fileExists(theFile)>
> > > > *exists*
> > > > <cfelse> does not exist <br>
> > > > </cfif>
> > > > <img src="
> > > > \\servername\nameofshare\clientname\CF_Chart_Share\testimage.jpg">
> > > > ok  I tried this code and i get message *exists*, but still image
> > > > not being when i run the page. I also tried appending file: i.e.
> > > >
> > > > file:
> > > > \\servername\nameofshare\clientname\CF_Chart_Share\testimage.jpg but
> > > > it didnt for img tag and it didnt work for fileExists condition which 
> > > > gives
> > > > me does not exist.
> > > >
> > > > so we know now,
> > > > \\servername\nameofshare\clientname\CF_Chart_Share\testimage.jpg works
> > > > but it doesnt work in img tag.
> > > >
> > > > Any suggestions?
> > > >
> > > >
> > >
> > >
> > > --
> > >
> > >  Howard Fore, [EMAIL PROTECTED]
> > > "The universe tends toward maximum irony. Don't push it." - Jeff
> > > Atwood
> > >
> > > -------------------------------------------------------------
> > > To unsubscribe from this list, manage your profile @
> > > http://www.acfug.org?fa=login.edituserform<http://www.acfug.org/?fa=login.edituserform>
> > >
> > >
> > > For more info, see http://www.acfug.org/mailinglists
> > > Archive @ http://www.mail-archive.com/discussion%40acfug.org/
> > > List hosted by FusionLink <http://www.fusionlink.com/>
> > > -------------------------------------------------------------
> > >
> >
> >
> >
> > --
> > <Ajas Mohammed />
> > http://ajashadi.blogspot.com
> > No matter what, find a way. Because thats what winners do.
> > You can't improve what you don't measure.
> > Quality is never an accident; it is always the result of high intention,
> > sincere effort, intelligent direction and skillful execution; it represents
> > the wise choice of many alternatives.
> > "Live as if you were to die tomorrow. Learn as if you were to live
> > forever."
> > -------------------------------------------------------------
> > To unsubscribe from this list, manage your profile @
> > http://www.acfug.org?fa=login.edituserform<http://www.acfug.org/?fa=login.edituserform>
> >
> > For more info, see http://www.acfug.org/mailinglists
> > Archive @ http://www.mail-archive.com/discussion%40acfug.org/
> > List hosted by FusionLink <http://www.fusionlink.com/>
> > -------------------------------------------------------------
> >
>
>
>
> --
> Howard Fore, [EMAIL PROTECTED]
> "The universe tends toward maximum irony. Don't push it." - Jeff Atwood
> -------------------------------------------------------------
> To unsubscribe from this list, manage your profile @
> http://www.acfug.org?fa=login.edituserform<http://www.acfug.org/?fa=login.edituserform>
>
> For more info, see http://www.acfug.org/mailinglists
> Archive @ http://www.mail-archive.com/discussion%40acfug.org/
> List hosted by FusionLink <http://www.fusionlink.com/>
> -------------------------------------------------------------
>



-- 
<Ajas Mohammed />
http://ajashadi.blogspot.com
No matter what, find a way. Because thats what winners do.
You can't improve what you don't measure.
Quality is never an accident; it is always the result of high intention,
sincere effort, intelligent direction and skillful execution; it represents
the wise choice of many alternatives.
"Live as if you were to die tomorrow. Learn as if you were to live forever."



-------------------------------------------------------------
To unsubscribe from this list, manage your profile @ 
http://www.acfug.org?fa=login.edituserform

For more info, see http://www.acfug.org/mailinglists
Archive @ http://www.mail-archive.com/discussion%40acfug.org/
List hosted by http://www.fusionlink.com
-------------------------------------------------------------

Reply via email to