This is Interesting: Free Magazines for Graphics designers and webmasters
Home > Archive > Dreamweaver > June 2004 > Re: html in database column not working on page
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
Re: html in database column not working on page
|
|
| Gary White 2004-06-09, 6:03 pm |
| On Tue, 8 Jun 2004 13:25:38 +0100, "Dooza" <steve@whatareyoudooza.tv>
wrote:
>
>Its a bit of modified code from an extension that highlights the searched
>word. It doesnt normally have the font tags, just the bold tags. Any idea
>how to stop it breaking?
If all you changed was adding the font tag to the above line, and the
function worked correctly before you made the change, then I'd suggest
adding this to your style sheet:
em{
font-weight: bold;
color: #f00;
}
Then change the above line to:
ShowBold=objRegExp.Replace(theField,"<em>$1</em>")
Gary
| |
|
| "Gary White" <reply@newsgroup.please> wrote in message
news:c9qe8g$81c$1@forums.macromedia.com...
> "Dooza" <steve@whatareyoudooza.tv> wrote in message
> news:c9pllr$32r$1@forums.macromedia.com...
> color=#FF0000><b>$1</b></font>")
>
>
> Yes. It is. I don't know what you're trying to accomplish, but a quick
look
> at the generated source code of the page seems to show that you're getting
> "<font color=#FF0000><b></b></font>" in between each character of the
> output.
Its a bit of modified code from an extension that highlights the searched
word. It doesnt normally have the font tags, just the bold tags. Any idea
how to stop it breaking?
Cheers,
Steve
| |
|
| "Gary White" <reply@newsgroup.please> wrote in message
news:d3cbc0tb083eludi4gk89hsuia1tvjdugp@4ax.com...
> On Tue, 8 Jun 2004 13:25:38 +0100, "Dooza" <steve@whatareyoudooza.tv>
> wrote:
>
>
>
> If all you changed was adding the font tag to the above line, and the
> function worked correctly before you made the change, then I'd suggest
> adding this to your style sheet:
>
> em{
> font-weight: bold;
> color: #f00;
> }
>
> Then change the above line to:
>
> ShowBold=objRegExp.Replace(theField,"<em>$1</em>")
Hi Gary,
I havent tried it without font code, I will give this a go and see what
happens. Thanks for all your help!
Steve
| |
| Gary White 2004-06-09, 6:03 pm |
| On Tue, 8 Jun 2004 13:38:13 +0100, "Dooza" <steve@whatareyoudooza.tv>
wrote:
>I havent tried it without font code, I will give this a go and see what
>happens. Thanks for all your help!
You're welcome. Post back and let us know how it goes.
Gary
| |
| Dooza 2004-06-10, 12:14 pm |
| "Gary White" <reply@newsgroup.please> wrote in message
news:inlbc0ltr4nsatg3mcprjcsbrk385jjbq4@4ax.com...
> On Tue, 8 Jun 2004 13:38:13 +0100, "Dooza" <steve@whatareyoudooza.tv>
> wrote:
>
>
>
> You're welcome. Post back and let us know how it goes.
Well I am now confused again. For a while I thought the problem was down to
my cursor types, but now I am not so sure. I have made the changes you
suggested.
http://store.dmcworld.com/detail.as...&search=Amazing
works but if you remove the search string like this:
http://store.dmcworld.com/detail.as...&subs=35&id=510 then it doesnt
translate the HTML again.
Due to the Webassist eCart I have to use the following recordset setup:
Cursor Type: Dynamic
Cursor Location: Client
Lock Type: Read Only
This page with the search string
http://www.dmcworld.com/djonly/sear...&search=Amazing works
fine. And if I remove the search string then this page also breaks, but
luckily for me, this page is only used to display search results.
The Highlight search string is a Charon extension. Does anyone have a
recomendation or other way of doing what I want to do?
My bodge is this:
| |
| Dooza 2004-06-10, 12:14 pm |
| <% If Request.QueryString("search") <> "" Then %>
<%=Replace(ShowBold(rsProductDetail.Fields.Item("fldtracklisting").Value),ch
r(13),"<BR>")%><br>
<% Else %>
<%=Replace((rsProductDetail.Fields.Item("fldtracklisting").Value),chr(13),"<
BR>")%><%End If %>
| |
| Gary White 2004-06-10, 12:14 pm |
| On Thu, 10 Jun 2004 13:31:43 +0100, "Dooza" <steve@whatareyoudooza.tv>
wrote:
>This page with the search string
>http://www.dmcworld.com/djonly/sear...&search=Amazing works
>fine. And if I remove the search string then this page also breaks, but
>luckily for me, this page is only used to display search results.
>
>The Highlight search string is a Charon extension. Does anyone have a
>recomendation or other way of doing what I want to do?
Sorry, I'm not much on ASP. I'm more of a PHP guy. Perhaps someone else
can jump in here.
Gary
| |
| Dooza 2004-06-10, 12:14 pm |
| "Gary White" <reply@newsgroup.please> wrote in message
news:1srgc09fsmpooforukjf2li7tok9d5d3jj@4ax.com...
> On Thu, 10 Jun 2004 13:31:43 +0100, "Dooza" <steve@whatareyoudooza.tv>
> wrote:
>
works[color=darkred]
>
>
> Sorry, I'm not much on ASP. I'm more of a PHP guy. Perhaps someone else
> can jump in here.
Hi Gary,
I think my bodge will do just nicely. I think it was a combination of the
field in the database being Text (16) and the recordset cursor type and the
showbold function...all added up to a big mess! Its doing the right things
now, but thanks for all your help.
Steve
| |
| Gary White 2004-06-10, 7:14 pm |
| On Thu, 10 Jun 2004 15:55:23 +0100, "Dooza" <steve@whatareyoudooza.tv>
wrote:
>Hi Gary,
>I think my bodge will do just nicely. I think it was a combination of the
>field in the database being Text (16) and the recordset cursor type and the
>showbold function...all added up to a big mess! Its doing the right things
>now, but thanks for all your help.
You're welcome. Glad to hear it!
Gary
|
|
|
| | Copyright 2003 - 2009 forum4designers.com Software forum Computer Hardware reviews |
|