navigation
a webmaster learning community
     Home    Register     Search      Help      Login    
Sponsors

Shopping Cart Software
Ecommerce software integrated into Frontpage, Dreamweaver and Golive templates. No monthly fees and available in ASP and PHP versions.

Website Templates
We also have a wide selection of Dreamweaver, Expression Web and Frontpage templates as well as webmaster tools and CSS layouts.

Frontpage website templates
Creative Website Templates for FrontPage, Dreamweaver, Flash, SwishMax

Search Forums
 

Advanced search
Recent Posts

 Todays Posts
 Most Active posts
 Posts since last visit
 My Recent Posts
 Mark posts read

Microsoft MVP

 

Simple replace in database results...please help

 
View related threads: (in this forum | in all forums)

Logged in as: Guest
Users viewing this topic: none
Printable Version 

All Forums >> Web Development >> ASP and Database >> Simple replace in database results...please help
Page: [1]
 
jonance

 

Posts: 297
From: Louisville KY USA
Status: offline

 
Simple replace in database results...please help - 2/24/2008 22:04:24   
Hi,

I have a scrolling marquee script that is in javascript. The marquee contents are within two apostrophes ('content here'). I am using it to display database results in the scroll, however some of my results have apostrophes in them so it throws off the script. Is there a way to REMOVE any apostophes that appear in my results? Here is how i display the results....i'm sure this is simple but i just don't know how to do it.

<%=FP_FieldVal(fp_rs,"realname")%>
Spooky

 

Posts: 26599
Joined: 11/11/1998
From: Middle Earth
Status: offline

 
RE: Simple replace in database results...please help - 2/24/2008 23:47:28   
Try it this way?
<%=replace(FP_Field(fp_rs,"realname"),"'","''")%>

The other way is to remove them completely :
<%=replace(FP_Field(fp_rs,"realname"),"'","")%>

_____________________________

If you arent part of the solution, then there is good money to be made prolonging the problem

§þ:)


(in reply to jonance)
rdouglass

 

Posts: 9186
From: Biddeford, ME USA
Status: offline

 
RE: Simple replace in database results...please help - 2/25/2008 9:35:22   
Just my $.02...one more option:

You will need to use the "\" for a JS marquee to show an apostrophe or other special characters. Like so:

<%=replace(FP_Field(fp_rs,"realname"),"'","\'")%>

JavaScript needs to 'escape' those special chars. Hope it helps.

_____________________________

Don't take you're eye off your final destination.

ASP Checkbox Function Tutorial.

(in reply to Spooky)
jonance

 

Posts: 297
From: Louisville KY USA
Status: offline

 
RE: Simple replace in database results...please help - 2/25/2008 9:37:50   
Thanks alot...I used spooky's to totally omit the apostrophes...but i'm saving all the code for future reference!

Thanks
John

(in reply to rdouglass)
Page:   [1]

All Forums >> Web Development >> ASP and Database >> Simple replace in database results...please help
Page: [1]
Jump to: 1





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts