473,394 Members | 1,715 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

image path

TJS
when using a relative image path

const imgDir = "_images/divisions/"

the relative path is converted to a physical path in an img tag
as
<img src="c:\app\_images\divisions\mypicture.gif">

how can I prevent this from being converted to a physical path ?
Jul 22 '05 #1
9 2741
what editor are you using?
--
Jason Brown
Microsoft GTSC, IIS

This posting is provided "AS IS" with no warranties, and confers no
rights.
"TJS" <no****@here.com> wrote in message
news:10*************@corp.supernews.com...
when using a relative image path

const imgDir = "_images/divisions/"

the relative path is converted to a physical path in an img tag
as
<img src="c:\app\_images\divisions\mypicture.gif">

how can I prevent this from being converted to a physical path ?

Jul 22 '05 #2
TJS
textpad
"Jason Brown [MSFT]" <i-******@online.microsoft.com> wrote in message
news:e3**************@TK2MSFTNGP09.phx.gbl...
what editor are you using?
--
Jason Brown
Microsoft GTSC, IIS

This posting is provided "AS IS" with no warranties, and confers no
rights.
"TJS" <no****@here.com> wrote in message
news:10*************@corp.supernews.com...
when using a relative image path

const imgDir = "_images/divisions/"

the relative path is converted to a physical path in an img tag
as
<img src="c:\app\_images\divisions\mypicture.gif">

how can I prevent this from being converted to a physical path ?


Jul 22 '05 #3
hmmm... so what if you create a similar page in plain 'ol notepad? I'm not
familiar with textpad, but your issue sounds like the editor is inputting a
filesystem path and you're not expecting it to.
--
Jason Brown
Microsoft GTSC, IIS

This posting is provided "AS IS" with no warranties, and confers no
rights.
"TJS" <no****@here.com> wrote in message
news:10*************@corp.supernews.com...
textpad
"Jason Brown [MSFT]" <i-******@online.microsoft.com> wrote in message
news:e3**************@TK2MSFTNGP09.phx.gbl...
what editor are you using?
--
Jason Brown
Microsoft GTSC, IIS

This posting is provided "AS IS" with no warranties, and confers no
rights.
"TJS" <no****@here.com> wrote in message
news:10*************@corp.supernews.com...
when using a relative image path

const imgDir = "_images/divisions/"

the relative path is converted to a physical path in an img tag
as
<img src="c:\app\_images\divisions\mypicture.gif">

how can I prevent this from being converted to a physical path ?



Jul 22 '05 #4
TJS

I don't believe it is the editor because Textpad is not programmed to make
changes.

I have a workaround as:

'check for existence of image
'--------------------------------------
const DivImageFolder = "_images/divisions/"

vImgPath = Cstr(DivImageFolder & ucase(strAgencyName) & "_division" &
ThisRS("division") & ".gif")
vImgSrc = DivImageFolder & "img_not_available.gif"

