Hi, sorry about that.
Yeah if I return the field from the database I get:
[[imagediv 100.jpg This is the description text]]
This is just some dummy text. It doesn't mean anything and is for
placeholding use only.
The reason for this is that I am trying to write a system for a user to
easily add a article, the bits in [[ ]] will be created by buttons they
press making it hopefully pretty much foolproof. I don't trust them with
real code!
There could be multiple instances of this in the field so what I was hoping
I could do was something like this (written in non-code code!)
Take the returned field
Go through it
if you find [[ take out the text between [[ and ]]
split into 3 parts, the first word (imagediv in this case), the picture name
(100.jpg) and the description text (This is the description text)
Then replace the [[ ...... ]] with
<div class="imagediv"><img src="/images/100.jpg" alt="100.jpg" width="200"
height="200" /><br />This is the description text</div>
Then I can use the modified string in my code, hopefully showing the picture
without ever having to explain what a DIV is!
"Ray Costanzo [MVP]" <my first name at lane 34 dot commercial> wrote in
message news:uT**************@TK2MSFTNGP14.phx.gbl...
Can't say that I follow. What's in the database now? The entire literal
string from "[[imagediv..." to "placeholding use only."? All in one
column? What is the purpose of this data? What are you trying to acheive
here?
Ray at work
"bateman" <ba********@nospam.hotmail.com> wrote in message
news:OK**************@TK2MSFTNGP10.phx.gbl... Hi, what I am trying to do is the following, its causing some probs
though:
I have the following in a database:
[[imagediv 100.jpg This is the description text]]
This is just some dummy text. It doesn't mean anything and is for
placeholding use only.
And want to change it to:
<div class="imagediv"><img src="/images/100.jpg" alt="100.jpg"
width="200" height="200" /><br />
This is the description text</div>
This is just some dummy text. It doesn't mean anything and is for
placeholding use only.
In the future I might want to use different codes ie [[imagediv 100.jpg
This is the description text]] to reference a different DIV.
Any ideas?