By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,098 Members | 1,918 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,098 IT Pros & Developers. It's quick & easy.

image path

P: n/a
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
Share this Question
Share on Google+
9 Replies


P: n/a
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

P: n/a
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

P: n/a
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

P: n/a
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

P: n/a
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

P: n/a
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

P: n/a
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

P: n/a
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

P: n/a
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 discussion thread is closed

Replies have been disabled for this discussion.