If FileExists(vImgPath) = true then
arrImgSrc = split(vImgPath, "\")
pos = ubound(arrImgSrc)
vImgSrc = arrImgSrc(pos-2) & "/" & arrImgSrc(pos-1) & "/" &
arrImgSrc(pos)
end if

Response.Write ("<img src=""" & vImgSrc & """ >") & vbcrlf

Jul 22 '05 #5
now I'm more in the dark than before. you've skipped a bunch of ASP code
from the original question??

--
Jason Brown
Microsoft GTSC, IIS

This posting is provided "AS IS" with no warranties, and confers no
rights.

"TJS" <no****@here.com> wrote in message
news:10*************@corp.supernews.com...

I don't believe it is the editor because Textpad is not programmed to make
changes.

I have a workaround as:

'check for existence of image
'--------------------------------------
const DivImageFolder = "_images/divisions/"

vImgPath = Cstr(DivImageFolder & ucase(strAgencyName) & "_division" &
ThisRS("division") & ".gif")
vImgSrc = DivImageFolder & "img_not_available.gif"

If FileExists(vImgPath) = true then
arrImgSrc = split(vImgPath, "\")
pos = ubound(arrImgSrc)
vImgSrc = arrImgSrc(pos-2) & "/" & arrImgSrc(pos-1) & "/" &
arrImgSrc(pos)
end if

Response.Write ("<img src=""" & vImgSrc & """ >") & vbcrlf

Jul 22 '05 #6
TJS
i found the problem. it was in the FileExists function which was returning
a modified value of the path by reference.
i have been using asp.net and forgot classic handles parameters by
reference.

good job!

thanks for your help!
Jul 22 '05 #7
Textpad is absolutely glorious.

Ray at work

"Jason Brown [MSFT]" <i-******@online.microsoft.com> wrote in message
news:uj**************@tk2msftngp13.phx.gbl...
hmmm... so what if you create a similar page in plain 'ol notepad? I'm not
familiar with textpad, but your issue sounds like the editor is inputting a filesystem path and you're not expecting it to.

Jul 22 '05 #8
got a link? I might try it out at home
--
Jason Brown
Microsoft GTSC, IIS

This posting is provided "AS IS" with no warranties, and confers no
rights.
"Ray Costanzo [MVP]" <my first name at lane 34 dot commercial> wrote in
message news:e6**************@TK2MSFTNGP15.phx.gbl...
Textpad is absolutely glorious.

Ray at work

"Jason Brown [MSFT]" <i-******@online.microsoft.com> wrote in message
news:uj**************@tk2msftngp13.phx.gbl...
hmmm... so what if you create a similar page in plain 'ol notepad? I'm
not
familiar with textpad, but your issue sounds like the editor is inputting

a
filesystem path and you're not expecting it to.


Jul 22 '05 #9
Here you are. http://www.textpad.com/download/index.html#downloads

What's nice about Textpad is that it's just really straight-forward and is
focussed more on functionality than trying to look all neat-o and spiffy.
Here are more of my thoughts on it.
http://www.windowsmarketplace.com/re...&stext=textpad

Ray at work

"Jason Brown [MSFT]" <i-******@online.microsoft.com> wrote in message
news:eY*************@TK2MSFTNGP11.phx.gbl...
got a link? I might try it out at home
--
Jason Brown
Microsoft GTSC, IIS

This posting is provided "AS IS" with no warranties, and confers no
rights.
"Ray Costanzo [MVP]" <my first name at lane 34 dot commercial> wrote in
message news:e6**************@TK2MSFTNGP15.phx.gbl...
Textpad is absolutely glorious.

Ray at work

"Jason Brown [MSFT]" <i-******@online.microsoft.com> wrote in message
news:uj**************@tk2msftngp13.phx.gbl...
hmmm... so what if you create a similar page in plain 'ol notepad? I'm
not
familiar with textpad, but your issue sounds like the editor is
inputting a
filesystem path and you're not expecting it to.



Jul 22 '05 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: Michael J. Astrauskas | last post by:
I have a script, which I've called test-loadpic.php and some pages reference it by means of <img src="test-loadpic.php?sourcepic=$picNum"> where $picNum stores a number. This part itself works...
3
by: dave | last post by:
Hello there, I am at my wit's end ! I have used the following script succesfully to upload an image to my web space. But what I really want to be able to do is to update an existing record in a...
0
by: amita | last post by:
hi, 1.I want to show a image file of type '.tif' in the browser window; for that I'm writting as ASP code page. 2.This '.tif' type image can be shown better with 'Kodak Image Control'. 3.To...
11
by: KarimL | last post by:
Thanks for your advices... but i need to get the Image height because i dynamically resize the height of my webcontrol based on the image height. More i just have the url (relative parth) to the...
4
by: moondaddy | last post by:
Using vb.net I need to download image files to the client browser where they can save to disk. Below is some sample code I'm using. when I run this the File Download window in the browser says: ...
15
by: David Lozzi | last post by:
Howdy, I have a function that uploads an image and that works great. I love ..Nets built in upload, so much easier than 3rd party uploaders! Now I am making a public function that will take the...
4
by: NASAdude | last post by:
I'm working on distributing a database using VS Tools for Office, and am having trouble with linked images on forms/reports. The image objects have a default path\file set on the .Picture property,...
1
by: amritranjan | last post by:
How to retrive image file from MS access database and display this in another JSPpage -------------------------------------------------------------------------------- This is my Jsp code for...
11
by: Evolution445 | last post by:
I got this code, and it somehow doesnt work. <TABLE WIDTH=100% BORDER=0 CELLPADDING=0 CELLSPACING=0 align="center"> <TR> <TD background="{image-path}navfiller.gif" HEIGHT=40...
0
Debadatta Mishra
by: Debadatta Mishra | last post by:
Introduction In this article I will provide you an approach to manipulate an image file. This article gives you an insight into some tricks in java so that you can conceal sensitive information...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.