Another VB question

Discussion in 'ASP General' started by the other john, Jul 20, 2006.

  1. I'm trying to enhance a script to do the following things.

    1). detect the first four words of a paragraph and stylize them
    (already does that)
    2). Capitalize and stylize the first letter of each paragraph (already
    does that via style sheet)
    3). Count the number of paragraphs (or number of "vbcrlf & vbcrfl") so
    I can insert a images in specific places (i.e. I want to dynamically
    insert image 1 in paragraph 1, image 2 into para 2, etc.)

    This third item I can't figure out. I've tried it a few ways but keep
    running to problems.

    Thanks!!!

    The following script was provided by Mike Brind, thanks Mike. It
    currently can produce results for the first 2 items I listed above but
    not exactly the way I want it to. It places an image into the first
    paragraph for each "record" but that's not what I want.

    Dim str, i, spacepos, word
    for wank = 1 to 7
    if rsForums.EOF then exit for
    if wank = 1 then
    response.write "<img id='picFloat' src='testoboy.jpg'
    class='picBorderThin'>"
    End if
    if wank = 2 then
    response.write "<img id='picFloat' src='me.jpg'
    class='picBorderThin'>"
    End if
    Response.Write "<p><span id='firstWords'>"
    storyFix = replace(rsForums("T_MESSAGE"),vbcrlf & vbcrlf, "<p>")
    story = replace(storyFix,"<p>", "</p>" & vbcrlf & "<p>")
    for i = 1 to 4
    spacepos = instr(story," " )
    word = left(story,spacepos)
    story = right(story,len(story)-spacepos)
    response.write word
    next

    Response.Write "</span>"
    Response.Write story
    Response.Write "</p>" & vbcrlf & vbcrlf & "<hr>"
    rsForums.MoveNext
    next
    rsForums.Close
    Set rsForums = nothing
     
    the other john, Jul 20, 2006
    #1
    1. Advertising

  2. the other john

    Rob Meade Guest

    "the other john" wrote...

    > for wank = 1 to 7
    > next


    Talk about stamina!!!

    :eek:D

    Rob
     
    Rob Meade, Jul 20, 2006
    #2
    1. Advertising

  3. ;-)


    Rob Meade wrote:
    > "the other john" wrote...
    >
    > > for wank = 1 to 7
    > > next

    >
    > Talk about stamina!!!
    >
    > :eek:D
    >
    > Rob
     
    the other john, Jul 20, 2006
    #3
  4. the other john

    Mike Brind Guest

    the other john wrote:
    > I'm trying to enhance a script to do the following things.
    >
    > 1). detect the first four words of a paragraph and stylize them
    > (already does that)
    > 2). Capitalize and stylize the first letter of each paragraph (already
    > does that via style sheet)
    > 3). Count the number of paragraphs (or number of "vbcrlf & vbcrfl") so
    > I can insert a images in specific places (i.e. I want to dynamically
    > insert image 1 in paragraph 1, image 2 into para 2, etc.)
    >
    > This third item I can't figure out. I've tried it a few ways but keep
    > running to problems.
    >
    > Thanks!!!
    >
    > The following script was provided by Mike Brind, thanks Mike. It
    > currently can produce results for the first 2 items I listed above but
    > not exactly the way I want it to. It places an image into the first
    > paragraph for each "record" but that's not what I want.
    >
    > Dim str, i, spacepos, word
    > for wank = 1 to 7
    > if rsForums.EOF then exit for
    > if wank = 1 then
    > response.write "<img id='picFloat' src='testoboy.jpg'
    > class='picBorderThin'>"
    > End if
    > if wank = 2 then
    > response.write "<img id='picFloat' src='me.jpg'
    > class='picBorderThin'>"
    > End if
    > Response.Write "<p><span id='firstWords'>"
    > storyFix = replace(rsForums("T_MESSAGE"),vbcrlf & vbcrlf, "<p>")
    > story = replace(storyFix,"<p>", "</p>" & vbcrlf & "<p>")
    > for i = 1 to 4
    > spacepos = instr(story," " )
    > word = left(story,spacepos)
    > story = right(story,len(story)-spacepos)
    > response.write word
    > next
    >
    > Response.Write "</span>"
    > Response.Write story
    > Response.Write "</p>" & vbcrlf & vbcrlf & "<hr>"
    > rsForums.MoveNext
    > next
    > rsForums.Close
    > Set rsForums = nothing


    I wouldn't do this like this...

    At some stage, each story/article is entered into a database. It's at
    that point that I would manipulate it in the way you want. That way,
    the operation is only ever performed once for each story, rather than
    every time a page is requested.

    Anyhoo, you need to break the problem down in the opposite order in
    which you have. The first thing you need to do is to break the story
    into paragraphs. Whether on input or output, this can be done using
    split(). You also need to put you images into an array, so you can get
    them by index.

    Now that you have an array of paragraphs, and an array of images, it's
    easy to loop through from 0 to 6, prepending each paragraph with its
    associated image html. Within that loop, you can conduct the operation
    to style the first few words. You would create a string containing the
    first 7 paragraphs (adding <p> tags as needed). Then, if there are any
    paragraphs left, you would need to loop through those to style the
    first few words, and append them to your string. Then its ready for
    input/output.

    --
    Mike Brind
     
    Mike Brind, Jul 20, 2006
    #4
  5. the other john

    Bob Lehmann Guest

    > At some stage, each story/article is entered into a database. It's at
    > that point that I would manipulate it in the way you want. That way,
    > the operation is only ever performed once for each story,


    Good idea.....

    Until the customer decides that they want the first 5 words stylized.

    Bob Lehmann


    "Mike Brind" <> wrote in message
    news:...
    >
    > the other john wrote:
    > > I'm trying to enhance a script to do the following things.
    > >
    > > 1). detect the first four words of a paragraph and stylize them
    > > (already does that)
    > > 2). Capitalize and stylize the first letter of each paragraph (already
    > > does that via style sheet)
    > > 3). Count the number of paragraphs (or number of "vbcrlf & vbcrfl") so
    > > I can insert a images in specific places (i.e. I want to dynamically
    > > insert image 1 in paragraph 1, image 2 into para 2, etc.)
    > >
    > > This third item I can't figure out. I've tried it a few ways but keep
    > > running to problems.
    > >
    > > Thanks!!!
    > >
    > > The following script was provided by Mike Brind, thanks Mike. It
    > > currently can produce results for the first 2 items I listed above but
    > > not exactly the way I want it to. It places an image into the first
    > > paragraph for each "record" but that's not what I want.
    > >
    > > Dim str, i, spacepos, word
    > > for wank = 1 to 7
    > > if rsForums.EOF then exit for
    > > if wank = 1 then
    > > response.write "<img id='picFloat' src='testoboy.jpg'
    > > class='picBorderThin'>"
    > > End if
    > > if wank = 2 then
    > > response.write "<img id='picFloat' src='me.jpg'
    > > class='picBorderThin'>"
    > > End if
    > > Response.Write "<p><span id='firstWords'>"
    > > storyFix = replace(rsForums("T_MESSAGE"),vbcrlf & vbcrlf, "<p>")
    > > story = replace(storyFix,"<p>", "</p>" & vbcrlf & "<p>")
    > > for i = 1 to 4
    > > spacepos = instr(story," " )
    > > word = left(story,spacepos)
    > > story = right(story,len(story)-spacepos)
    > > response.write word
    > > next
    > >
    > > Response.Write "</span>"
    > > Response.Write story
    > > Response.Write "</p>" & vbcrlf & vbcrlf & "<hr>"
    > > rsForums.MoveNext
    > > next
    > > rsForums.Close
    > > Set rsForums = nothing

    >
    > I wouldn't do this like this...
    >
    > At some stage, each story/article is entered into a database. It's at
    > that point that I would manipulate it in the way you want. That way,
    > the operation is only ever performed once for each story, rather than
    > every time a page is requested.
    >
    > Anyhoo, you need to break the problem down in the opposite order in
    > which you have. The first thing you need to do is to break the story
    > into paragraphs. Whether on input or output, this can be done using
    > split(). You also need to put you images into an array, so you can get
    > them by index.
    >
    > Now that you have an array of paragraphs, and an array of images, it's
    > easy to loop through from 0 to 6, prepending each paragraph with its
    > associated image html. Within that loop, you can conduct the operation
    > to style the first few words. You would create a string containing the
    > first 7 paragraphs (adding <p> tags as needed). Then, if there are any
    > paragraphs left, you would need to loop through those to style the
    > first few words, and append them to your string. Then its ready for
    > input/output.
    >
    > --
    > Mike Brind
    >
     
    Bob Lehmann, Jul 21, 2006
    #5
  6. the other john

    Mike Brind Guest

    Even more reason to perform the operation on input. When the customer
    changes the brief to have more or less words stylized, I'll look
    forward to presenting the budget cost of doing so on existing data :)

    --
    Mike Brind

    Bob Lehmann wrote:
    > > At some stage, each story/article is entered into a database. It's at
    > > that point that I would manipulate it in the way you want. That way,
    > > the operation is only ever performed once for each story,

    >
    > Good idea.....
    >
    > Until the customer decides that they want the first 5 words stylized.
    >
    > Bob Lehmann
    >
    >
    > "Mike Brind" <> wrote in message
    > news:...
    > >
    > > the other john wrote:
    > > > I'm trying to enhance a script to do the following things.
    > > >
    > > > 1). detect the first four words of a paragraph and stylize them
    > > > (already does that)
    > > > 2). Capitalize and stylize the first letter of each paragraph (already
    > > > does that via style sheet)
    > > > 3). Count the number of paragraphs (or number of "vbcrlf & vbcrfl") so
    > > > I can insert a images in specific places (i.e. I want to dynamically
    > > > insert image 1 in paragraph 1, image 2 into para 2, etc.)
    > > >
    > > > This third item I can't figure out. I've tried it a few ways but keep
    > > > running to problems.
    > > >
    > > > Thanks!!!
    > > >
    > > > The following script was provided by Mike Brind, thanks Mike. It
    > > > currently can produce results for the first 2 items I listed above but
    > > > not exactly the way I want it to. It places an image into the first
    > > > paragraph for each "record" but that's not what I want.
    > > >
    > > > Dim str, i, spacepos, word
    > > > for wank = 1 to 7
    > > > if rsForums.EOF then exit for
    > > > if wank = 1 then
    > > > response.write "<img id='picFloat' src='testoboy.jpg'
    > > > class='picBorderThin'>"
    > > > End if
    > > > if wank = 2 then
    > > > response.write "<img id='picFloat' src='me.jpg'
    > > > class='picBorderThin'>"
    > > > End if
    > > > Response.Write "<p><span id='firstWords'>"
    > > > storyFix = replace(rsForums("T_MESSAGE"),vbcrlf & vbcrlf, "<p>")
    > > > story = replace(storyFix,"<p>", "</p>" & vbcrlf & "<p>")
    > > > for i = 1 to 4
    > > > spacepos = instr(story," " )
    > > > word = left(story,spacepos)
    > > > story = right(story,len(story)-spacepos)
    > > > response.write word
    > > > next
    > > >
    > > > Response.Write "</span>"
    > > > Response.Write story
    > > > Response.Write "</p>" & vbcrlf & vbcrlf & "<hr>"
    > > > rsForums.MoveNext
    > > > next
    > > > rsForums.Close
    > > > Set rsForums = nothing

    > >
    > > I wouldn't do this like this...
    > >
    > > At some stage, each story/article is entered into a database. It's at
    > > that point that I would manipulate it in the way you want. That way,
    > > the operation is only ever performed once for each story, rather than
    > > every time a page is requested.
    > >
    > > Anyhoo, you need to break the problem down in the opposite order in
    > > which you have. The first thing you need to do is to break the story
    > > into paragraphs. Whether on input or output, this can be done using
    > > split(). You also need to put you images into an array, so you can get
    > > them by index.
    > >
    > > Now that you have an array of paragraphs, and an array of images, it's
    > > easy to loop through from 0 to 6, prepending each paragraph with its
    > > associated image html. Within that loop, you can conduct the operation
    > > to style the first few words. You would create a string containing the
    > > first 7 paragraphs (adding <p> tags as needed). Then, if there are any
    > > paragraphs left, you would need to loop through those to style the
    > > first few words, and append them to your string. Then its ready for
    > > input/output.
    > >
    > > --
    > > Mike Brind
    > >
     
    Mike Brind, Jul 21, 2006
    #6
  7. will split() take this?

    para = vbcrlf & vbcrlf
    Split(mystring, para)


    Mike Brind wrote:
    > Even more reason to perform the operation on input. When the customer
    > changes the brief to have more or less words stylized, I'll look
    > forward to presenting the budget cost of doing so on existing data :)
    >
    > --
    > Mike Brind
    >
    > Bob Lehmann wrote:
    > > > At some stage, each story/article is entered into a database. It's at
    > > > that point that I would manipulate it in the way you want. That way,
    > > > the operation is only ever performed once for each story,

    > >
    > > Good idea.....
    > >
    > > Until the customer decides that they want the first 5 words stylized.
    > >
    > > Bob Lehmann
    > >
    > >
    > > "Mike Brind" <> wrote in message
    > > news:...
    > > >
    > > > the other john wrote:
    > > > > I'm trying to enhance a script to do the following things.
    > > > >
    > > > > 1). detect the first four words of a paragraph and stylize them
    > > > > (already does that)
    > > > > 2). Capitalize and stylize the first letter of each paragraph (already
    > > > > does that via style sheet)
    > > > > 3). Count the number of paragraphs (or number of "vbcrlf & vbcrfl") so
    > > > > I can insert a images in specific places (i.e. I want to dynamically
    > > > > insert image 1 in paragraph 1, image 2 into para 2, etc.)
    > > > >
    > > > > This third item I can't figure out. I've tried it a few ways but keep
    > > > > running to problems.
    > > > >
    > > > > Thanks!!!
    > > > >
    > > > > The following script was provided by Mike Brind, thanks Mike. It
    > > > > currently can produce results for the first 2 items I listed above but
    > > > > not exactly the way I want it to. It places an image into the first
    > > > > paragraph for each "record" but that's not what I want.
    > > > >
    > > > > Dim str, i, spacepos, word
    > > > > for wank = 1 to 7
    > > > > if rsForums.EOF then exit for
    > > > > if wank = 1 then
    > > > > response.write "<img id='picFloat' src='testoboy.jpg'
    > > > > class='picBorderThin'>"
    > > > > End if
    > > > > if wank = 2 then
    > > > > response.write "<img id='picFloat' src='me.jpg'
    > > > > class='picBorderThin'>"
    > > > > End if
    > > > > Response.Write "<p><span id='firstWords'>"
    > > > > storyFix = replace(rsForums("T_MESSAGE"),vbcrlf & vbcrlf, "<p>")
    > > > > story = replace(storyFix,"<p>", "</p>" & vbcrlf & "<p>")
    > > > > for i = 1 to 4
    > > > > spacepos = instr(story," " )
    > > > > word = left(story,spacepos)
    > > > > story = right(story,len(story)-spacepos)
    > > > > response.write word
    > > > > next
    > > > >
    > > > > Response.Write "</span>"
    > > > > Response.Write story
    > > > > Response.Write "</p>" & vbcrlf & vbcrlf & "<hr>"
    > > > > rsForums.MoveNext
    > > > > next
    > > > > rsForums.Close
    > > > > Set rsForums = nothing
    > > >
    > > > I wouldn't do this like this...
    > > >
    > > > At some stage, each story/article is entered into a database. It's at
    > > > that point that I would manipulate it in the way you want. That way,
    > > > the operation is only ever performed once for each story, rather than
    > > > every time a page is requested.
    > > >
    > > > Anyhoo, you need to break the problem down in the opposite order in
    > > > which you have. The first thing you need to do is to break the story
    > > > into paragraphs. Whether on input or output, this can be done using
    > > > split(). You also need to put you images into an array, so you can get
    > > > them by index.
    > > >
    > > > Now that you have an array of paragraphs, and an array of images, it's
    > > > easy to loop through from 0 to 6, prepending each paragraph with its
    > > > associated image html. Within that loop, you can conduct the operation
    > > > to style the first few words. You would create a string containing the
    > > > first 7 paragraphs (adding <p> tags as needed). Then, if there are any
    > > > paragraphs left, you would need to loop through those to style the
    > > > first few words, and append them to your string. Then its ready for
    > > > input/output.
    > > >
    > > > --
    > > > Mike Brind
    > > >
     
    the other john, Jul 21, 2006
    #7
  8. the other john

    Mike Brind Guest

    Nope.

    paras = split(mystring,vbcrlf & vbcrlf)

    This returns a one-dimensional zero-based array of paragraphs, so the
    first paragraph will be held in the element referenced as paras(0), the
    second in paras(1) etc.

    Response.Write Ubound(paras) + 1 will give you the total number of
    paragraphs.

    --
    Mike Brind

    the other john wrote:
    > will split() take this?
    >
    > para = vbcrlf & vbcrlf
    > Split(mystring, para)
    >
    >
    > Mike Brind wrote:
    > > Even more reason to perform the operation on input. When the customer
    > > changes the brief to have more or less words stylized, I'll look
    > > forward to presenting the budget cost of doing so on existing data :)
    > >
    > > --
    > > Mike Brind
    > >
    > > Bob Lehmann wrote:
    > > > > At some stage, each story/article is entered into a database. It's at
    > > > > that point that I would manipulate it in the way you want. That way,
    > > > > the operation is only ever performed once for each story,
    > > >
    > > > Good idea.....
    > > >
    > > > Until the customer decides that they want the first 5 words stylized.
    > > >
    > > > Bob Lehmann
    > > >
    > > >
    > > > "Mike Brind" <> wrote in message
    > > > news:...
    > > > >
    > > > > the other john wrote:
    > > > > > I'm trying to enhance a script to do the following things.
    > > > > >
    > > > > > 1). detect the first four words of a paragraph and stylize them
    > > > > > (already does that)
    > > > > > 2). Capitalize and stylize the first letter of each paragraph (already
    > > > > > does that via style sheet)
    > > > > > 3). Count the number of paragraphs (or number of "vbcrlf & vbcrfl") so
    > > > > > I can insert a images in specific places (i.e. I want to dynamically
    > > > > > insert image 1 in paragraph 1, image 2 into para 2, etc.)
    > > > > >
    > > > > > This third item I can't figure out. I've tried it a few ways but keep
    > > > > > running to problems.
    > > > > >
    > > > > > Thanks!!!
    > > > > >
    > > > > > The following script was provided by Mike Brind, thanks Mike. It
    > > > > > currently can produce results for the first 2 items I listed above but
    > > > > > not exactly the way I want it to. It places an image into the first
    > > > > > paragraph for each "record" but that's not what I want.
    > > > > >
    > > > > > Dim str, i, spacepos, word
    > > > > > for wank = 1 to 7
    > > > > > if rsForums.EOF then exit for
    > > > > > if wank = 1 then
    > > > > > response.write "<img id='picFloat' src='testoboy.jpg'
    > > > > > class='picBorderThin'>"
    > > > > > End if
    > > > > > if wank = 2 then
    > > > > > response.write "<img id='picFloat' src='me.jpg'
    > > > > > class='picBorderThin'>"
    > > > > > End if
    > > > > > Response.Write "<p><span id='firstWords'>"
    > > > > > storyFix = replace(rsForums("T_MESSAGE"),vbcrlf & vbcrlf, "<p>")
    > > > > > story = replace(storyFix,"<p>", "</p>" & vbcrlf & "<p>")
    > > > > > for i = 1 to 4
    > > > > > spacepos = instr(story," " )
    > > > > > word = left(story,spacepos)
    > > > > > story = right(story,len(story)-spacepos)
    > > > > > response.write word
    > > > > > next
    > > > > >
    > > > > > Response.Write "</span>"
    > > > > > Response.Write story
    > > > > > Response.Write "</p>" & vbcrlf & vbcrlf & "<hr>"
    > > > > > rsForums.MoveNext
    > > > > > next
    > > > > > rsForums.Close
    > > > > > Set rsForums = nothing
    > > > >
    > > > > I wouldn't do this like this...
    > > > >
    > > > > At some stage, each story/article is entered into a database. It's at
    > > > > that point that I would manipulate it in the way you want. That way,
    > > > > the operation is only ever performed once for each story, rather than
    > > > > every time a page is requested.
    > > > >
    > > > > Anyhoo, you need to break the problem down in the opposite order in
    > > > > which you have. The first thing you need to do is to break the story
    > > > > into paragraphs. Whether on input or output, this can be done using
    > > > > split(). You also need to put you images into an array, so you can get
    > > > > them by index.
    > > > >
    > > > > Now that you have an array of paragraphs, and an array of images, it's
    > > > > easy to loop through from 0 to 6, prepending each paragraph with its
    > > > > associated image html. Within that loop, you can conduct the operation
    > > > > to style the first few words. You would create a string containing the
    > > > > first 7 paragraphs (adding <p> tags as needed). Then, if there are any
    > > > > paragraphs left, you would need to loop through those to style the
    > > > > first few words, and append them to your string. Then its ready for
    > > > > input/output.
    > > > >
    > > > > --
    > > > > Mike Brind
    > > > >
     
    Mike Brind, Jul 21, 2006
    #8
  9. I tried this and it seemed to work except now I have a style issue. The
    problem is if the letter I want to be affected by p:first-letter isn't
    actually at the beginning of the item it won't work and if I want the
    first pic to appear at the top it has to be at the beginning of the
    item. Ideas?

    Thanks!!!

    <style>
    #picFloat {float:left;}
    p:first-letter {color: #8B0000; font-size:
    40px;font-family:times;float:left;}
    #firstWords
    {text-transform:uppercase;font-family:times;font-size:120%;}
    </style>
    '
    '
    myStory = rsForums("T_MESSAGE")

    para = vbcrlf & vbcrlf

    storyArray = Split(myStory, para)
    storyArray(0) = "<img id='picFloat' src='testoboy.jpg'
    class='picBorderThin'>" & storyArray(0)
    storyArray(1) = storyArray(1) & "<img id='picFloat' src='me.jpg'
    class='picBorderThin'>"

    for each item in storyArray
    Response.write "<p>" & item & "</p>"
    Next


    Mike Brind wrote:
    > Nope.
    >
    > paras = split(mystring,vbcrlf & vbcrlf)
    >
    > This returns a one-dimensional zero-based array of paragraphs, so the
    > first paragraph will be held in the element referenced as paras(0), the
    > second in paras(1) etc.
    >
    > Response.Write Ubound(paras) + 1 will give you the total number of
    > paragraphs.
    >
    > --
    > Mike Brind
    >
    > the other john wrote:
    > > will split() take this?
    > >
    > > para = vbcrlf & vbcrlf
    > > Split(mystring, para)
    > >
    > >
    > > Mike Brind wrote:
    > > > Even more reason to perform the operation on input. When the customer
    > > > changes the brief to have more or less words stylized, I'll look
    > > > forward to presenting the budget cost of doing so on existing data :)
    > > >
    > > > --
    > > > Mike Brind
    > > >
    > > > Bob Lehmann wrote:
    > > > > > At some stage, each story/article is entered into a database. It's at
    > > > > > that point that I would manipulate it in the way you want. That way,
    > > > > > the operation is only ever performed once for each story,
    > > > >
    > > > > Good idea.....
    > > > >
    > > > > Until the customer decides that they want the first 5 words stylized.
    > > > >
    > > > > Bob Lehmann
    > > > >
    > > > >
    > > > > "Mike Brind" <> wrote in message
    > > > > news:...
    > > > > >
    > > > > > the other john wrote:
    > > > > > > I'm trying to enhance a script to do the following things.
    > > > > > >
    > > > > > > 1). detect the first four words of a paragraph and stylize them
    > > > > > > (already does that)
    > > > > > > 2). Capitalize and stylize the first letter of each paragraph (already
    > > > > > > does that via style sheet)
    > > > > > > 3). Count the number of paragraphs (or number of "vbcrlf & vbcrfl") so
    > > > > > > I can insert a images in specific places (i.e. I want to dynamically
    > > > > > > insert image 1 in paragraph 1, image 2 into para 2, etc.)
    > > > > > >
    > > > > > > This third item I can't figure out. I've tried it a few ways but keep
    > > > > > > running to problems.
    > > > > > >
    > > > > > > Thanks!!!
    > > > > > >
    > > > > > > The following script was provided by Mike Brind, thanks Mike. It
    > > > > > > currently can produce results for the first 2 items I listed above but
    > > > > > > not exactly the way I want it to. It places an image into the first
    > > > > > > paragraph for each "record" but that's not what I want.
    > > > > > >
    > > > > > > Dim str, i, spacepos, word
    > > > > > > for wank = 1 to 7
    > > > > > > if rsForums.EOF then exit for
    > > > > > > if wank = 1 then
    > > > > > > response.write "<img id='picFloat' src='testoboy.jpg'
    > > > > > > class='picBorderThin'>"
    > > > > > > End if
    > > > > > > if wank = 2 then
    > > > > > > response.write "<img id='picFloat' src='me.jpg'
    > > > > > > class='picBorderThin'>"
    > > > > > > End if
    > > > > > > Response.Write "<p><span id='firstWords'>"
    > > > > > > storyFix = replace(rsForums("T_MESSAGE"),vbcrlf & vbcrlf, "<p>")
    > > > > > > story = replace(storyFix,"<p>", "</p>" & vbcrlf & "<p>")
    > > > > > > for i = 1 to 4
    > > > > > > spacepos = instr(story," " )
    > > > > > > word = left(story,spacepos)
    > > > > > > story = right(story,len(story)-spacepos)
    > > > > > > response.write word
    > > > > > > next
    > > > > > >
    > > > > > > Response.Write "</span>"
    > > > > > > Response.Write story
    > > > > > > Response.Write "</p>" & vbcrlf & vbcrlf & "<hr>"
    > > > > > > rsForums.MoveNext
    > > > > > > next
    > > > > > > rsForums.Close
    > > > > > > Set rsForums = nothing
    > > > > >
    > > > > > I wouldn't do this like this...
    > > > > >
    > > > > > At some stage, each story/article is entered into a database. It's at
    > > > > > that point that I would manipulate it in the way you want. That way,
    > > > > > the operation is only ever performed once for each story, rather than
    > > > > > every time a page is requested.
    > > > > >
    > > > > > Anyhoo, you need to break the problem down in the opposite order in
    > > > > > which you have. The first thing you need to do is to break the story
    > > > > > into paragraphs. Whether on input or output, this can be done using
    > > > > > split(). You also need to put you images into an array, so you can get
    > > > > > them by index.
    > > > > >
    > > > > > Now that you have an array of paragraphs, and an array of images, it's
    > > > > > easy to loop through from 0 to 6, prepending each paragraph with its
    > > > > > associated image html. Within that loop, you can conduct the operation
    > > > > > to style the first few words. You would create a string containing the
    > > > > > first 7 paragraphs (adding <p> tags as needed). Then, if there are any
    > > > > > paragraphs left, you would need to loop through those to style the
    > > > > > first few words, and append them to your string. Then its ready for
    > > > > > input/output.
    > > > > >
    > > > > > --
    > > > > > Mike Brind
    > > > > >
     
    the other john, Jul 21, 2006
    #9
  10. the other john

    Mike Brind Guest

    I'm no CSS expert, so you might be better off asking this in a style
    sheet group. However, try putting the text in a <p> tag

    storyArray(0) = "<img id='picFloat' src='testoboy.jpg'
    class='picBorderThin'><p>" & storyArray(0) & "</p>"

    --
    Mike Brind

    the other john wrote:
    > I tried this and it seemed to work except now I have a style issue. The
    > problem is if the letter I want to be affected by p:first-letter isn't
    > actually at the beginning of the item it won't work and if I want the
    > first pic to appear at the top it has to be at the beginning of the
    > item. Ideas?
    >
    > Thanks!!!
    >
    > <style>
    > #picFloat {float:left;}
    > p:first-letter {color: #8B0000; font-size:
    > 40px;font-family:times;float:left;}
    > #firstWords
    > {text-transform:uppercase;font-family:times;font-size:120%;}
    > </style>
    > '
    > '
    > myStory = rsForums("T_MESSAGE")
    >
    > para = vbcrlf & vbcrlf
    >
    > storyArray = Split(myStory, para)
    > storyArray(0) = "<img id='picFloat' src='testoboy.jpg'
    > class='picBorderThin'>" & storyArray(0)
    > storyArray(1) = storyArray(1) & "<img id='picFloat' src='me.jpg'
    > class='picBorderThin'>"
    >
    > for each item in storyArray
    > Response.write "<p>" & item & "</p>"
    > Next
    >
    >
    > Mike Brind wrote:
    > > Nope.
    > >
    > > paras = split(mystring,vbcrlf & vbcrlf)
    > >
    > > This returns a one-dimensional zero-based array of paragraphs, so the
    > > first paragraph will be held in the element referenced as paras(0), the
    > > second in paras(1) etc.
    > >
    > > Response.Write Ubound(paras) + 1 will give you the total number of
    > > paragraphs.
    > >
    > > --
    > > Mike Brind
    > >
    > > the other john wrote:
    > > > will split() take this?
    > > >
    > > > para = vbcrlf & vbcrlf
    > > > Split(mystring, para)
    > > >
    > > >
    > > > Mike Brind wrote:
    > > > > Even more reason to perform the operation on input. When the customer
    > > > > changes the brief to have more or less words stylized, I'll look
    > > > > forward to presenting the budget cost of doing so on existing data :)
    > > > >
    > > > > --
    > > > > Mike Brind
    > > > >
    > > > > Bob Lehmann wrote:
    > > > > > > At some stage, each story/article is entered into a database. It's at
    > > > > > > that point that I would manipulate it in the way you want. That way,
    > > > > > > the operation is only ever performed once for each story,
    > > > > >
    > > > > > Good idea.....
    > > > > >
    > > > > > Until the customer decides that they want the first 5 words stylized.
    > > > > >
    > > > > > Bob Lehmann
    > > > > >
    > > > > >
    > > > > > "Mike Brind" <> wrote in message
    > > > > > news:...
    > > > > > >
    > > > > > > the other john wrote:
    > > > > > > > I'm trying to enhance a script to do the following things.
    > > > > > > >
    > > > > > > > 1). detect the first four words of a paragraph and stylize them
    > > > > > > > (already does that)
    > > > > > > > 2). Capitalize and stylize the first letter of each paragraph (already
    > > > > > > > does that via style sheet)
    > > > > > > > 3). Count the number of paragraphs (or number of "vbcrlf & vbcrfl") so
    > > > > > > > I can insert a images in specific places (i.e. I want to dynamically
    > > > > > > > insert image 1 in paragraph 1, image 2 into para 2, etc.)
    > > > > > > >
    > > > > > > > This third item I can't figure out. I've tried it a few ways but keep
    > > > > > > > running to problems.
    > > > > > > >
    > > > > > > > Thanks!!!
    > > > > > > >
    > > > > > > > The following script was provided by Mike Brind, thanks Mike. It
    > > > > > > > currently can produce results for the first 2 items I listed above but
    > > > > > > > not exactly the way I want it to. It places an image into the first
    > > > > > > > paragraph for each "record" but that's not what I want.
    > > > > > > >
    > > > > > > > Dim str, i, spacepos, word
    > > > > > > > for wank = 1 to 7
    > > > > > > > if rsForums.EOF then exit for
    > > > > > > > if wank = 1 then
    > > > > > > > response.write "<img id='picFloat' src='testoboy.jpg'
    > > > > > > > class='picBorderThin'>"
    > > > > > > > End if
    > > > > > > > if wank = 2 then
    > > > > > > > response.write "<img id='picFloat' src='me.jpg'
    > > > > > > > class='picBorderThin'>"
    > > > > > > > End if
    > > > > > > > Response.Write "<p><span id='firstWords'>"
    > > > > > > > storyFix = replace(rsForums("T_MESSAGE"),vbcrlf & vbcrlf, "<p>")
    > > > > > > > story = replace(storyFix,"<p>", "</p>" & vbcrlf & "<p>")
    > > > > > > > for i = 1 to 4
    > > > > > > > spacepos = instr(story," " )
    > > > > > > > word = left(story,spacepos)
    > > > > > > > story = right(story,len(story)-spacepos)
    > > > > > > > response.write word
    > > > > > > > next
    > > > > > > >
    > > > > > > > Response.Write "</span>"
    > > > > > > > Response.Write story
    > > > > > > > Response.Write "</p>" & vbcrlf & vbcrlf & "<hr>"
    > > > > > > > rsForums.MoveNext
    > > > > > > > next
    > > > > > > > rsForums.Close
    > > > > > > > Set rsForums = nothing
    > > > > > >
    > > > > > > I wouldn't do this like this...
    > > > > > >
    > > > > > > At some stage, each story/article is entered into a database. It's at
    > > > > > > that point that I would manipulate it in the way you want. That way,
    > > > > > > the operation is only ever performed once for each story, rather than
    > > > > > > every time a page is requested.
    > > > > > >
    > > > > > > Anyhoo, you need to break the problem down in the opposite order in
    > > > > > > which you have. The first thing you need to do is to break the story
    > > > > > > into paragraphs. Whether on input or output, this can be done using
    > > > > > > split(). You also need to put you images into an array, so you can get
    > > > > > > them by index.
    > > > > > >
    > > > > > > Now that you have an array of paragraphs, and an array of images, it's
    > > > > > > easy to loop through from 0 to 6, prepending each paragraph with its
    > > > > > > associated image html. Within that loop, you can conduct the operation
    > > > > > > to style the first few words. You would create a string containing the
    > > > > > > first 7 paragraphs (adding <p> tags as needed). Then, if there are any
    > > > > > > paragraphs left, you would need to loop through those to style the
    > > > > > > first few words, and append them to your string. Then its ready for
    > > > > > > input/output.
    > > > > > >
    > > > > > > --
    > > > > > > Mike Brind
    > > > > > >
     
    Mike Brind, Jul 21, 2006
    #10
  11. Cool, this almost has it. But to make it even better is there a way
    other than the For Each loop that I can use to access "part" of the
    array? If I could just stylize specific parts of the array one way and
    the rest just be other, like an if else sort of thing that would put
    this thing to bed. The array works "great"....not I just need to
    figure out how to work with just "parts" of it. I'm thinking the For
    Each loop isn't going to work in this case since it's an all or nothing
    sort of thing. I haven't worked with arrays that much and don't know
    the possibilities.

    Thanks Mike! Learning a lot here!!


    Mike Brind wrote:
    > I'm no CSS expert, so you might be better off asking this in a style
    > sheet group. However, try putting the text in a <p> tag
    >
    > storyArray(0) = "<img id='picFloat' src='testoboy.jpg'
    > class='picBorderThin'><p>" & storyArray(0) & "</p>"
    >
    > --
    > Mike Brind
    >
    > the other john wrote:
    > > I tried this and it seemed to work except now I have a style issue. The
    > > problem is if the letter I want to be affected by p:first-letter isn't
    > > actually at the beginning of the item it won't work and if I want the
    > > first pic to appear at the top it has to be at the beginning of the
    > > item. Ideas?
    > >
    > > Thanks!!!
    > >
    > > <style>
    > > #picFloat {float:left;}
    > > p:first-letter {color: #8B0000; font-size:
    > > 40px;font-family:times;float:left;}
    > > #firstWords
    > > {text-transform:uppercase;font-family:times;font-size:120%;}
    > > </style>
    > > '
    > > '
    > > myStory = rsForums("T_MESSAGE")
    > >
    > > para = vbcrlf & vbcrlf
    > >
    > > storyArray = Split(myStory, para)
    > > storyArray(0) = "<img id='picFloat' src='testoboy.jpg'
    > > class='picBorderThin'>" & storyArray(0)
    > > storyArray(1) = storyArray(1) & "<img id='picFloat' src='me.jpg'
    > > class='picBorderThin'>"
    > >
    > > for each item in storyArray
    > > Response.write "<p>" & item & "</p>"
    > > Next
    > >
    > >
    > > Mike Brind wrote:
    > > > Nope.
    > > >
    > > > paras = split(mystring,vbcrlf & vbcrlf)
    > > >
    > > > This returns a one-dimensional zero-based array of paragraphs, so the
    > > > first paragraph will be held in the element referenced as paras(0), the
    > > > second in paras(1) etc.
    > > >
    > > > Response.Write Ubound(paras) + 1 will give you the total number of
    > > > paragraphs.
    > > >
    > > > --
    > > > Mike Brind
    > > >
    > > > the other john wrote:
    > > > > will split() take this?
    > > > >
    > > > > para = vbcrlf & vbcrlf
    > > > > Split(mystring, para)
    > > > >
    > > > >
    > > > > Mike Brind wrote:
    > > > > > Even more reason to perform the operation on input. When the customer
    > > > > > changes the brief to have more or less words stylized, I'll look
    > > > > > forward to presenting the budget cost of doing so on existing data :)
    > > > > >
    > > > > > --
    > > > > > Mike Brind
    > > > > >
    > > > > > Bob Lehmann wrote:
    > > > > > > > At some stage, each story/article is entered into a database. It's at
    > > > > > > > that point that I would manipulate it in the way you want. That way,
    > > > > > > > the operation is only ever performed once for each story,
    > > > > > >
    > > > > > > Good idea.....
    > > > > > >
    > > > > > > Until the customer decides that they want the first 5 words stylized.
    > > > > > >
    > > > > > > Bob Lehmann
    > > > > > >
    > > > > > >
    > > > > > > "Mike Brind" <> wrote in message
    > > > > > > news:...
    > > > > > > >
    > > > > > > > the other john wrote:
    > > > > > > > > I'm trying to enhance a script to do the following things.
    > > > > > > > >
    > > > > > > > > 1). detect the first four words of a paragraph and stylize them
    > > > > > > > > (already does that)
    > > > > > > > > 2). Capitalize and stylize the first letter of each paragraph (already
    > > > > > > > > does that via style sheet)
    > > > > > > > > 3). Count the number of paragraphs (or number of "vbcrlf & vbcrfl") so
    > > > > > > > > I can insert a images in specific places (i.e. I want to dynamically
    > > > > > > > > insert image 1 in paragraph 1, image 2 into para 2, etc.)
    > > > > > > > >
    > > > > > > > > This third item I can't figure out. I've tried it a few ways but keep
    > > > > > > > > running to problems.
    > > > > > > > >
    > > > > > > > > Thanks!!!
    > > > > > > > >
    > > > > > > > > The following script was provided by Mike Brind, thanks Mike. It
    > > > > > > > > currently can produce results for the first 2 items I listed above but
    > > > > > > > > not exactly the way I want it to. It places an image into the first
    > > > > > > > > paragraph for each "record" but that's not what I want.
    > > > > > > > >
    > > > > > > > > Dim str, i, spacepos, word
    > > > > > > > > for wank = 1 to 7
    > > > > > > > > if rsForums.EOF then exit for
    > > > > > > > > if wank = 1 then
    > > > > > > > > response.write "<img id='picFloat' src='testoboy.jpg'
    > > > > > > > > class='picBorderThin'>"
    > > > > > > > > End if
    > > > > > > > > if wank = 2 then
    > > > > > > > > response.write "<img id='picFloat' src='me.jpg'
    > > > > > > > > class='picBorderThin'>"
    > > > > > > > > End if
    > > > > > > > > Response.Write "<p><span id='firstWords'>"
    > > > > > > > > storyFix = replace(rsForums("T_MESSAGE"),vbcrlf & vbcrlf, "<p>")
    > > > > > > > > story = replace(storyFix,"<p>", "</p>" & vbcrlf & "<p>")
    > > > > > > > > for i = 1 to 4
    > > > > > > > > spacepos = instr(story," " )
    > > > > > > > > word = left(story,spacepos)
    > > > > > > > > story = right(story,len(story)-spacepos)
    > > > > > > > > response.write word
    > > > > > > > > next
    > > > > > > > >
    > > > > > > > > Response.Write "</span>"
    > > > > > > > > Response.Write story
    > > > > > > > > Response.Write "</p>" & vbcrlf & vbcrlf & "<hr>"
    > > > > > > > > rsForums.MoveNext
    > > > > > > > > next
    > > > > > > > > rsForums.Close
    > > > > > > > > Set rsForums = nothing
    > > > > > > >
    > > > > > > > I wouldn't do this like this...
    > > > > > > >
    > > > > > > > At some stage, each story/article is entered into a database. It's at
    > > > > > > > that point that I would manipulate it in the way you want. That way,
    > > > > > > > the operation is only ever performed once for each story, rather than
    > > > > > > > every time a page is requested.
    > > > > > > >
    > > > > > > > Anyhoo, you need to break the problem down in the opposite order in
    > > > > > > > which you have. The first thing you need to do is to break the story
    > > > > > > > into paragraphs. Whether on input or output, this can be done using
    > > > > > > > split(). You also need to put you images into an array, so you can get
    > > > > > > > them by index.
    > > > > > > >
    > > > > > > > Now that you have an array of paragraphs, and an array of images, it's
    > > > > > > > easy to loop through from 0 to 6, prepending each paragraph with its
    > > > > > > > associated image html. Within that loop, you can conduct the operation
    > > > > > > > to style the first few words. You would create a string containing the
    > > > > > > > first 7 paragraphs (adding <p> tags as needed). Then, if there are any
    > > > > > > > paragraphs left, you would need to loop through those to style the
    > > > > > > > first few words, and append them to your string. Then its ready for
    > > > > > > > input/output.
    > > > > > > >
    > > > > > > > --
    > > > > > > > Mike Brind
    > > > > > > >
     
    the other john, Jul 22, 2006
    #11
  12. Tried this and it only delivers one word and appears to exit the loop.
    In other words it appears to stylize the first word rather than the
    desired first 4. Any ideas?

    myStory = rsForums("T_MESSAGE")

    para = vbcrlf & vbcrlf

    storyArray = Split(myStory, para)

    for i = 1 to 4
    spacepos = instr(storyArray(0)," " )
    word = left(storyArray(0),spacepos)
    story = right(storyArray(0),len(storyArray(0))-spacepos)
    next

    storyArray(0) = "<span id='firstWords'>" & word & "</span>" & story



    Thanks again!!!


    the other john wrote:
    > Cool, this almost has it. But to make it even better is there a way
    > other than the For Each loop that I can use to access "part" of the
    > array? If I could just stylize specific parts of the array one way and
    > the rest just be other, like an if else sort of thing that would put
    > this thing to bed. The array works "great"....not I just need to
    > figure out how to work with just "parts" of it. I'm thinking the For
    > Each loop isn't going to work in this case since it's an all or nothing
    > sort of thing. I haven't worked with arrays that much and don't know
    > the possibilities.
    >
    > Thanks Mike! Learning a lot here!!
    >
    >
    > Mike Brind wrote:
    > > I'm no CSS expert, so you might be better off asking this in a style
    > > sheet group. However, try putting the text in a <p> tag
    > >
    > > storyArray(0) = "<img id='picFloat' src='testoboy.jpg'
    > > class='picBorderThin'><p>" & storyArray(0) & "</p>"
    > >
    > > --
    > > Mike Brind
    > >
    > > the other john wrote:
    > > > I tried this and it seemed to work except now I have a style issue. The
    > > > problem is if the letter I want to be affected by p:first-letter isn't
    > > > actually at the beginning of the item it won't work and if I want the
    > > > first pic to appear at the top it has to be at the beginning of the
    > > > item. Ideas?
    > > >
    > > > Thanks!!!
    > > >
    > > > <style>
    > > > #picFloat {float:left;}
    > > > p:first-letter {color: #8B0000; font-size:
    > > > 40px;font-family:times;float:left;}
    > > > #firstWords
    > > > {text-transform:uppercase;font-family:times;font-size:120%;}
    > > > </style>
    > > > '
    > > > '
    > > > myStory = rsForums("T_MESSAGE")
    > > >
    > > > para = vbcrlf & vbcrlf
    > > >
    > > > storyArray = Split(myStory, para)
    > > > storyArray(0) = "<img id='picFloat' src='testoboy.jpg'
    > > > class='picBorderThin'>" & storyArray(0)
    > > > storyArray(1) = storyArray(1) & "<img id='picFloat' src='me.jpg'
    > > > class='picBorderThin'>"
    > > >
    > > > for each item in storyArray
    > > > Response.write "<p>" & item & "</p>"
    > > > Next
    > > >
    > > >
    > > > Mike Brind wrote:
    > > > > Nope.
    > > > >
    > > > > paras = split(mystring,vbcrlf & vbcrlf)
    > > > >
    > > > > This returns a one-dimensional zero-based array of paragraphs, so the
    > > > > first paragraph will be held in the element referenced as paras(0), the
    > > > > second in paras(1) etc.
    > > > >
    > > > > Response.Write Ubound(paras) + 1 will give you the total number of
    > > > > paragraphs.
    > > > >
    > > > > --
    > > > > Mike Brind
    > > > >
    > > > > the other john wrote:
    > > > > > will split() take this?
    > > > > >
    > > > > > para = vbcrlf & vbcrlf
    > > > > > Split(mystring, para)
    > > > > >
    > > > > >
    > > > > > Mike Brind wrote:
    > > > > > > Even more reason to perform the operation on input. When the customer
    > > > > > > changes the brief to have more or less words stylized, I'll look
    > > > > > > forward to presenting the budget cost of doing so on existing data :)
    > > > > > >
    > > > > > > --
    > > > > > > Mike Brind
    > > > > > >
    > > > > > > Bob Lehmann wrote:
    > > > > > > > > At some stage, each story/article is entered into a database. It's at
    > > > > > > > > that point that I would manipulate it in the way you want. That way,
    > > > > > > > > the operation is only ever performed once for each story,
    > > > > > > >
    > > > > > > > Good idea.....
    > > > > > > >
    > > > > > > > Until the customer decides that they want the first 5 words stylized.
    > > > > > > >
    > > > > > > > Bob Lehmann
    > > > > > > >
    > > > > > > >
    > > > > > > > "Mike Brind" <> wrote in message
    > > > > > > > news:...
    > > > > > > > >
    > > > > > > > > the other john wrote:
    > > > > > > > > > I'm trying to enhance a script to do the following things.
    > > > > > > > > >
    > > > > > > > > > 1). detect the first four words of a paragraph and stylize them
    > > > > > > > > > (already does that)
    > > > > > > > > > 2). Capitalize and stylize the first letter of each paragraph (already
    > > > > > > > > > does that via style sheet)
    > > > > > > > > > 3). Count the number of paragraphs (or number of "vbcrlf & vbcrfl") so
    > > > > > > > > > I can insert a images in specific places (i.e. I want to dynamically
    > > > > > > > > > insert image 1 in paragraph 1, image 2 into para 2, etc.)
    > > > > > > > > >
    > > > > > > > > > This third item I can't figure out. I've tried it a few ways but keep
    > > > > > > > > > running to problems.
    > > > > > > > > >
    > > > > > > > > > Thanks!!!
    > > > > > > > > >
    > > > > > > > > > The following script was provided by Mike Brind, thanks Mike. It
    > > > > > > > > > currently can produce results for the first 2 items I listed above but
    > > > > > > > > > not exactly the way I want it to. It places an image into the first
    > > > > > > > > > paragraph for each "record" but that's not what I want.
    > > > > > > > > >
    > > > > > > > > > Dim str, i, spacepos, word
    > > > > > > > > > for wank = 1 to 7
    > > > > > > > > > if rsForums.EOF then exit for
    > > > > > > > > > if wank = 1 then
    > > > > > > > > > response.write "<img id='picFloat' src='testoboy.jpg'
    > > > > > > > > > class='picBorderThin'>"
    > > > > > > > > > End if
    > > > > > > > > > if wank = 2 then
    > > > > > > > > > response.write "<img id='picFloat' src='me.jpg'
    > > > > > > > > > class='picBorderThin'>"
    > > > > > > > > > End if
    > > > > > > > > > Response.Write "<p><span id='firstWords'>"
    > > > > > > > > > storyFix = replace(rsForums("T_MESSAGE"),vbcrlf & vbcrlf, "<p>")
    > > > > > > > > > story = replace(storyFix,"<p>", "</p>" & vbcrlf & "<p>")
    > > > > > > > > > for i = 1 to 4
    > > > > > > > > > spacepos = instr(story," " )
    > > > > > > > > > word = left(story,spacepos)
    > > > > > > > > > story = right(story,len(story)-spacepos)
    > > > > > > > > > response.write word
    > > > > > > > > > next
    > > > > > > > > >
    > > > > > > > > > Response.Write "</span>"
    > > > > > > > > > Response.Write story
    > > > > > > > > > Response.Write "</p>" & vbcrlf & vbcrlf & "<hr>"
    > > > > > > > > > rsForums.MoveNext
    > > > > > > > > > next
    > > > > > > > > > rsForums.Close
    > > > > > > > > > Set rsForums = nothing
    > > > > > > > >
    > > > > > > > > I wouldn't do this like this...
    > > > > > > > >
    > > > > > > > > At some stage, each story/article is entered into a database. It's at
    > > > > > > > > that point that I would manipulate it in the way you want. That way,
    > > > > > > > > the operation is only ever performed once for each story, rather than
    > > > > > > > > every time a page is requested.
    > > > > > > > >
    > > > > > > > > Anyhoo, you need to break the problem down in the opposite order in
    > > > > > > > > which you have. The first thing you need to do is to break the story
    > > > > > > > > into paragraphs. Whether on input or output, this can be done using
    > > > > > > > > split(). You also need to put you images into an array, so you can get
    > > > > > > > > them by index.
    > > > > > > > >
    > > > > > > > > Now that you have an array of paragraphs, and an array of images, it's
    > > > > > > > > easy to loop through from 0 to 6, prepending each paragraph with its
    > > > > > > > > associated image html. Within that loop, you can conduct the operation
    > > > > > > > > to style the first few words. You would create a string containing the
    > > > > > > > > first 7 paragraphs (adding <p> tags as needed). Then, if there are any
    > > > > > > > > paragraphs left, you would need to loop through those to style the
    > > > > > > > > first few words, and append them to your string. Then its ready for
    > > > > > > > > input/output.
    > > > > > > > >
    > > > > > > > > --
    > > > > > > > > Mike Brind
    > > > > > > > >
     
    the other john, Jul 22, 2006
    #12
  13. the other john

    Mike Brind Guest

    myStory = rsForums("T_MESSAGE")

    paras = Split(myStory, vbcrlf & vbcrlf)
    para = paras(0)
    Response.Write "<span id='firstWords'>"
    for i = 1 to 4
    spacepos = instr(para," " )
    word = left(para,spacepos)
    Response.Write word
    para= right(para,len(story)-spacepos)
    next

    Response.Write "</span>" & para

    Each time the loop executes, it strips the first word from the
    paragraph after writing it to the browser within the <span> tags. The
    closing </span tag is written after the loop finishes, with the
    remainder of the paragraph after it.

    --
    Mike Brind


    the other john wrote:
    > Tried this and it only delivers one word and appears to exit the loop.
    > In other words it appears to stylize the first word rather than the
    > desired first 4. Any ideas?
    >
    > myStory = rsForums("T_MESSAGE")
    >
    > para = vbcrlf & vbcrlf
    >
    > storyArray = Split(myStory, para)
    >
    > for i = 1 to 4
    > spacepos = instr(storyArray(0)," " )
    > word = left(storyArray(0),spacepos)
    > story = right(storyArray(0),len(storyArray(0))-spacepos)
    > next
    >
    > storyArray(0) = "<span id='firstWords'>" & word & "</span>" & story
    >
    >
    >
    > Thanks again!!!
    >
    >
    > the other john wrote:
    > > Cool, this almost has it. But to make it even better is there a way
    > > other than the For Each loop that I can use to access "part" of the
    > > array? If I could just stylize specific parts of the array one way and
    > > the rest just be other, like an if else sort of thing that would put
    > > this thing to bed. The array works "great"....not I just need to
    > > figure out how to work with just "parts" of it. I'm thinking the For
    > > Each loop isn't going to work in this case since it's an all or nothing
    > > sort of thing. I haven't worked with arrays that much and don't know
    > > the possibilities.
    > >
    > > Thanks Mike! Learning a lot here!!
    > >
    > >
    > > Mike Brind wrote:
    > > > I'm no CSS expert, so you might be better off asking this in a style
    > > > sheet group. However, try putting the text in a <p> tag
    > > >
    > > > storyArray(0) = "<img id='picFloat' src='testoboy.jpg'
    > > > class='picBorderThin'><p>" & storyArray(0) & "</p>"
    > > >
    > > > --
    > > > Mike Brind
    > > >
    > > > the other john wrote:
    > > > > I tried this and it seemed to work except now I have a style issue. The
    > > > > problem is if the letter I want to be affected by p:first-letter isn't
    > > > > actually at the beginning of the item it won't work and if I want the
    > > > > first pic to appear at the top it has to be at the beginning of the
    > > > > item. Ideas?
    > > > >
    > > > > Thanks!!!
    > > > >
    > > > > <style>
    > > > > #picFloat {float:left;}
    > > > > p:first-letter {color: #8B0000; font-size:
    > > > > 40px;font-family:times;float:left;}
    > > > > #firstWords
    > > > > {text-transform:uppercase;font-family:times;font-size:120%;}
    > > > > </style>
    > > > > '
    > > > > '
    > > > > myStory = rsForums("T_MESSAGE")
    > > > >
    > > > > para = vbcrlf & vbcrlf
    > > > >
    > > > > storyArray = Split(myStory, para)
    > > > > storyArray(0) = "<img id='picFloat' src='testoboy.jpg'
    > > > > class='picBorderThin'>" & storyArray(0)
    > > > > storyArray(1) = storyArray(1) & "<img id='picFloat' src='me.jpg'
    > > > > class='picBorderThin'>"
    > > > >
    > > > > for each item in storyArray
    > > > > Response.write "<p>" & item & "</p>"
    > > > > Next
    > > > >
    > > > >
    > > > > Mike Brind wrote:
    > > > > > Nope.
    > > > > >
    > > > > > paras = split(mystring,vbcrlf & vbcrlf)
    > > > > >
    > > > > > This returns a one-dimensional zero-based array of paragraphs, so the
    > > > > > first paragraph will be held in the element referenced as paras(0), the
    > > > > > second in paras(1) etc.
    > > > > >
    > > > > > Response.Write Ubound(paras) + 1 will give you the total number of
    > > > > > paragraphs.
    > > > > >
    > > > > > --
    > > > > > Mike Brind
    > > > > >
    > > > > > the other john wrote:
    > > > > > > will split() take this?
    > > > > > >
    > > > > > > para = vbcrlf & vbcrlf
    > > > > > > Split(mystring, para)
    > > > > > >
    > > > > > >
    > > > > > > Mike Brind wrote:
    > > > > > > > Even more reason to perform the operation on input. When the customer
    > > > > > > > changes the brief to have more or less words stylized, I'll look
    > > > > > > > forward to presenting the budget cost of doing so on existing data :)
    > > > > > > >
    > > > > > > > --
    > > > > > > > Mike Brind
    > > > > > > >
    > > > > > > > Bob Lehmann wrote:
    > > > > > > > > > At some stage, each story/article is entered into a database. It's at
    > > > > > > > > > that point that I would manipulate it in the way you want. That way,
    > > > > > > > > > the operation is only ever performed once for each story,
    > > > > > > > >
    > > > > > > > > Good idea.....
    > > > > > > > >
    > > > > > > > > Until the customer decides that they want the first 5 words stylized.
    > > > > > > > >
    > > > > > > > > Bob Lehmann
    > > > > > > > >
    > > > > > > > >
    > > > > > > > > "Mike Brind" <> wrote in message
    > > > > > > > > news:...
    > > > > > > > > >
    > > > > > > > > > the other john wrote:
    > > > > > > > > > > I'm trying to enhance a script to do the following things.
    > > > > > > > > > >
    > > > > > > > > > > 1). detect the first four words of a paragraph and stylize them
    > > > > > > > > > > (already does that)
    > > > > > > > > > > 2). Capitalize and stylize the first letter of each paragraph (already
    > > > > > > > > > > does that via style sheet)
    > > > > > > > > > > 3). Count the number of paragraphs (or number of "vbcrlf & vbcrfl") so
    > > > > > > > > > > I can insert a images in specific places (i.e. I want to dynamically
    > > > > > > > > > > insert image 1 in paragraph 1, image 2 into para 2, etc.)
    > > > > > > > > > >
    > > > > > > > > > > This third item I can't figure out. I've tried it a few ways but keep
    > > > > > > > > > > running to problems.
    > > > > > > > > > >
    > > > > > > > > > > Thanks!!!
    > > > > > > > > > >
    > > > > > > > > > > The following script was provided by Mike Brind, thanks Mike. It
    > > > > > > > > > > currently can produce results for the first 2 items I listed above but
    > > > > > > > > > > not exactly the way I want it to. It places an image into the first
    > > > > > > > > > > paragraph for each "record" but that's not what I want.
    > > > > > > > > > >
    > > > > > > > > > > Dim str, i, spacepos, word
    > > > > > > > > > > for wank = 1 to 7
    > > > > > > > > > > if rsForums.EOF then exit for
    > > > > > > > > > > if wank = 1 then
    > > > > > > > > > > response.write "<img id='picFloat' src='testoboy.jpg'
    > > > > > > > > > > class='picBorderThin'>"
    > > > > > > > > > > End if
    > > > > > > > > > > if wank = 2 then
    > > > > > > > > > > response.write "<img id='picFloat' src='me.jpg'
    > > > > > > > > > > class='picBorderThin'>"
    > > > > > > > > > > End if
    > > > > > > > > > > Response.Write "<p><span id='firstWords'>"
    > > > > > > > > > > storyFix = replace(rsForums("T_MESSAGE"),vbcrlf & vbcrlf, "<p>")
    > > > > > > > > > > story = replace(storyFix,"<p>", "</p>" & vbcrlf & "<p>")
    > > > > > > > > > > for i = 1 to 4
    > > > > > > > > > > spacepos = instr(story," " )
    > > > > > > > > > > word = left(story,spacepos)
    > > > > > > > > > > story = right(story,len(story)-spacepos)
    > > > > > > > > > > response.write word
    > > > > > > > > > > next
    > > > > > > > > > >
    > > > > > > > > > > Response.Write "</span>"
    > > > > > > > > > > Response.Write story
    > > > > > > > > > > Response.Write "</p>" & vbcrlf & vbcrlf & "<hr>"
    > > > > > > > > > > rsForums.MoveNext
    > > > > > > > > > > next
    > > > > > > > > > > rsForums.Close
    > > > > > > > > > > Set rsForums = nothing
    > > > > > > > > >
    > > > > > > > > > I wouldn't do this like this...
    > > > > > > > > >
    > > > > > > > > > At some stage, each story/article is entered into a database. It's at
    > > > > > > > > > that point that I would manipulate it in the way you want. That way,
    > > > > > > > > > the operation is only ever performed once for each story, rather than
    > > > > > > > > > every time a page is requested.
    > > > > > > > > >
    > > > > > > > > > Anyhoo, you need to break the problem down in the opposite order in
    > > > > > > > > > which you have. The first thing you need to do is to break the story
    > > > > > > > > > into paragraphs. Whether on input or output, this can be done using
    > > > > > > > > > split(). You also need to put you images into an array, so you can get
    > > > > > > > > > them by index.
    > > > > > > > > >
    > > > > > > > > > Now that you have an array of paragraphs, and an array of images, it's
    > > > > > > > > > easy to loop through from 0 to 6, prepending each paragraph with its
    > > > > > > > > > associated image html. Within that loop, you can conduct the operation
    > > > > > > > > > to style the first few words. You would create a string containing the
    > > > > > > > > > first 7 paragraphs (adding <p> tags as needed). Then, if there are any
    > > > > > > > > > paragraphs left, you would need to loop through those to style the
    > > > > > > > > > first few words, and append them to your string. Then its ready for
    > > > > > > > > > input/output.
    > > > > > > > > >
    > > > > > > > > > --
    > > > > > > > > > Mike Brind
    > > > > > > > > >
     
    Mike Brind, Jul 22, 2006
    #13
  14. for some reason now I'm getting this...odd...don't know why..

    Microsoft VBScript runtime error '800a0005'

    Invalid procedure call or argument: 'right'

    /paraTest.asp, line 36


    "right" didn't cause a problem before. To be clear about what I was
    trying to do I should have include the entire script. I'm trying to
    tweek array items after getting the first 4 words formatted.

    Thanks for your help Mike, I'm so close now, this is awesome!!!



    myStory = rsForums("T_MESSAGE")

    para = vbcrlf & vbcrlf

    storyArray = Split(myStory, para)
    for i = 1 to 4
    spacepos = instr(storyArray(0)," " )
    word = left(storyArray(0),spacepos)
    story = right(storyArray(0),len(storyArray(0))-spacepos)
    next

    storyArray(0) = "<span id='firstWords'>" & word & "</span>" & story

    storyArray(0) = "<img id='picFloat' src='testoboy.jpg'
    class='picBorderThin'><p>" & storyArray(0) & "</p><blockquote>An
    importand quote from the story here<blockquote>"

    storyArray(1) = storyArray(1) & "<img id='picFloat' src='me.jpg'
    class='picBorderThin'>"


    for each item in storyArray
    Response.write "<p>" & item & "</p>" & vbcrlf
    Next


    Mike Brind wrote:
    > myStory = rsForums("T_MESSAGE")
    >
    > paras = Split(myStory, vbcrlf & vbcrlf)
    > para = paras(0)
    > Response.Write "<span id='firstWords'>"
    > for i = 1 to 4
    > spacepos = instr(para," " )
    > word = left(para,spacepos)
    > Response.Write word
    > para= right(para,len(story)-spacepos)
    > next
    >
    > Response.Write "</span>" & para
    >
    > Each time the loop executes, it strips the first word from the
    > paragraph after writing it to the browser within the <span> tags. The
    > closing </span tag is written after the loop finishes, with the
    > remainder of the paragraph after it.
    >
    > --
    > Mike Brind
    >
    >
    > the other john wrote:
    > > Tried this and it only delivers one word and appears to exit the loop.
    > > In other words it appears to stylize the first word rather than the
    > > desired first 4. Any ideas?
    > >
    > > myStory = rsForums("T_MESSAGE")
    > >
    > > para = vbcrlf & vbcrlf
    > >
    > > storyArray = Split(myStory, para)
    > >
    > > for i = 1 to 4
    > > spacepos = instr(storyArray(0)," " )
    > > word = left(storyArray(0),spacepos)
    > > story = right(storyArray(0),len(storyArray(0))-spacepos)
    > > next
    > >
    > > storyArray(0) = "<span id='firstWords'>" & word & "</span>" & story
    > >
    > >
    > >
    > > Thanks again!!!
    > >
    > >
    > > the other john wrote:
    > > > Cool, this almost has it. But to make it even better is there a way
    > > > other than the For Each loop that I can use to access "part" of the
    > > > array? If I could just stylize specific parts of the array one way and
    > > > the rest just be other, like an if else sort of thing that would put
    > > > this thing to bed. The array works "great"....not I just need to
    > > > figure out how to work with just "parts" of it. I'm thinking the For
    > > > Each loop isn't going to work in this case since it's an all or nothing
    > > > sort of thing. I haven't worked with arrays that much and don't know
    > > > the possibilities.
    > > >
    > > > Thanks Mike! Learning a lot here!!
    > > >
    > > >
    > > > Mike Brind wrote:
    > > > > I'm no CSS expert, so you might be better off asking this in a style
    > > > > sheet group. However, try putting the text in a <p> tag
    > > > >
    > > > > storyArray(0) = "<img id='picFloat' src='testoboy.jpg'
    > > > > class='picBorderThin'><p>" & storyArray(0) & "</p>"
    > > > >
    > > > > --
    > > > > Mike Brind
    > > > >
    > > > > the other john wrote:
    > > > > > I tried this and it seemed to work except now I have a style issue. The
    > > > > > problem is if the letter I want to be affected by p:first-letter isn't
    > > > > > actually at the beginning of the item it won't work and if I want the
    > > > > > first pic to appear at the top it has to be at the beginning of the
    > > > > > item. Ideas?
    > > > > >
    > > > > > Thanks!!!
    > > > > >
    > > > > > <style>
    > > > > > #picFloat {float:left;}
    > > > > > p:first-letter {color: #8B0000; font-size:
    > > > > > 40px;font-family:times;float:left;}
    > > > > > #firstWords
    > > > > > {text-transform:uppercase;font-family:times;font-size:120%;}
    > > > > > </style>
    > > > > > '
    > > > > > '
    > > > > > myStory = rsForums("T_MESSAGE")
    > > > > >
    > > > > > para = vbcrlf & vbcrlf
    > > > > >
    > > > > > storyArray = Split(myStory, para)
    > > > > > storyArray(0) = "<img id='picFloat' src='testoboy.jpg'
    > > > > > class='picBorderThin'>" & storyArray(0)
    > > > > > storyArray(1) = storyArray(1) & "<img id='picFloat' src='me.jpg'
    > > > > > class='picBorderThin'>"
    > > > > >
    > > > > > for each item in storyArray
    > > > > > Response.write "<p>" & item & "</p>"
    > > > > > Next
    > > > > >
    > > > > >
    > > > > > Mike Brind wrote:
    > > > > > > Nope.
    > > > > > >
    > > > > > > paras = split(mystring,vbcrlf & vbcrlf)
    > > > > > >
    > > > > > > This returns a one-dimensional zero-based array of paragraphs, so the
    > > > > > > first paragraph will be held in the element referenced as paras(0), the
    > > > > > > second in paras(1) etc.
    > > > > > >
    > > > > > > Response.Write Ubound(paras) + 1 will give you the total number of
    > > > > > > paragraphs.
    > > > > > >
    > > > > > > --
    > > > > > > Mike Brind
    > > > > > >
    > > > > > > the other john wrote:
    > > > > > > > will split() take this?
    > > > > > > >
    > > > > > > > para = vbcrlf & vbcrlf
    > > > > > > > Split(mystring, para)
    > > > > > > >
    > > > > > > >
    > > > > > > > Mike Brind wrote:
    > > > > > > > > Even more reason to perform the operation on input. When the customer
    > > > > > > > > changes the brief to have more or less words stylized, I'll look
    > > > > > > > > forward to presenting the budget cost of doing so on existing data :)
    > > > > > > > >
    > > > > > > > > --
    > > > > > > > > Mike Brind
    > > > > > > > >
    > > > > > > > > Bob Lehmann wrote:
    > > > > > > > > > > At some stage, each story/article is entered into a database. It's at
    > > > > > > > > > > that point that I would manipulate it in the way you want. That way,
    > > > > > > > > > > the operation is only ever performed once for each story,
    > > > > > > > > >
    > > > > > > > > > Good idea.....
    > > > > > > > > >
    > > > > > > > > > Until the customer decides that they want the first 5 words stylized.
    > > > > > > > > >
    > > > > > > > > > Bob Lehmann
    > > > > > > > > >
    > > > > > > > > >
    > > > > > > > > > "Mike Brind" <> wrote in message
    > > > > > > > > > news:...
    > > > > > > > > > >
    > > > > > > > > > > the other john wrote:
    > > > > > > > > > > > I'm trying to enhance a script to do the following things.
    > > > > > > > > > > >
    > > > > > > > > > > > 1). detect the first four words of a paragraph and stylize them
    > > > > > > > > > > > (already does that)
    > > > > > > > > > > > 2). Capitalize and stylize the first letter of each paragraph (already
    > > > > > > > > > > > does that via style sheet)
    > > > > > > > > > > > 3). Count the number of paragraphs (or number of "vbcrlf & vbcrfl") so
    > > > > > > > > > > > I can insert a images in specific places (i.e. I want to dynamically
    > > > > > > > > > > > insert image 1 in paragraph 1, image 2 into para 2, etc.)
    > > > > > > > > > > >
    > > > > > > > > > > > This third item I can't figure out. I've tried it a few ways but keep
    > > > > > > > > > > > running to problems.
    > > > > > > > > > > >
    > > > > > > > > > > > Thanks!!!
    > > > > > > > > > > >
    > > > > > > > > > > > The following script was provided by Mike Brind, thanks Mike. It
    > > > > > > > > > > > currently can produce results for the first 2 items I listed above but
    > > > > > > > > > > > not exactly the way I want it to. It places an image into the first
    > > > > > > > > > > > paragraph for each "record" but that's not what I want.
    > > > > > > > > > > >
    > > > > > > > > > > > Dim str, i, spacepos, word
    > > > > > > > > > > > for wank = 1 to 7
    > > > > > > > > > > > if rsForums.EOF then exit for
    > > > > > > > > > > > if wank = 1 then
    > > > > > > > > > > > response.write "<img id='picFloat' src='testoboy.jpg'
    > > > > > > > > > > > class='picBorderThin'>"
    > > > > > > > > > > > End if
    > > > > > > > > > > > if wank = 2 then
    > > > > > > > > > > > response.write "<img id='picFloat' src='me.jpg'
    > > > > > > > > > > > class='picBorderThin'>"
    > > > > > > > > > > > End if
    > > > > > > > > > > > Response.Write "<p><span id='firstWords'>"
    > > > > > > > > > > > storyFix = replace(rsForums("T_MESSAGE"),vbcrlf & vbcrlf, "<p>")
    > > > > > > > > > > > story = replace(storyFix,"<p>", "</p>" & vbcrlf & "<p>")
    > > > > > > > > > > > for i = 1 to 4
    > > > > > > > > > > > spacepos = instr(story," " )
    > > > > > > > > > > > word = left(story,spacepos)
    > > > > > > > > > > > story = right(story,len(story)-spacepos)
    > > > > > > > > > > > response.write word
    > > > > > > > > > > > next
    > > > > > > > > > > >
    > > > > > > > > > > > Response.Write "</span>"
    > > > > > > > > > > > Response.Write story
    > > > > > > > > > > > Response.Write "</p>" & vbcrlf & vbcrlf & "<hr>"
    > > > > > > > > > > > rsForums.MoveNext
    > > > > > > > > > > > next
    > > > > > > > > > > > rsForums.Close
    > > > > > > > > > > > Set rsForums = nothing
    > > > > > > > > > >
    > > > > > > > > > > I wouldn't do this like this...
    > > > > > > > > > >
    > > > > > > > > > > At some stage, each story/article is entered into a database. It's at
    > > > > > > > > > > that point that I would manipulate it in the way you want. That way,
    > > > > > > > > > > the operation is only ever performed once for each story, rather than
    > > > > > > > > > > every time a page is requested.
    > > > > > > > > > >
    > > > > > > > > > > Anyhoo, you need to break the problem down in the opposite order in
    > > > > > > > > > > which you have. The first thing you need to do is to break the story
    > > > > > > > > > > into paragraphs. Whether on input or output, this can be done using
    > > > > > > > > > > split(). You also need to put you images into an array, so you can get
    > > > > > > > > > > them by index.
    > > > > > > > > > >
    > > > > > > > > > > Now that you have an array of paragraphs, and an array of images, it's
    > > > > > > > > > > easy to loop through from 0 to 6, prepending each paragraph with its
    > > > > > > > > > > associated image html. Within that loop, you can conduct the operation
    > > > > > > > > > > to style the first few words. You would create a string containing the
    > > > > > > > > > > first 7 paragraphs (adding <p> tags as needed). Then, if there are any
    > > > > > > > > > > paragraphs left, you would need to loop through those to style the
    > > > > > > > > > > first few words, and append them to your string. Then its ready for
    > > > > > > > > > > input/output.
    > > > > > > > > > >
    > > > > > > > > > > --
    > > > > > > > > > > Mike Brind
    > > > > > > > > > >
     
    the other john, Jul 22, 2006
    #14
  15. the other john

    Mike Brind Guest

    It's not going to work because you are not changing the paragraph on
    each loop. You change the variable from storyArray to story, but on
    the next iteration, it goes back to storyArray again. At that point,
    story is storyArray minus the first word, but when you enter the loop
    again, storyArray(0) is still the same value as when you started (ie,
    the whole paragraph with all words intact). Try replacing the example
    you posted earlier with the bit I just posted, See if that works.

    --
    Mike Brind



    the other john wrote:
    > for some reason now I'm getting this...odd...don't know why..
    >
    > Microsoft VBScript runtime error '800a0005'
    >
    > Invalid procedure call or argument: 'right'
    >
    > /paraTest.asp, line 36
    >
    >
    > "right" didn't cause a problem before. To be clear about what I was
    > trying to do I should have include the entire script. I'm trying to
    > tweek array items after getting the first 4 words formatted.
    >
    > Thanks for your help Mike, I'm so close now, this is awesome!!!
    >
    >
    >
    > myStory = rsForums("T_MESSAGE")
    >
    > para = vbcrlf & vbcrlf
    >
    > storyArray = Split(myStory, para)
    > for i = 1 to 4
    > spacepos = instr(storyArray(0)," " )
    > word = left(storyArray(0),spacepos)
    > story = right(storyArray(0),len(storyArray(0))-spacepos)
    > next
    >
    > storyArray(0) = "<span id='firstWords'>" & word & "</span>" & story
    >
    > storyArray(0) = "<img id='picFloat' src='testoboy.jpg'
    > class='picBorderThin'><p>" & storyArray(0) & "</p><blockquote>An
    > importand quote from the story here<blockquote>"
    >
    > storyArray(1) = storyArray(1) & "<img id='picFloat' src='me.jpg'
    > class='picBorderThin'>"
    >
    >
    > for each item in storyArray
    > Response.write "<p>" & item & "</p>" & vbcrlf
    > Next
    >
    >
    > Mike Brind wrote:
    > > myStory = rsForums("T_MESSAGE")
    > >
    > > paras = Split(myStory, vbcrlf & vbcrlf)
    > > para = paras(0)
    > > Response.Write "<span id='firstWords'>"
    > > for i = 1 to 4
    > > spacepos = instr(para," " )
    > > word = left(para,spacepos)
    > > Response.Write word
    > > para= right(para,len(story)-spacepos)
    > > next
    > >
    > > Response.Write "</span>" & para
    > >
    > > Each time the loop executes, it strips the first word from the
    > > paragraph after writing it to the browser within the <span> tags. The
    > > closing </span tag is written after the loop finishes, with the
    > > remainder of the paragraph after it.
    > >
    > > --
    > > Mike Brind
    > >
    > >
    > > the other john wrote:
    > > > Tried this and it only delivers one word and appears to exit the loop.
    > > > In other words it appears to stylize the first word rather than the
    > > > desired first 4. Any ideas?
    > > >
    > > > myStory = rsForums("T_MESSAGE")
    > > >
    > > > para = vbcrlf & vbcrlf
    > > >
    > > > storyArray = Split(myStory, para)
    > > >
    > > > for i = 1 to 4
    > > > spacepos = instr(storyArray(0)," " )
    > > > word = left(storyArray(0),spacepos)
    > > > story = right(storyArray(0),len(storyArray(0))-spacepos)
    > > > next
    > > >
    > > > storyArray(0) = "<span id='firstWords'>" & word & "</span>" & story
    > > >
    > > >
    > > >
    > > > Thanks again!!!
    > > >
    > > >
    > > > the other john wrote:
    > > > > Cool, this almost has it. But to make it even better is there a way
    > > > > other than the For Each loop that I can use to access "part" of the
    > > > > array? If I could just stylize specific parts of the array one way and
    > > > > the rest just be other, like an if else sort of thing that would put
    > > > > this thing to bed. The array works "great"....not I just need to
    > > > > figure out how to work with just "parts" of it. I'm thinking the For
    > > > > Each loop isn't going to work in this case since it's an all or nothing
    > > > > sort of thing. I haven't worked with arrays that much and don't know
    > > > > the possibilities.
    > > > >
    > > > > Thanks Mike! Learning a lot here!!
    > > > >
    > > > >
    > > > > Mike Brind wrote:
    > > > > > I'm no CSS expert, so you might be better off asking this in a style
    > > > > > sheet group. However, try putting the text in a <p> tag
    > > > > >
    > > > > > storyArray(0) = "<img id='picFloat' src='testoboy.jpg'
    > > > > > class='picBorderThin'><p>" & storyArray(0) & "</p>"
    > > > > >
    > > > > > --
    > > > > > Mike Brind
    > > > > >
    > > > > > the other john wrote:
    > > > > > > I tried this and it seemed to work except now I have a style issue. The
    > > > > > > problem is if the letter I want to be affected by p:first-letter isn't
    > > > > > > actually at the beginning of the item it won't work and if I want the
    > > > > > > first pic to appear at the top it has to be at the beginning of the
    > > > > > > item. Ideas?
    > > > > > >
    > > > > > > Thanks!!!
    > > > > > >
    > > > > > > <style>
    > > > > > > #picFloat {float:left;}
    > > > > > > p:first-letter {color: #8B0000; font-size:
    > > > > > > 40px;font-family:times;float:left;}
    > > > > > > #firstWords
    > > > > > > {text-transform:uppercase;font-family:times;font-size:120%;}
    > > > > > > </style>
    > > > > > > '
    > > > > > > '
    > > > > > > myStory = rsForums("T_MESSAGE")
    > > > > > >
    > > > > > > para = vbcrlf & vbcrlf
    > > > > > >
    > > > > > > storyArray = Split(myStory, para)
    > > > > > > storyArray(0) = "<img id='picFloat' src='testoboy.jpg'
    > > > > > > class='picBorderThin'>" & storyArray(0)
    > > > > > > storyArray(1) = storyArray(1) & "<img id='picFloat' src='me.jpg'
    > > > > > > class='picBorderThin'>"
    > > > > > >
    > > > > > > for each item in storyArray
    > > > > > > Response.write "<p>" & item & "</p>"
    > > > > > > Next
    > > > > > >
    > > > > > >
    > > > > > > Mike Brind wrote:
    > > > > > > > Nope.
    > > > > > > >
    > > > > > > > paras = split(mystring,vbcrlf & vbcrlf)
    > > > > > > >
    > > > > > > > This returns a one-dimensional zero-based array of paragraphs, so the
    > > > > > > > first paragraph will be held in the element referenced as paras(0), the
    > > > > > > > second in paras(1) etc.
    > > > > > > >
    > > > > > > > Response.Write Ubound(paras) + 1 will give you the total number of
    > > > > > > > paragraphs.
    > > > > > > >
    > > > > > > > --
    > > > > > > > Mike Brind
    > > > > > > >
    > > > > > > > the other john wrote:
    > > > > > > > > will split() take this?
    > > > > > > > >
    > > > > > > > > para = vbcrlf & vbcrlf
    > > > > > > > > Split(mystring, para)
    > > > > > > > >
    > > > > > > > >
    > > > > > > > > Mike Brind wrote:
    > > > > > > > > > Even more reason to perform the operation on input. When the customer
    > > > > > > > > > changes the brief to have more or less words stylized, I'll look
    > > > > > > > > > forward to presenting the budget cost of doing so on existing data :)
    > > > > > > > > >
    > > > > > > > > > --
    > > > > > > > > > Mike Brind
    > > > > > > > > >
    > > > > > > > > > Bob Lehmann wrote:
    > > > > > > > > > > > At some stage, each story/article is entered into a database. It's at
    > > > > > > > > > > > that point that I would manipulate it in the way you want. That way,
    > > > > > > > > > > > the operation is only ever performed once for each story,
    > > > > > > > > > >
    > > > > > > > > > > Good idea.....
    > > > > > > > > > >
    > > > > > > > > > > Until the customer decides that they want the first 5 words stylized.
    > > > > > > > > > >
    > > > > > > > > > > Bob Lehmann
    > > > > > > > > > >
    > > > > > > > > > >
    > > > > > > > > > > "Mike Brind" <> wrote in message
    > > > > > > > > > > news:...
    > > > > > > > > > > >
    > > > > > > > > > > > the other john wrote:
    > > > > > > > > > > > > I'm trying to enhance a script to do the following things.
    > > > > > > > > > > > >
    > > > > > > > > > > > > 1). detect the first four words of a paragraph and stylize them
    > > > > > > > > > > > > (already does that)
    > > > > > > > > > > > > 2). Capitalize and stylize the first letter of each paragraph (already
    > > > > > > > > > > > > does that via style sheet)
    > > > > > > > > > > > > 3). Count the number of paragraphs (or number of "vbcrlf & vbcrfl") so
    > > > > > > > > > > > > I can insert a images in specific places (i.e. I want to dynamically
    > > > > > > > > > > > > insert image 1 in paragraph 1, image 2 into para 2, etc.)
    > > > > > > > > > > > >
    > > > > > > > > > > > > This third item I can't figure out. I've tried it a few ways but keep
    > > > > > > > > > > > > running to problems.
    > > > > > > > > > > > >
    > > > > > > > > > > > > Thanks!!!
    > > > > > > > > > > > >
    > > > > > > > > > > > > The following script was provided by Mike Brind, thanks Mike. It
    > > > > > > > > > > > > currently can produce results for the first 2 items I listed above but
    > > > > > > > > > > > > not exactly the way I want it to. It places an image into the first
    > > > > > > > > > > > > paragraph for each "record" but that's not what I want.
    > > > > > > > > > > > >
    > > > > > > > > > > > > Dim str, i, spacepos, word
    > > > > > > > > > > > > for wank = 1 to 7
    > > > > > > > > > > > > if rsForums.EOF then exit for
    > > > > > > > > > > > > if wank = 1 then
    > > > > > > > > > > > > response.write "<img id='picFloat' src='testoboy.jpg'
    > > > > > > > > > > > > class='picBorderThin'>"
    > > > > > > > > > > > > End if
    > > > > > > > > > > > > if wank = 2 then
    > > > > > > > > > > > > response.write "<img id='picFloat' src='me.jpg'
    > > > > > > > > > > > > class='picBorderThin'>"
    > > > > > > > > > > > > End if
    > > > > > > > > > > > > Response.Write "<p><span id='firstWords'>"
    > > > > > > > > > > > > storyFix = replace(rsForums("T_MESSAGE"),vbcrlf & vbcrlf, "<p>")
    > > > > > > > > > > > > story = replace(storyFix,"<p>", "</p>" & vbcrlf & "<p>")
    > > > > > > > > > > > > for i = 1 to 4
    > > > > > > > > > > > > spacepos = instr(story," " )
    > > > > > > > > > > > > word = left(story,spacepos)
    > > > > > > > > > > > > story = right(story,len(story)-spacepos)
    > > > > > > > > > > > > response.write word
    > > > > > > > > > > > > next
    > > > > > > > > > > > >
    > > > > > > > > > > > > Response.Write "</span>"
    > > > > > > > > > > > > Response.Write story
    > > > > > > > > > > > > Response.Write "</p>" & vbcrlf & vbcrlf & "<hr>"
    > > > > > > > > > > > > rsForums.MoveNext
    > > > > > > > > > > > > next
    > > > > > > > > > > > > rsForums.Close
    > > > > > > > > > > > > Set rsForums = nothing
    > > > > > > > > > > >
    > > > > > > > > > > > I wouldn't do this like this...
    > > > > > > > > > > >
    > > > > > > > > > > > At some stage, each story/article is entered into a database. It's at
    > > > > > > > > > > > that point that I would manipulate it in the way you want. That way,
    > > > > > > > > > > > the operation is only ever performed once for each story, rather than
    > > > > > > > > > > > every time a page is requested.
    > > > > > > > > > > >
    > > > > > > > > > > > Anyhoo, you need to break the problem down in the opposite order in
    > > > > > > > > > > > which you have. The first thing you need to do is to break the story
    > > > > > > > > > > > into paragraphs. Whether on input or output, this can be done using
    > > > > > > > > > > > split(). You also need to put you images into an array, so you can get
    > > > > > > > > > > > them by index.
    > > > > > > > > > > >
    > > > > > > > > > > > Now that you have an array of paragraphs, and an array of images, it's
    > > > > > > > > > > > easy to loop through from 0 to 6, prepending each paragraph with its
    > > > > > > > > > > > associated image html. Within that loop, you can conduct the operation
    > > > > > > > > > > > to style the first few words. You would create a string containing the
    > > > > > > > > > > > first 7 paragraphs (adding <p> tags as needed). Then, if there are any
    > > > > > > > > > > > paragraphs left, you would need to loop through those to style the
    > > > > > > > > > > > first few words, and append them to your string. Then its ready for
    > > > > > > > > > > > input/output.
    > > > > > > > > > > >
    > > > > > > > > > > > --
    > > > > > > > > > > > Mike Brind
    > > > > > > > > > > >
     
    Mike Brind, Jul 22, 2006
    #15
  16. I'm still getting this error. I'm running the script exactly as you
    wrote it. What am I missing?


    Microsoft VBScript runtime error '800a0005'

    Invalid procedure call or argument: 'right'

    /paraTest.asp, line 40

    Mike Brind wrote:
    > It's not going to work because you are not changing the paragraph on
    > each loop. You change the variable from storyArray to story, but on
    > the next iteration, it goes back to storyArray again. At that point,
    > story is storyArray minus the first word, but when you enter the loop
    > again, storyArray(0) is still the same value as when you started (ie,
    > the whole paragraph with all words intact). Try replacing the example
    > you posted earlier with the bit I just posted, See if that works.
    >
    > --
    > Mike Brind
    >
    >
    >
    > the other john wrote:
    > > for some reason now I'm getting this...odd...don't know why..
    > >
    > > Microsoft VBScript runtime error '800a0005'
    > >
    > > Invalid procedure call or argument: 'right'
    > >
    > > /paraTest.asp, line 36
    > >
    > >
    > > "right" didn't cause a problem before. To be clear about what I was
    > > trying to do I should have include the entire script. I'm trying to
    > > tweek array items after getting the first 4 words formatted.
    > >
    > > Thanks for your help Mike, I'm so close now, this is awesome!!!
    > >
    > >
    > >
    > > myStory = rsForums("T_MESSAGE")
    > >
    > > para = vbcrlf & vbcrlf
    > >
    > > storyArray = Split(myStory, para)
    > > for i = 1 to 4
    > > spacepos = instr(storyArray(0)," " )
    > > word = left(storyArray(0),spacepos)
    > > story = right(storyArray(0),len(storyArray(0))-spacepos)
    > > next
    > >
    > > storyArray(0) = "<span id='firstWords'>" & word & "</span>" & story
    > >
    > > storyArray(0) = "<img id='picFloat' src='testoboy.jpg'
    > > class='picBorderThin'><p>" & storyArray(0) & "</p><blockquote>An
    > > importand quote from the story here<blockquote>"
    > >
    > > storyArray(1) = storyArray(1) & "<img id='picFloat' src='me.jpg'
    > > class='picBorderThin'>"
    > >
    > >
    > > for each item in storyArray
    > > Response.write "<p>" & item & "</p>" & vbcrlf
    > > Next
    > >
    > >
    > > Mike Brind wrote:
    > > > myStory = rsForums("T_MESSAGE")
    > > >
    > > > paras = Split(myStory, vbcrlf & vbcrlf)
    > > > para = paras(0)
    > > > Response.Write "<span id='firstWords'>"
    > > > for i = 1 to 4
    > > > spacepos = instr(para," " )
    > > > word = left(para,spacepos)
    > > > Response.Write word
    > > > para= right(para,len(story)-spacepos)
    > > > next
    > > >
    > > > Response.Write "</span>" & para
    > > >
    > > > Each time the loop executes, it strips the first word from the
    > > > paragraph after writing it to the browser within the <span> tags. The
    > > > closing </span tag is written after the loop finishes, with the
    > > > remainder of the paragraph after it.
    > > >
    > > > --
    > > > Mike Brind
    > > >
    > > >
    > > > the other john wrote:
    > > > > Tried this and it only delivers one word and appears to exit the loop.
    > > > > In other words it appears to stylize the first word rather than the
    > > > > desired first 4. Any ideas?
    > > > >
    > > > > myStory = rsForums("T_MESSAGE")
    > > > >
    > > > > para = vbcrlf & vbcrlf
    > > > >
    > > > > storyArray = Split(myStory, para)
    > > > >
    > > > > for i = 1 to 4
    > > > > spacepos = instr(storyArray(0)," " )
    > > > > word = left(storyArray(0),spacepos)
    > > > > story = right(storyArray(0),len(storyArray(0))-spacepos)
    > > > > next
    > > > >
    > > > > storyArray(0) = "<span id='firstWords'>" & word & "</span>" & story
    > > > >
    > > > >
    > > > >
    > > > > Thanks again!!!
    > > > >
    > > > >
    > > > > the other john wrote:
    > > > > > Cool, this almost has it. But to make it even better is there a way
    > > > > > other than the For Each loop that I can use to access "part" of the
    > > > > > array? If I could just stylize specific parts of the array one way and
    > > > > > the rest just be other, like an if else sort of thing that would put
    > > > > > this thing to bed. The array works "great"....not I just need to
    > > > > > figure out how to work with just "parts" of it. I'm thinking the For
    > > > > > Each loop isn't going to work in this case since it's an all or nothing
    > > > > > sort of thing. I haven't worked with arrays that much and don't know
    > > > > > the possibilities.
    > > > > >
    > > > > > Thanks Mike! Learning a lot here!!
    > > > > >
    > > > > >
    > > > > > Mike Brind wrote:
    > > > > > > I'm no CSS expert, so you might be better off asking this in a style
    > > > > > > sheet group. However, try putting the text in a <p> tag
    > > > > > >
    > > > > > > storyArray(0) = "<img id='picFloat' src='testoboy.jpg'
    > > > > > > class='picBorderThin'><p>" & storyArray(0) & "</p>"
    > > > > > >
    > > > > > > --
    > > > > > > Mike Brind
    > > > > > >
    > > > > > > the other john wrote:
    > > > > > > > I tried this and it seemed to work except now I have a style issue. The
    > > > > > > > problem is if the letter I want to be affected by p:first-letter isn't
    > > > > > > > actually at the beginning of the item it won't work and if I want the
    > > > > > > > first pic to appear at the top it has to be at the beginning of the
    > > > > > > > item. Ideas?
    > > > > > > >
    > > > > > > > Thanks!!!
    > > > > > > >
    > > > > > > > <style>
    > > > > > > > #picFloat {float:left;}
    > > > > > > > p:first-letter {color: #8B0000; font-size:
    > > > > > > > 40px;font-family:times;float:left;}
    > > > > > > > #firstWords
    > > > > > > > {text-transform:uppercase;font-family:times;font-size:120%;}
    > > > > > > > </style>
    > > > > > > > '
    > > > > > > > '
    > > > > > > > myStory = rsForums("T_MESSAGE")
    > > > > > > >
    > > > > > > > para = vbcrlf & vbcrlf
    > > > > > > >
    > > > > > > > storyArray = Split(myStory, para)
    > > > > > > > storyArray(0) = "<img id='picFloat' src='testoboy.jpg'
    > > > > > > > class='picBorderThin'>" & storyArray(0)
    > > > > > > > storyArray(1) = storyArray(1) & "<img id='picFloat' src='me.jpg'
    > > > > > > > class='picBorderThin'>"
    > > > > > > >
    > > > > > > > for each item in storyArray
    > > > > > > > Response.write "<p>" & item & "</p>"
    > > > > > > > Next
    > > > > > > >
    > > > > > > >
    > > > > > > > Mike Brind wrote:
    > > > > > > > > Nope.
    > > > > > > > >
    > > > > > > > > paras = split(mystring,vbcrlf & vbcrlf)
    > > > > > > > >
    > > > > > > > > This returns a one-dimensional zero-based array of paragraphs, so the
    > > > > > > > > first paragraph will be held in the element referenced as paras(0), the
    > > > > > > > > second in paras(1) etc.
    > > > > > > > >
    > > > > > > > > Response.Write Ubound(paras) + 1 will give you the total number of
    > > > > > > > > paragraphs.
    > > > > > > > >
    > > > > > > > > --
    > > > > > > > > Mike Brind
    > > > > > > > >
    > > > > > > > > the other john wrote:
    > > > > > > > > > will split() take this?
    > > > > > > > > >
    > > > > > > > > > para = vbcrlf & vbcrlf
    > > > > > > > > > Split(mystring, para)
    > > > > > > > > >
    > > > > > > > > >
    > > > > > > > > > Mike Brind wrote:
    > > > > > > > > > > Even more reason to perform the operation on input. When the customer
    > > > > > > > > > > changes the brief to have more or less words stylized, I'll look
    > > > > > > > > > > forward to presenting the budget cost of doing so on existing data :)
    > > > > > > > > > >
    > > > > > > > > > > --
    > > > > > > > > > > Mike Brind
    > > > > > > > > > >
    > > > > > > > > > > Bob Lehmann wrote:
    > > > > > > > > > > > > At some stage, each story/article is entered into a database. It's at
    > > > > > > > > > > > > that point that I would manipulate it in the way you want. That way,
    > > > > > > > > > > > > the operation is only ever performed once for each story,
    > > > > > > > > > > >
    > > > > > > > > > > > Good idea.....
    > > > > > > > > > > >
    > > > > > > > > > > > Until the customer decides that they want the first 5 words stylized.
    > > > > > > > > > > >
    > > > > > > > > > > > Bob Lehmann
    > > > > > > > > > > >
    > > > > > > > > > > >
    > > > > > > > > > > > "Mike Brind" <> wrote in message
    > > > > > > > > > > > news:...
    > > > > > > > > > > > >
    > > > > > > > > > > > > the other john wrote:
    > > > > > > > > > > > > > I'm trying to enhance a script to do the following things.
    > > > > > > > > > > > > >
    > > > > > > > > > > > > > 1). detect the first four words of a paragraph and stylize them
    > > > > > > > > > > > > > (already does that)
    > > > > > > > > > > > > > 2). Capitalize and stylize the first letter of each paragraph (already
    > > > > > > > > > > > > > does that via style sheet)
    > > > > > > > > > > > > > 3). Count the number of paragraphs (or number of "vbcrlf & vbcrfl") so
    > > > > > > > > > > > > > I can insert a images in specific places (i.e. I want to dynamically
    > > > > > > > > > > > > > insert image 1 in paragraph 1, image 2 into para 2, etc.)
    > > > > > > > > > > > > >
    > > > > > > > > > > > > > This third item I can't figure out. I've tried it a few ways but keep
    > > > > > > > > > > > > > running to problems.
    > > > > > > > > > > > > >
    > > > > > > > > > > > > > Thanks!!!
    > > > > > > > > > > > > >
    > > > > > > > > > > > > > The following script was provided by Mike Brind, thanks Mike. It
    > > > > > > > > > > > > > currently can produce results for the first 2 items I listed above but
    > > > > > > > > > > > > > not exactly the way I want it to. It places an image into the first
    > > > > > > > > > > > > > paragraph for each "record" but that's not what I want.
    > > > > > > > > > > > > >
    > > > > > > > > > > > > > Dim str, i, spacepos, word
    > > > > > > > > > > > > > for wank = 1 to 7
    > > > > > > > > > > > > > if rsForums.EOF then exit for
    > > > > > > > > > > > > > if wank = 1 then
    > > > > > > > > > > > > > response.write "<img id='picFloat' src='testoboy.jpg'
    > > > > > > > > > > > > > class='picBorderThin'>"
    > > > > > > > > > > > > > End if
    > > > > > > > > > > > > > if wank = 2 then
    > > > > > > > > > > > > > response.write "<img id='picFloat' src='me.jpg'
    > > > > > > > > > > > > > class='picBorderThin'>"
    > > > > > > > > > > > > > End if
    > > > > > > > > > > > > > Response.Write "<p><span id='firstWords'>"
    > > > > > > > > > > > > > storyFix = replace(rsForums("T_MESSAGE"),vbcrlf & vbcrlf, "<p>")
    > > > > > > > > > > > > > story = replace(storyFix,"<p>", "</p>" & vbcrlf & "<p>")
    > > > > > > > > > > > > > for i = 1 to 4
    > > > > > > > > > > > > > spacepos = instr(story," " )
    > > > > > > > > > > > > > word = left(story,spacepos)
    > > > > > > > > > > > > > story = right(story,len(story)-spacepos)
    > > > > > > > > > > > > > response.write word
    > > > > > > > > > > > > > next
    > > > > > > > > > > > > >
    > > > > > > > > > > > > > Response.Write "</span>"
    > > > > > > > > > > > > > Response.Write story
    > > > > > > > > > > > > > Response.Write "</p>" & vbcrlf & vbcrlf & "<hr>"
    > > > > > > > > > > > > > rsForums.MoveNext
    > > > > > > > > > > > > > next
    > > > > > > > > > > > > > rsForums.Close
    > > > > > > > > > > > > > Set rsForums = nothing
    > > > > > > > > > > > >
    > > > > > > > > > > > > I wouldn't do this like this...
    > > > > > > > > > > > >
    > > > > > > > > > > > > At some stage, each story/article is entered into a database. It's at
    > > > > > > > > > > > > that point that I would manipulate it in the way you want. That way,
    > > > > > > > > > > > > the operation is only ever performed once for each story, rather than
    > > > > > > > > > > > > every time a page is requested.
    > > > > > > > > > > > >
    > > > > > > > > > > > > Anyhoo, you need to break the problem down in the opposite order in
    > > > > > > > > > > > > which you have. The first thing you need to do is to break the story
    > > > > > > > > > > > > into paragraphs. Whether on input or output, this can be done using
    > > > > > > > > > > > > split(). You also need to put you images into an array, so you can get
    > > > > > > > > > > > > them by index.
    > > > > > > > > > > > >
    > > > > > > > > > > > > Now that you have an array of paragraphs, and an array of images, it's
    > > > > > > > > > > > > easy to loop through from 0 to 6, prepending each paragraph with its
    > > > > > > > > > > > > associated image html. Within that loop, you can conduct the operation
    > > > > > > > > > > > > to style the first few words. You would create a string containing the
    > > > > > > > > > > > > first 7 paragraphs (adding <p> tags as needed). Then, if there are any
    > > > > > > > > > > > > paragraphs left, you would need to loop through those to style the
    > > > > > > > > > > > > first few words, and append them to your string. Then its ready for
    > > > > > > > > > > > > input/output.
    > > > > > > > > > > > >
    > > > > > > > > > > > > --
    > > > > > > > > > > > > Mike Brind
    > > > > > > > > > > > >
     
    the other john, Jul 22, 2006
    #16
  17. oh, I see the problem now. there was still a "story" in there that
    needed to be changed to "para". Ok, this worked...but how to I print
    the rest of the array? Is there a way to use a for each loop and
    skipping the first array item?


    the other john wrote:
    > I'm still getting this error. I'm running the script exactly as you
    > wrote it. What am I missing?
    >
    >
    > Microsoft VBScript runtime error '800a0005'
    >
    > Invalid procedure call or argument: 'right'
    >
    > /paraTest.asp, line 40
    >
    > Mike Brind wrote:
    > > It's not going to work because you are not changing the paragraph on
    > > each loop. You change the variable from storyArray to story, but on
    > > the next iteration, it goes back to storyArray again. At that point,
    > > story is storyArray minus the first word, but when you enter the loop
    > > again, storyArray(0) is still the same value as when you started (ie,
    > > the whole paragraph with all words intact). Try replacing the example
    > > you posted earlier with the bit I just posted, See if that works.
    > >
    > > --
    > > Mike Brind
    > >
    > >
    > >
    > > the other john wrote:
    > > > for some reason now I'm getting this...odd...don't know why..
    > > >
    > > > Microsoft VBScript runtime error '800a0005'
    > > >
    > > > Invalid procedure call or argument: 'right'
    > > >
    > > > /paraTest.asp, line 36
    > > >
    > > >
    > > > "right" didn't cause a problem before. To be clear about what I was
    > > > trying to do I should have include the entire script. I'm trying to
    > > > tweek array items after getting the first 4 words formatted.
    > > >
    > > > Thanks for your help Mike, I'm so close now, this is awesome!!!
    > > >
    > > >
    > > >
    > > > myStory = rsForums("T_MESSAGE")
    > > >
    > > > para = vbcrlf & vbcrlf
    > > >
    > > > storyArray = Split(myStory, para)
    > > > for i = 1 to 4
    > > > spacepos = instr(storyArray(0)," " )
    > > > word = left(storyArray(0),spacepos)
    > > > story = right(storyArray(0),len(storyArray(0))-spacepos)
    > > > next
    > > >
    > > > storyArray(0) = "<span id='firstWords'>" & word & "</span>" & story
    > > >
    > > > storyArray(0) = "<img id='picFloat' src='testoboy.jpg'
    > > > class='picBorderThin'><p>" & storyArray(0) & "</p><blockquote>An
    > > > importand quote from the story here<blockquote>"
    > > >
    > > > storyArray(1) = storyArray(1) & "<img id='picFloat' src='me.jpg'
    > > > class='picBorderThin'>"
    > > >
    > > >
    > > > for each item in storyArray
    > > > Response.write "<p>" & item & "</p>" & vbcrlf
    > > > Next
    > > >
    > > >
    > > > Mike Brind wrote:
    > > > > myStory = rsForums("T_MESSAGE")
    > > > >
    > > > > paras = Split(myStory, vbcrlf & vbcrlf)
    > > > > para = paras(0)
    > > > > Response.Write "<span id='firstWords'>"
    > > > > for i = 1 to 4
    > > > > spacepos = instr(para," " )
    > > > > word = left(para,spacepos)
    > > > > Response.Write word
    > > > > para= right(para,len(story)-spacepos)
    > > > > next
    > > > >
    > > > > Response.Write "</span>" & para
    > > > >
    > > > > Each time the loop executes, it strips the first word from the
    > > > > paragraph after writing it to the browser within the <span> tags. The
    > > > > closing </span tag is written after the loop finishes, with the
    > > > > remainder of the paragraph after it.
    > > > >
    > > > > --
    > > > > Mike Brind
    > > > >
    > > > >
    > > > > the other john wrote:
    > > > > > Tried this and it only delivers one word and appears to exit the loop.
    > > > > > In other words it appears to stylize the first word rather than the
    > > > > > desired first 4. Any ideas?
    > > > > >
    > > > > > myStory = rsForums("T_MESSAGE")
    > > > > >
    > > > > > para = vbcrlf & vbcrlf
    > > > > >
    > > > > > storyArray = Split(myStory, para)
    > > > > >
    > > > > > for i = 1 to 4
    > > > > > spacepos = instr(storyArray(0)," " )
    > > > > > word = left(storyArray(0),spacepos)
    > > > > > story = right(storyArray(0),len(storyArray(0))-spacepos)
    > > > > > next
    > > > > >
    > > > > > storyArray(0) = "<span id='firstWords'>" & word & "</span>" & story
    > > > > >
    > > > > >
    > > > > >
    > > > > > Thanks again!!!
    > > > > >
    > > > > >
    > > > > > the other john wrote:
    > > > > > > Cool, this almost has it. But to make it even better is there a way
    > > > > > > other than the For Each loop that I can use to access "part" of the
    > > > > > > array? If I could just stylize specific parts of the array one way and
    > > > > > > the rest just be other, like an if else sort of thing that would put
    > > > > > > this thing to bed. The array works "great"....not I just need to
    > > > > > > figure out how to work with just "parts" of it. I'm thinking the For
    > > > > > > Each loop isn't going to work in this case since it's an all or nothing
    > > > > > > sort of thing. I haven't worked with arrays that much and don't know
    > > > > > > the possibilities.
    > > > > > >
    > > > > > > Thanks Mike! Learning a lot here!!
    > > > > > >
    > > > > > >
    > > > > > > Mike Brind wrote:
    > > > > > > > I'm no CSS expert, so you might be better off asking this in a style
    > > > > > > > sheet group. However, try putting the text in a <p> tag
    > > > > > > >
    > > > > > > > storyArray(0) = "<img id='picFloat' src='testoboy.jpg'
    > > > > > > > class='picBorderThin'><p>" & storyArray(0) & "</p>"
    > > > > > > >
    > > > > > > > --
    > > > > > > > Mike Brind
    > > > > > > >
    > > > > > > > the other john wrote:
    > > > > > > > > I tried this and it seemed to work except now I have a style issue. The
    > > > > > > > > problem is if the letter I want to be affected by p:first-letter isn't
    > > > > > > > > actually at the beginning of the item it won't work and if I want the
    > > > > > > > > first pic to appear at the top it has to be at the beginning of the
    > > > > > > > > item. Ideas?
    > > > > > > > >
    > > > > > > > > Thanks!!!
    > > > > > > > >
    > > > > > > > > <style>
    > > > > > > > > #picFloat {float:left;}
    > > > > > > > > p:first-letter {color: #8B0000; font-size:
    > > > > > > > > 40px;font-family:times;float:left;}
    > > > > > > > > #firstWords
    > > > > > > > > {text-transform:uppercase;font-family:times;font-size:120%;}
    > > > > > > > > </style>
    > > > > > > > > '
    > > > > > > > > '
    > > > > > > > > myStory = rsForums("T_MESSAGE")
    > > > > > > > >
    > > > > > > > > para = vbcrlf & vbcrlf
    > > > > > > > >
    > > > > > > > > storyArray = Split(myStory, para)
    > > > > > > > > storyArray(0) = "<img id='picFloat' src='testoboy.jpg'
    > > > > > > > > class='picBorderThin'>" & storyArray(0)
    > > > > > > > > storyArray(1) = storyArray(1) & "<img id='picFloat' src='me.jpg'
    > > > > > > > > class='picBorderThin'>"
    > > > > > > > >
    > > > > > > > > for each item in storyArray
    > > > > > > > > Response.write "<p>" & item & "</p>"
    > > > > > > > > Next
    > > > > > > > >
    > > > > > > > >
    > > > > > > > > Mike Brind wrote:
    > > > > > > > > > Nope.
    > > > > > > > > >
    > > > > > > > > > paras = split(mystring,vbcrlf & vbcrlf)
    > > > > > > > > >
    > > > > > > > > > This returns a one-dimensional zero-based array of paragraphs, so the
    > > > > > > > > > first paragraph will be held in the element referenced as paras(0), the
    > > > > > > > > > second in paras(1) etc.
    > > > > > > > > >
    > > > > > > > > > Response.Write Ubound(paras) + 1 will give you the total number of
    > > > > > > > > > paragraphs.
    > > > > > > > > >
    > > > > > > > > > --
    > > > > > > > > > Mike Brind
    > > > > > > > > >
    > > > > > > > > > the other john wrote:
    > > > > > > > > > > will split() take this?
    > > > > > > > > > >
    > > > > > > > > > > para = vbcrlf & vbcrlf
    > > > > > > > > > > Split(mystring, para)
    > > > > > > > > > >
    > > > > > > > > > >
    > > > > > > > > > > Mike Brind wrote:
    > > > > > > > > > > > Even more reason to perform the operation on input. When the customer
    > > > > > > > > > > > changes the brief to have more or less words stylized, I'll look
    > > > > > > > > > > > forward to presenting the budget cost of doing so on existing data :)
    > > > > > > > > > > >
    > > > > > > > > > > > --
    > > > > > > > > > > > Mike Brind
    > > > > > > > > > > >
    > > > > > > > > > > > Bob Lehmann wrote:
    > > > > > > > > > > > > > At some stage, each story/article is entered into a database. It's at
    > > > > > > > > > > > > > that point that I would manipulate it in the way you want. That way,
    > > > > > > > > > > > > > the operation is only ever performed once for each story,
    > > > > > > > > > > > >
    > > > > > > > > > > > > Good idea.....
    > > > > > > > > > > > >
    > > > > > > > > > > > > Until the customer decides that they want the first 5 words stylized.
    > > > > > > > > > > > >
    > > > > > > > > > > > > Bob Lehmann
    > > > > > > > > > > > >
    > > > > > > > > > > > >
    > > > > > > > > > > > > "Mike Brind" <> wrote in message
    > > > > > > > > > > > > news:...
    > > > > > > > > > > > > >
    > > > > > > > > > > > > > the other john wrote:
    > > > > > > > > > > > > > > I'm trying to enhance a script to do the following things.
    > > > > > > > > > > > > > >
    > > > > > > > > > > > > > > 1). detect the first four words of a paragraph and stylize them
    > > > > > > > > > > > > > > (already does that)
    > > > > > > > > > > > > > > 2). Capitalize and stylize the first letter of each paragraph (already
    > > > > > > > > > > > > > > does that via style sheet)
    > > > > > > > > > > > > > > 3). Count the number of paragraphs (or number of "vbcrlf & vbcrfl") so
    > > > > > > > > > > > > > > I can insert a images in specific places (i.e. I want to dynamically
    > > > > > > > > > > > > > > insert image 1 in paragraph 1, image 2 into para 2, etc.)
    > > > > > > > > > > > > > >
    > > > > > > > > > > > > > > This third item I can't figure out. I've tried it a few ways but keep
    > > > > > > > > > > > > > > running to problems.
    > > > > > > > > > > > > > >
    > > > > > > > > > > > > > > Thanks!!!
    > > > > > > > > > > > > > >
    > > > > > > > > > > > > > > The following script was provided by Mike Brind, thanks Mike. It
    > > > > > > > > > > > > > > currently can produce results for the first 2 items I listed above but
    > > > > > > > > > > > > > > not exactly the way I want it to. It places an image into the first
    > > > > > > > > > > > > > > paragraph for each "record" but that's not what I want.
    > > > > > > > > > > > > > >
    > > > > > > > > > > > > > > Dim str, i, spacepos, word
    > > > > > > > > > > > > > > for wank = 1 to 7
    > > > > > > > > > > > > > > if rsForums.EOF then exit for
    > > > > > > > > > > > > > > if wank = 1 then
    > > > > > > > > > > > > > > response.write "<img id='picFloat' src='testoboy.jpg'
    > > > > > > > > > > > > > > class='picBorderThin'>"
    > > > > > > > > > > > > > > End if
    > > > > > > > > > > > > > > if wank = 2 then
    > > > > > > > > > > > > > > response.write "<img id='picFloat' src='me.jpg'
    > > > > > > > > > > > > > > class='picBorderThin'>"
    > > > > > > > > > > > > > > End if
    > > > > > > > > > > > > > > Response.Write "<p><span id='firstWords'>"
    > > > > > > > > > > > > > > storyFix = replace(rsForums("T_MESSAGE"),vbcrlf & vbcrlf, "<p>")
    > > > > > > > > > > > > > > story = replace(storyFix,"<p>", "</p>" & vbcrlf & "<p>")
    > > > > > > > > > > > > > > for i = 1 to 4
    > > > > > > > > > > > > > > spacepos = instr(story," " )
    > > > > > > > > > > > > > > word = left(story,spacepos)
    > > > > > > > > > > > > > > story = right(story,len(story)-spacepos)
    > > > > > > > > > > > > > > response.write word
    > > > > > > > > > > > > > > next
    > > > > > > > > > > > > > >
    > > > > > > > > > > > > > > Response.Write "</span>"
    > > > > > > > > > > > > > > Response.Write story
    > > > > > > > > > > > > > > Response.Write "</p>" & vbcrlf & vbcrlf & "<hr>"
    > > > > > > > > > > > > > > rsForums.MoveNext
    > > > > > > > > > > > > > > next
    > > > > > > > > > > > > > > rsForums.Close
    > > > > > > > > > > > > > > Set rsForums = nothing
    > > > > > > > > > > > > >
    > > > > > > > > > > > > > I wouldn't do this like this...
    > > > > > > > > > > > > >
    > > > > > > > > > > > > > At some stage, each story/article is entered into a database. It's at
    > > > > > > > > > > > > > that point that I would manipulate it in the way you want. That way,
    > > > > > > > > > > > > > the operation is only ever performed once for each story, rather than
    > > > > > > > > > > > > > every time a page is requested.
    > > > > > > > > > > > > >
    > > > > > > > > > > > > > Anyhoo, you need to break the problem down in the opposite order in
    > > > > > > > > > > > > > which you have. The first thing you need to do is to break the story
    > > > > > > > > > > > > > into paragraphs. Whether on input or output, this can be done using
    > > > > > > > > > > > > > split(). You also need to put you images into an array, so you can get
    > > > > > > > > > > > > > them by index.
    > > > > > > > > > > > > >
    > > > > > > > > > > > > > Now that you have an array of paragraphs, and an array of images, it's
    > > > > > > > > > > > > > easy to loop through from 0 to 6, prepending each paragraph with its
    > > > > > > > > > > > > > associated image html. Within that loop, you can conduct the operation
    > > > > > > > > > > > > > to style the first few words. You would create a string containing the
    > > > > > > > > > > > > > first 7 paragraphs (adding <p> tags as needed). Then, if there are any
    > > > > > > > > > > > > > paragraphs left, you would need to loop through those to style the
    > > > > > > > > > > > > > first few words, and append them to your string. Then its ready for
    > > > > > > > > > > > > > input/output.
    > > > > > > > > > > > > >
    > > > > > > > > > > > > > --
    > > > > > > > > > > > > > Mike Brind
    > > > > > > > > > > > > >
     
    the other john, Jul 23, 2006
    #17
  18. the other john

    Mike Brind Guest

    I answered that in my first reply.

    --
    Mike Brind


    the other john wrote:
    > oh, I see the problem now. there was still a "story" in there that
    > needed to be changed to "para". Ok, this worked...but how to I print
    > the rest of the array? Is there a way to use a for each loop and
    > skipping the first array item?
    >
    >


    <snip>


    > > > > > > > > > > > > > >
    > > > > > > > > > > > > > > I wouldn't do this like this...
    > > > > > > > > > > > > > >
    > > > > > > > > > > > > > > At some stage, each story/article is entered into a database. It's at
    > > > > > > > > > > > > > > that point that I would manipulate it in the way you want. That way,
    > > > > > > > > > > > > > > the operation is only ever performed once for each story, rather than
    > > > > > > > > > > > > > > every time a page is requested.
    > > > > > > > > > > > > > >
    > > > > > > > > > > > > > > Anyhoo, you need to break the problem down in the opposite order in
    > > > > > > > > > > > > > > which you have. The first thing you need to do is to break the story
    > > > > > > > > > > > > > > into paragraphs. Whether on input or output, this can be done using
    > > > > > > > > > > > > > > split(). You also need to put you images into an array, so you can get
    > > > > > > > > > > > > > > them by index.
    > > > > > > > > > > > > > >
    > > > > > > > > > > > > > > Now that you have an array of paragraphs, and an array of images, it's
    > > > > > > > > > > > > > > easy to loop through from 0 to 6, prepending each paragraph with its
    > > > > > > > > > > > > > > associated image html. Within that loop, you can conduct the operation
    > > > > > > > > > > > > > > to style the first few words. You would create a string containing the
    > > > > > > > > > > > > > > first 7 paragraphs (adding <p> tags as needed). Then, if there are any
    > > > > > > > > > > > > > > paragraphs left, you would need to loop through those to style the
    > > > > > > > > > > > > > > first few words, and append them to your string. Then its ready for
    > > > > > > > > > > > > > > input/output.
    > > > > > > > > > > > > > >
    > > > > > > > > > > > > > > --
    > > > > > > > > > > > > > > Mike Brind
    > > > > > > > > > > > > > >
     
    Mike Brind, Jul 24, 2006
    #18
  19. what's confusing me is how get the paragraph that's stylizing the first
    4 words into a variable instead of writing it to the page.
    Response.write appears to be whats allowing the loop to go on to the
    next word. How do I "not" write to the page and put into a variable
    instead so I can prepend it further?

    I don't know how I got this far without having a better handle on
    control structures, yikes. For example, is it possible to use
    conditionals inside of a For Each loop?

    For each item in thisArray
    If item = whatever then
    do this
    Else
    do somethinge else
    End if
    Next

    I tried this and it didn't work so I assume answer is no but thought
    I'd ask just the same.

    Thanks!!!!


    the other john wrote:
    > oh, I see the problem now. there was still a "story" in there that
    > needed to be changed to "para". Ok, this worked...but how to I print
    > the rest of the array? Is there a way to use a for each loop and
    > skipping the first array item?
    >
    >
    > the other john wrote:
    > > I'm still getting this error. I'm running the script exactly as you
    > > wrote it. What am I missing?
    > >
    > >
    > > Microsoft VBScript runtime error '800a0005'
    > >
    > > Invalid procedure call or argument: 'right'
    > >
    > > /paraTest.asp, line 40
    > >
    > > Mike Brind wrote:
    > > > It's not going to work because you are not changing the paragraph on
    > > > each loop. You change the variable from storyArray to story, but on
    > > > the next iteration, it goes back to storyArray again. At that point,
    > > > story is storyArray minus the first word, but when you enter the loop
    > > > again, storyArray(0) is still the same value as when you started (ie,
    > > > the whole paragraph with all words intact). Try replacing the example
    > > > you posted earlier with the bit I just posted, See if that works.
    > > >
    > > > --
    > > > Mike Brind
    > > >
    > > >
    > > >
    > > > the other john wrote:
    > > > > for some reason now I'm getting this...odd...don't know why..
    > > > >
    > > > > Microsoft VBScript runtime error '800a0005'
    > > > >
    > > > > Invalid procedure call or argument: 'right'
    > > > >
    > > > > /paraTest.asp, line 36
    > > > >
    > > > >
    > > > > "right" didn't cause a problem before. To be clear about what I was
    > > > > trying to do I should have include the entire script. I'm trying to
    > > > > tweek array items after getting the first 4 words formatted.
    > > > >
    > > > > Thanks for your help Mike, I'm so close now, this is awesome!!!
    > > > >
    > > > >
    > > > >
    > > > > myStory = rsForums("T_MESSAGE")
    > > > >
    > > > > para = vbcrlf & vbcrlf
    > > > >
    > > > > storyArray = Split(myStory, para)
    > > > > for i = 1 to 4
    > > > > spacepos = instr(storyArray(0)," " )
    > > > > word = left(storyArray(0),spacepos)
    > > > > story = right(storyArray(0),len(storyArray(0))-spacepos)
    > > > > next
    > > > >
    > > > > storyArray(0) = "<span id='firstWords'>" & word & "</span>" & story
    > > > >
    > > > > storyArray(0) = "<img id='picFloat' src='testoboy.jpg'
    > > > > class='picBorderThin'><p>" & storyArray(0) & "</p><blockquote>An
    > > > > importand quote from the story here<blockquote>"
    > > > >
    > > > > storyArray(1) = storyArray(1) & "<img id='picFloat' src='me.jpg'
    > > > > class='picBorderThin'>"
    > > > >
    > > > >
    > > > > for each item in storyArray
    > > > > Response.write "<p>" & item & "</p>" & vbcrlf
    > > > > Next
    > > > >
    > > > >
    > > > > Mike Brind wrote:
    > > > > > myStory = rsForums("T_MESSAGE")
    > > > > >
    > > > > > paras = Split(myStory, vbcrlf & vbcrlf)
    > > > > > para = paras(0)
    > > > > > Response.Write "<span id='firstWords'>"
    > > > > > for i = 1 to 4
    > > > > > spacepos = instr(para," " )
    > > > > > word = left(para,spacepos)
    > > > > > Response.Write word
    > > > > > para= right(para,len(story)-spacepos)
    > > > > > next
    > > > > >
    > > > > > Response.Write "</span>" & para
    > > > > >
    > > > > > Each time the loop executes, it strips the first word from the
    > > > > > paragraph after writing it to the browser within the <span> tags. The
    > > > > > closing </span tag is written after the loop finishes, with the
    > > > > > remainder of the paragraph after it.
    > > > > >
    > > > > > --
    > > > > > Mike Brind
    > > > > >
    > > > > >
    > > > > > the other john wrote:
    > > > > > > Tried this and it only delivers one word and appears to exit the loop.
    > > > > > > In other words it appears to stylize the first word rather than the
    > > > > > > desired first 4. Any ideas?
    > > > > > >
    > > > > > > myStory = rsForums("T_MESSAGE")
    > > > > > >
    > > > > > > para = vbcrlf & vbcrlf
    > > > > > >
    > > > > > > storyArray = Split(myStory, para)
    > > > > > >
    > > > > > > for i = 1 to 4
    > > > > > > spacepos = instr(storyArray(0)," " )
    > > > > > > word = left(storyArray(0),spacepos)
    > > > > > > story = right(storyArray(0),len(storyArray(0))-spacepos)
    > > > > > > next
    > > > > > >
    > > > > > > storyArray(0) = "<span id='firstWords'>" & word & "</span>" & story
    > > > > > >
    > > > > > >
    > > > > > >
    > > > > > > Thanks again!!!
    > > > > > >
    > > > > > >
    > > > > > > the other john wrote:
    > > > > > > > Cool, this almost has it. But to make it even better is there a way
    > > > > > > > other than the For Each loop that I can use to access "part" of the
    > > > > > > > array? If I could just stylize specific parts of the array one way and
    > > > > > > > the rest just be other, like an if else sort of thing that would put
    > > > > > > > this thing to bed. The array works "great"....not I just need to
    > > > > > > > figure out how to work with just "parts" of it. I'm thinking the For
    > > > > > > > Each loop isn't going to work in this case since it's an all or nothing
    > > > > > > > sort of thing. I haven't worked with arrays that much and don't know
    > > > > > > > the possibilities.
    > > > > > > >
    > > > > > > > Thanks Mike! Learning a lot here!!
    > > > > > > >
    > > > > > > >
    > > > > > > > Mike Brind wrote:
    > > > > > > > > I'm no CSS expert, so you might be better off asking this in a style
    > > > > > > > > sheet group. However, try putting the text in a <p> tag
    > > > > > > > >
    > > > > > > > > storyArray(0) = "<img id='picFloat' src='testoboy.jpg'
    > > > > > > > > class='picBorderThin'><p>" & storyArray(0) & "</p>"
    > > > > > > > >
    > > > > > > > > --
    > > > > > > > > Mike Brind
    > > > > > > > >
    > > > > > > > > the other john wrote:
    > > > > > > > > > I tried this and it seemed to work except now I have a style issue. The
    > > > > > > > > > problem is if the letter I want to be affected by p:first-letter isn't
    > > > > > > > > > actually at the beginning of the item it won't work and if I want the
    > > > > > > > > > first pic to appear at the top it has to be at the beginning of the
    > > > > > > > > > item. Ideas?
    > > > > > > > > >
    > > > > > > > > > Thanks!!!
    > > > > > > > > >
    > > > > > > > > > <style>
    > > > > > > > > > #picFloat {float:left;}
    > > > > > > > > > p:first-letter {color: #8B0000; font-size:
    > > > > > > > > > 40px;font-family:times;float:left;}
    > > > > > > > > > #firstWords
    > > > > > > > > > {text-transform:uppercase;font-family:times;font-size:120%;}
    > > > > > > > > > </style>
    > > > > > > > > > '
    > > > > > > > > > '
    > > > > > > > > > myStory = rsForums("T_MESSAGE")
    > > > > > > > > >
    > > > > > > > > > para = vbcrlf & vbcrlf
    > > > > > > > > >
    > > > > > > > > > storyArray = Split(myStory, para)
    > > > > > > > > > storyArray(0) = "<img id='picFloat' src='testoboy.jpg'
    > > > > > > > > > class='picBorderThin'>" & storyArray(0)
    > > > > > > > > > storyArray(1) = storyArray(1) & "<img id='picFloat' src='me.jpg'
    > > > > > > > > > class='picBorderThin'>"
    > > > > > > > > >
    > > > > > > > > > for each item in storyArray
    > > > > > > > > > Response.write "<p>" & item & "</p>"
    > > > > > > > > > Next
    > > > > > > > > >
    > > > > > > > > >
    > > > > > > > > > Mike Brind wrote:
    > > > > > > > > > > Nope.
    > > > > > > > > > >
    > > > > > > > > > > paras = split(mystring,vbcrlf & vbcrlf)
    > > > > > > > > > >
    > > > > > > > > > > This returns a one-dimensional zero-based array of paragraphs, so the
    > > > > > > > > > > first paragraph will be held in the element referenced as paras(0), the
    > > > > > > > > > > second in paras(1) etc.
    > > > > > > > > > >
    > > > > > > > > > > Response.Write Ubound(paras) + 1 will give you the total number of
    > > > > > > > > > > paragraphs.
    > > > > > > > > > >
    > > > > > > > > > > --
    > > > > > > > > > > Mike Brind
    > > > > > > > > > >
    > > > > > > > > > > the other john wrote:
    > > > > > > > > > > > will split() take this?
    > > > > > > > > > > >
    > > > > > > > > > > > para = vbcrlf & vbcrlf
    > > > > > > > > > > > Split(mystring, para)
    > > > > > > > > > > >
    > > > > > > > > > > >
    > > > > > > > > > > > Mike Brind wrote:
    > > > > > > > > > > > > Even more reason to perform the operation on input. When the customer
    > > > > > > > > > > > > changes the brief to have more or less words stylized, I'll look
    > > > > > > > > > > > > forward to presenting the budget cost of doing so on existing data :)
    > > > > > > > > > > > >
    > > > > > > > > > > > > --
    > > > > > > > > > > > > Mike Brind
    > > > > > > > > > > > >
    > > > > > > > > > > > > Bob Lehmann wrote:
    > > > > > > > > > > > > > > At some stage, each story/article is entered into a database. It's at
    > > > > > > > > > > > > > > that point that I would manipulate it in the way you want. That way,
    > > > > > > > > > > > > > > the operation is only ever performed once for each story,
    > > > > > > > > > > > > >
    > > > > > > > > > > > > > Good idea.....
    > > > > > > > > > > > > >
    > > > > > > > > > > > > > Until the customer decides that they want the first 5 words stylized.
    > > > > > > > > > > > > >
    > > > > > > > > > > > > > Bob Lehmann
    > > > > > > > > > > > > >
    > > > > > > > > > > > > >
    > > > > > > > > > > > > > "Mike Brind" <> wrote in message
    > > > > > > > > > > > > > news:...
    > > > > > > > > > > > > > >
    > > > > > > > > > > > > > > the other john wrote:
    > > > > > > > > > > > > > > > I'm trying to enhance a script to do the following things.
    > > > > > > > > > > > > > > >
    > > > > > > > > > > > > > > > 1). detect the first four words of a paragraph and stylize them
    > > > > > > > > > > > > > > > (already does that)
    > > > > > > > > > > > > > > > 2). Capitalize and stylize the first letter of each paragraph (already
    > > > > > > > > > > > > > > > does that via style sheet)
    > > > > > > > > > > > > > > > 3). Count the number of paragraphs (or number of "vbcrlf & vbcrfl") so
    > > > > > > > > > > > > > > > I can insert a images in specific places (i.e. I want to dynamically
    > > > > > > > > > > > > > > > insert image 1 in paragraph 1, image 2 into para 2, etc.)
    > > > > > > > > > > > > > > >
    > > > > > > > > > > > > > > > This third item I can't figure out. I've tried it a few ways but keep
    > > > > > > > > > > > > > > > running to problems.
    > > > > > > > > > > > > > > >
    > > > > > > > > > > > > > > > Thanks!!!
    > > > > > > > > > > > > > > >
    > > > > > > > > > > > > > > > The following script was provided by Mike Brind, thanks Mike. It
    > > > > > > > > > > > > > > > currently can produce results for the first 2 items I listed above but
    > > > > > > > > > > > > > > > not exactly the way I want it to. It places an image into the first
    > > > > > > > > > > > > > > > paragraph for each "record" but that's not what I want.
    > > > > > > > > > > > > > > >
    > > > > > > > > > > > > > > > Dim str, i, spacepos, word
    > > > > > > > > > > > > > > > for wank = 1 to 7
    > > > > > > > > > > > > > > > if rsForums.EOF then exit for
    > > > > > > > > > > > > > > > if wank = 1 then
    > > > > > > > > > > > > > > > response.write "<img id='picFloat' src='testoboy.jpg'
    > > > > > > > > > > > > > > > class='picBorderThin'>"
    > > > > > > > > > > > > > > > End if
    > > > > > > > > > > > > > > > if wank = 2 then
    > > > > > > > > > > > > > > > response.write "<img id='picFloat' src='me.jpg'
    > > > > > > > > > > > > > > > class='picBorderThin'>"
    > > > > > > > > > > > > > > > End if
    > > > > > > > > > > > > > > > Response.Write "<p><span id='firstWords'>"
    > > > > > > > > > > > > > > > storyFix = replace(rsForums("T_MESSAGE"),vbcrlf & vbcrlf, "<p>")
    > > > > > > > > > > > > > > > story = replace(storyFix,"<p>", "</p>" & vbcrlf & "<p>")
    > > > > > > > > > > > > > > > for i = 1 to 4
    > > > > > > > > > > > > > > > spacepos = instr(story," " )
    > > > > > > > > > > > > > > > word = left(story,spacepos)
    > > > > > > > > > > > > > > > story = right(story,len(story)-spacepos)
    > > > > > > > > > > > > > > > response.write word
    > > > > > > > > > > > > > > > next
    > > > > > > > > > > > > > > >
    > > > > > > > > > > > > > > > Response.Write "</span>"
    > > > > > > > > > > > > > > > Response.Write story
    > > > > > > > > > > > > > > > Response.Write "</p>" & vbcrlf & vbcrlf & "<hr>"
    > > > > > > > > > > > > > > > rsForums.MoveNext
    > > > > > > > > > > > > > > > next
    > > > > > > > > > > > > > > > rsForums.Close
    > > > > > > > > > > > > > > > Set rsForums = nothing
    > > > > > > > > > > > > > >
    > > > > > > > > > > > > > > I wouldn't do this like this...
    > > > > > > > > > > > > > >
    > > > > > > > > > > > > > > At some stage, each story/article is entered into a database. It's at
    > > > > > > > > > > > > > > that point that I would manipulate it in the way you want. That way,
    > > > > > > > > > > > > > > the operation is only ever performed once for each story, rather than
    > > > > > > > > > > > > > > every time a page is requested.
    > > > > > > > > > > > > > >
    > > > > > > > > > > > > > > Anyhoo, you need to break the problem down in the opposite order in
    > > > > > > > > > > > > > > which you have. The first thing you need to do is to break the story
    > > > > > > > > > > > > > > into paragraphs. Whether on input or output, this can be done using
    > > > > > > > > > > > > > > split(). You also need to put you images into an array, so you can get
    > > > > > > > > > > > > > > them by index.
    > > > > > > > > > > > > > >
    > > > > > > > > > > > > > > Now that you have an array of paragraphs, and an array of images, it's
    > > > > > > > > > > > > > > easy to loop through from 0 to 6, prepending each paragraph with its
    > > > > > > > > > > > > > > associated image html. Within that loop, you can conduct the operation
    > > > > > > > > > > > > > > to style the first few words. You would create a string containing the
    > > > > > > > > > > > > > > first 7 paragraphs (adding <p> tags as needed). Then, if there are any
    > > > > > > > > > > > > > > paragraphs left, you would need to loop through those to style the
    > > > > > > > > > > > > > > first few words, and append them to your string. Then its ready for
    > > > > > > > > > > > > > > input/output.
    > > > > > > > > > > > > > >
    > > > > > > > > > > > > > > --
    > > > > > > > > > > > > > > Mike Brind
    > > > > > > > > > > > > > >
     
    the other john, Jul 24, 2006
    #19
  20. LOL, ok, I found a solution albeit a less than elegant one....

    myStory = rsForums("T_MESSAGE")

    storyArray = Split(myStory, vbcrlf & vbcrlf)
    para = storyArray(0)
    Response.Write "<img id='picFloat' src='testoboy.jpg'
    class='picBorderThin'><p><span id='firstWords'>"
    for i = 1 to 4
    spacepos = instr(para," " )
    word = left(para,spacepos)
    Response.Write word
    para= right(para,len(para)-spacepos)
    next

    Response.Write "</span>" & para & "</p><blockquote>A quote on the side
    somewhere</blockquote>" & vbcrlf

    storyArray(1) = storyArray(1) & "<img id='picFloat' src='me.jpg'
    class='picBorderThin'>"

    for paraLoop = LBound(storyArray)+1 to UBound(storyArray)
    Response.write "<p>" & storyArray(paraLoop) & "</p>" & vbcrlf
    next

    Thanks Mike for everything! Any other ideas I appreciate it!



    the other john wrote:
    > what's confusing me is how get the paragraph that's stylizing the first
    > 4 words into a variable instead of writing it to the page.
    > Response.write appears to be whats allowing the loop to go on to the
    > next word. How do I "not" write to the page and put into a variable
    > instead so I can prepend it further?
    >
    > I don't know how I got this far without having a better handle on
    > control structures, yikes. For example, is it possible to use
    > conditionals inside of a For Each loop?
    >
    > For each item in thisArray
    > If item = whatever then
    > do this
    > Else
    > do somethinge else
    > End if
    > Next
    >
    > I tried this and it didn't work so I assume answer is no but thought
    > I'd ask just the same.
    >
    > Thanks!!!!
    >
    >
    > the other john wrote:
    > > oh, I see the problem now. there was still a "story" in there that
    > > needed to be changed to "para". Ok, this worked...but how to I print
    > > the rest of the array? Is there a way to use a for each loop and
    > > skipping the first array item?
    > >
    > >
    > > the other john wrote:
    > > > I'm still getting this error. I'm running the script exactly as you
    > > > wrote it. What am I missing?
    > > >
    > > >
    > > > Microsoft VBScript runtime error '800a0005'
    > > >
    > > > Invalid procedure call or argument: 'right'
    > > >
    > > > /paraTest.asp, line 40
    > > >
    > > > Mike Brind wrote:
    > > > > It's not going to work because you are not changing the paragraph on
    > > > > each loop. You change the variable from storyArray to story, but on
    > > > > the next iteration, it goes back to storyArray again. At that point,
    > > > > story is storyArray minus the first word, but when you enter the loop
    > > > > again, storyArray(0) is still the same value as when you started (ie,
    > > > > the whole paragraph with all words intact). Try replacing the example
    > > > > you posted earlier with the bit I just posted, See if that works.
    > > > >
    > > > > --
    > > > > Mike Brind
    > > > >
    > > > >
    > > > >
    > > > > the other john wrote:
    > > > > > for some reason now I'm getting this...odd...don't know why..
    > > > > >
    > > > > > Microsoft VBScript runtime error '800a0005'
    > > > > >
    > > > > > Invalid procedure call or argument: 'right'
    > > > > >
    > > > > > /paraTest.asp, line 36
    > > > > >
    > > > > >
    > > > > > "right" didn't cause a problem before. To be clear about what I was
    > > > > > trying to do I should have include the entire script. I'm trying to
    > > > > > tweek array items after getting the first 4 words formatted.
    > > > > >
    > > > > > Thanks for your help Mike, I'm so close now, this is awesome!!!
    > > > > >
    > > > > >
    > > > > >
    > > > > > myStory = rsForums("T_MESSAGE")
    > > > > >
    > > > > > para = vbcrlf & vbcrlf
    > > > > >
    > > > > > storyArray = Split(myStory, para)
    > > > > > for i = 1 to 4
    > > > > > spacepos = instr(storyArray(0)," " )
    > > > > > word = left(storyArray(0),spacepos)
    > > > > > story = right(storyArray(0),len(storyArray(0))-spacepos)
    > > > > > next
    > > > > >
    > > > > > storyArray(0) = "<span id='firstWords'>" & word & "</span>" & story
    > > > > >
    > > > > > storyArray(0) = "<img id='picFloat' src='testoboy.jpg'
    > > > > > class='picBorderThin'><p>" & storyArray(0) & "</p><blockquote>An
    > > > > > importand quote from the story here<blockquote>"
    > > > > >
    > > > > > storyArray(1) = storyArray(1) & "<img id='picFloat' src='me.jpg'
    > > > > > class='picBorderThin'>"
    > > > > >
    > > > > >
    > > > > > for each item in storyArray
    > > > > > Response.write "<p>" & item & "</p>" & vbcrlf
    > > > > > Next
    > > > > >
    > > > > >
    > > > > > Mike Brind wrote:
    > > > > > > myStory = rsForums("T_MESSAGE")
    > > > > > >
    > > > > > > paras = Split(myStory, vbcrlf & vbcrlf)
    > > > > > > para = paras(0)
    > > > > > > Response.Write "<span id='firstWords'>"
    > > > > > > for i = 1 to 4
    > > > > > > spacepos = instr(para," " )
    > > > > > > word = left(para,spacepos)
    > > > > > > Response.Write word
    > > > > > > para= right(para,len(story)-spacepos)
    > > > > > > next
    > > > > > >
    > > > > > > Response.Write "</span>" & para
    > > > > > >
    > > > > > > Each time the loop executes, it strips the first word from the
    > > > > > > paragraph after writing it to the browser within the <span> tags. The
    > > > > > > closing </span tag is written after the loop finishes, with the
    > > > > > > remainder of the paragraph after it.
    > > > > > >
    > > > > > > --
    > > > > > > Mike Brind
    > > > > > >
    > > > > > >
    > > > > > > the other john wrote:
    > > > > > > > Tried this and it only delivers one word and appears to exit the loop.
    > > > > > > > In other words it appears to stylize the first word rather than the
    > > > > > > > desired first 4. Any ideas?
    > > > > > > >
    > > > > > > > myStory = rsForums("T_MESSAGE")
    > > > > > > >
    > > > > > > > para = vbcrlf & vbcrlf
    > > > > > > >
    > > > > > > > storyArray = Split(myStory, para)
    > > > > > > >
    > > > > > > > for i = 1 to 4
    > > > > > > > spacepos = instr(storyArray(0)," " )
    > > > > > > > word = left(storyArray(0),spacepos)
    > > > > > > > story = right(storyArray(0),len(storyArray(0))-spacepos)
    > > > > > > > next
    > > > > > > >
    > > > > > > > storyArray(0) = "<span id='firstWords'>" & word & "</span>" & story
    > > > > > > >
    > > > > > > >
    > > > > > > >
    > > > > > > > Thanks again!!!
    > > > > > > >
    > > > > > > >
    > > > > > > > the other john wrote:
    > > > > > > > > Cool, this almost has it. But to make it even better is there a way
    > > > > > > > > other than the For Each loop that I can use to access "part" of the
    > > > > > > > > array? If I could just stylize specific parts of the array one way and
    > > > > > > > > the rest just be other, like an if else sort of thing that would put
    > > > > > > > > this thing to bed. The array works "great"....not I just need to
    > > > > > > > > figure out how to work with just "parts" of it. I'm thinking the For
    > > > > > > > > Each loop isn't going to work in this case since it's an all or nothing
    > > > > > > > > sort of thing. I haven't worked with arrays that much and don't know
    > > > > > > > > the possibilities.
    > > > > > > > >
    > > > > > > > > Thanks Mike! Learning a lot here!!
    > > > > > > > >
    > > > > > > > >
    > > > > > > > > Mike Brind wrote:
    > > > > > > > > > I'm no CSS expert, so you might be better off asking this in a style
    > > > > > > > > > sheet group. However, try putting the text in a <p> tag
    > > > > > > > > >
    > > > > > > > > > storyArray(0) = "<img id='picFloat' src='testoboy.jpg'
    > > > > > > > > > class='picBorderThin'><p>" & storyArray(0) & "</p>"
    > > > > > > > > >
    > > > > > > > > > --
    > > > > > > > > > Mike Brind
    > > > > > > > > >
    > > > > > > > > > the other john wrote:
    > > > > > > > > > > I tried this and it seemed to work except now I have a style issue. The
    > > > > > > > > > > problem is if the letter I want to be affected by p:first-letter isn't
    > > > > > > > > > > actually at the beginning of the item it won't work and if I want the
    > > > > > > > > > > first pic to appear at the top it has to be at the beginning of the
    > > > > > > > > > > item. Ideas?
    > > > > > > > > > >
    > > > > > > > > > > Thanks!!!
    > > > > > > > > > >
    > > > > > > > > > > <style>
    > > > > > > > > > > #picFloat {float:left;}
    > > > > > > > > > > p:first-letter {color: #8B0000; font-size:
    > > > > > > > > > > 40px;font-family:times;float:left;}
    > > > > > > > > > > #firstWords
    > > > > > > > > > > {text-transform:uppercase;font-family:times;font-size:120%;}
    > > > > > > > > > > </style>
    > > > > > > > > > > '
    > > > > > > > > > > '
    > > > > > > > > > > myStory = rsForums("T_MESSAGE")
    > > > > > > > > > >
    > > > > > > > > > > para = vbcrlf & vbcrlf
    > > > > > > > > > >
    > > > > > > > > > > storyArray = Split(myStory, para)
    > > > > > > > > > > storyArray(0) = "<img id='picFloat' src='testoboy.jpg'
    > > > > > > > > > > class='picBorderThin'>" & storyArray(0)
    > > > > > > > > > > storyArray(1) = storyArray(1) & "<img id='picFloat' src='me.jpg'
    > > > > > > > > > > class='picBorderThin'>"
    > > > > > > > > > >
    > > > > > > > > > > for each item in storyArray
    > > > > > > > > > > Response.write "<p>" & item & "</p>"
    > > > > > > > > > > Next
    > > > > > > > > > >
    > > > > > > > > > >
    > > > > > > > > > > Mike Brind wrote:
    > > > > > > > > > > > Nope.
    > > > > > > > > > > >
    > > > > > > > > > > > paras = split(mystring,vbcrlf & vbcrlf)
    > > > > > > > > > > >
    > > > > > > > > > > > This returns a one-dimensional zero-based array of paragraphs, so the
    > > > > > > > > > > > first paragraph will be held in the element referenced as paras(0), the
    > > > > > > > > > > > second in paras(1) etc.
    > > > > > > > > > > >
    > > > > > > > > > > > Response.Write Ubound(paras) + 1 will give you the total number of
    > > > > > > > > > > > paragraphs.
    > > > > > > > > > > >
    > > > > > > > > > > > --
    > > > > > > > > > > > Mike Brind
    > > > > > > > > > > >
    > > > > > > > > > > > the other john wrote:
    > > > > > > > > > > > > will split() take this?
    > > > > > > > > > > > >
    > > > > > > > > > > > > para = vbcrlf & vbcrlf
    > > > > > > > > > > > > Split(mystring, para)
    > > > > > > > > > > > >
    > > > > > > > > > > > >
    > > > > > > > > > > > > Mike Brind wrote:
    > > > > > > > > > > > > > Even more reason to perform the operation on input. When the customer
    > > > > > > > > > > > > > changes the brief to have more or less words stylized, I'll look
    > > > > > > > > > > > > > forward to presenting the budget cost of doing so on existing data :)
    > > > > > > > > > > > > >
    > > > > > > > > > > > > > --
    > > > > > > > > > > > > > Mike Brind
    > > > > > > > > > > > > >
    > > > > > > > > > > > > > Bob Lehmann wrote:
    > > > > > > > > > > > > > > > At some stage, each story/article is entered into a database. It's at
    > > > > > > > > > > > > > > > that point that I would manipulate it in the way you want. That way,
    > > > > > > > > > > > > > > > the operation is only ever performed once for each story,
    > > > > > > > > > > > > > >
    > > > > > > > > > > > > > > Good idea.....
    > > > > > > > > > > > > > >
    > > > > > > > > > > > > > > Until the customer decides that they want the first 5 words stylized.
    > > > > > > > > > > > > > >
    > > > > > > > > > > > > > > Bob Lehmann
    > > > > > > > > > > > > > >
    > > > > > > > > > > > > > >
    > > > > > > > > > > > > > > "Mike Brind" <> wrote in message
    > > > > > > > > > > > > > > news:...
    > > > > > > > > > > > > > > >
    > > > > > > > > > > > > > > > the other john wrote:
    > > > > > > > > > > > > > > > > I'm trying to enhance a script to do the following things.
    > > > > > > > > > > > > > > > >
    > > > > > > > > > > > > > > > > 1). detect the first four words of a paragraph and stylize them
    > > > > > > > > > > > > > > > > (already does that)
    > > > > > > > > > > > > > > > > 2). Capitalize and stylize the first letter of each paragraph (already
    > > > > > > > > > > > > > > > > does that via style sheet)
    > > > > > > > > > > > > > > > > 3). Count the number of paragraphs (or number of "vbcrlf & vbcrfl") so
    > > > > > > > > > > > > > > > > I can insert a images in specific places (i.e. I want to dynamically
    > > > > > > > > > > > > > > > > insert image 1 in paragraph 1, image 2 into para 2, etc.)
    > > > > > > > > > > > > > > > >
    > > > > > > > > > > > > > > > > This third item I can't figure out. I've tried it a few ways but keep
    > > > > > > > > > > > > > > > > running to problems.
    > > > > > > > > > > > > > > > >
    > > > > > > > > > > > > > > > > Thanks!!!
    > > > > > > > > > > > > > > > >
    > > > > > > > > > > > > > > > > The following script was provided by Mike Brind, thanks Mike. It
    > > > > > > > > > > > > > > > > currently can produce results for the first 2 items I listed above but
    > > > > > > > > > > > > > > > > not exactly the way I want it to. It places an image into the first
    > > > > > > > > > > > > > > > > paragraph for each "record" but that's not what I want.
    > > > > > > > > > > > > > > > >
    > > > > > > > > > > > > > > > > Dim str, i, spacepos, word
    > > > > > > > > > > > > > > > > for wank = 1 to 7
    > > > > > > > > > > > > > > > > if rsForums.EOF then exit for
    > > > > > > > > > > > > > > > > if wank = 1 then
    > > > > > > > > > > > > > > > > response.write "<img id='picFloat' src='testoboy.jpg'
    > > > > > > > > > > > > > > > > class='picBorderThin'>"
    > > > > > > > > > > > > > > > > End if
    > > > > > > > > > > > > > > > > if wank = 2 then
    > > > > > > > > > > > > > > > > response.write "<img id='picFloat' src='me.jpg'
    > > > > > > > > > > > > > > > > class='picBorderThin'>"
    > > > > > > > > > > > > > > > > End if
    > > > > > > > > > > > > > > > > Response.Write "<p><span id='firstWords'>"
    > > > > > > > > > > > > > > > > storyFix = replace(rsForums("T_MESSAGE"),vbcrlf & vbcrlf, "<p>")
    > > > > > > > > > > > > > > > > story = replace(storyFix,"<p>", "</p>" & vbcrlf & "<p>")
    > > > > > > > > > > > > > > > > for i = 1 to 4
    > > > > > > > > > > > > > > > > spacepos = instr(story," " )
    > > > > > > > > > > > > > > > > word = left(story,spacepos)
    > > > > > > > > > > > > > > > > story = right(story,len(story)-spacepos)
    > > > > > > > > > > > > > > > > response.write word
    > > > > > > > > > > > > > > > > next
    > > > > > > > > > > > > > > > >
    > > > > > > > > > > > > > > > > Response.Write "</span>"
    > > > > > > > > > > > > > > > > Response.Write story
    > > > > > > > > > > > > > > > > Response.Write "</p>" & vbcrlf & vbcrlf & "<hr>"
    > > > > > > > > > > > > > > > > rsForums.MoveNext
    > > > > > > > > > > > > > > > > next
    > > > > > > > > > > > > > > > > rsForums.Close
    > > > > > > > > > > > > > > > > Set rsForums = nothing
    > > > > > > > > > > > > > > >
    > > > > > > > > > > > > > > > I wouldn't do this like this...
    > > > > > > > > > > > > > > >
    > > > > > > > > > > > > > > > At some stage, each story/article is entered into a database. It's at
    > > > > > > > > > > > > > > > that point that I would manipulate it in the way you want. That way,
    > > > > > > > > > > > > > > > the operation is only ever performed once for each story, rather than
    > > > > > > > > > > > > > > > every time a page is requested.
    > > > > > > > > > > > > > > >
    > > > > > > > > > > > > > > > Anyhoo, you need to break the problem down in the opposite order in
    > > > > > > > > > > > > > > > which you have. The first thing you need to do is to break the story
    > > > > > > > > > > > > > > > into paragraphs. Whether on input or output, this can be done using
    > > > > > > > > > > > > > > > split(). You also need to put you images into an array, so you can get
    > > > > > > > > > > > > > > > them by index.
    > > > > > > > > > > > > > > >
    > > > > > > > > > > > > > > > Now that you have an array of paragraphs, and an array of images, it's
    > > > > > > > > > > > > > > > easy to loop through from 0 to 6, prepending each paragraph with its
    > > > > > > > > > > > > > > > associated image html. Within that loop, you can conduct the operation
    > > > > > > > > > > > > > > > to style the first few words. You would create a string containing the
    > > > > > > > > > > > > > > > first 7 paragraphs (adding <p> tags as needed). Then, if there are any
    > > > > > > > > > > > > > > > paragraphs left, you would need to loop through those to style the
    > > > > > > > > > > > > > > > first few words, and append them to your string. Then its ready for
    > > > > > > > > > > > > > > > input/output.
    > > > > > > > > > > > > > > >
    > > > > > > > > > > > > > > > --
    > > > > > > > > > > > > > > > Mike Brind
    > > > > > > > > > > > > > > >
     
    the other john, Jul 24, 2006
    #20
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. nail
    Replies:
    0
    Views:
    1,550
  2. qwerty
    Replies:
    3
    Views:
    9,289
    Scott Allen
    Sep 30, 2004
  3. Maziar Aflatoun
    Replies:
    1
    Views:
    496
    =?Utf-8?B?UGF1bA==?=
    Jan 22, 2005
  4. et
    Replies:
    1
    Views:
    526
    Yunus Emre ALPĂ–ZEN [MCSD.NET]
    Jun 29, 2005
  5. Rob R. Ainscough
    Replies:
    3
    Views:
    332
    Rob R. Ainscough
    Jun 14, 2005
Loading...

Share This Page