My new site. - Page 2
Page 2 of 2 FirstFirst 1 2
Results 16 to 21 of 21

Thread: My new site.

  1. #16
    Registered User
    Join Date
    Oct 2000
    Location
    Kansas City, MO
    Posts
    1,162
    <b>Don't use apostrophes, quotes or commas. I need to write an algorithm to replace those characters when creating records in the database.</b>

  2. #17
    Registered User +Daemon+'s Avatar
    Join Date
    Jan 2002
    Location
    RC, Ca
    Posts
    3,406
    heres a patch for you
    Code:
    function EditNotice()
       	Notice = replace(Notice, chr(10), "<br>")
    	Notice = replace(Notice, chr(34), "&#34;") // & #34;
    	Notice = replace(Notice, chr(39), "&#39;") // & #39;
    	Notice = replace(Notice, chr(40), "&#40;") // & #40;
    	Notice = replace(Notice, chr(41), "&#41;") // & #41;
    end Function
    
    function ReplaceArticle()
    
    	Title = replace(Title, "&#34;", chr(34)) // & #34;
    	Title = replace(Title, "&#39;", chr(39)) // & #39;
    	Title = replace(Title, "&#40;", chr(40)) // & #40;
    	Title = replace(Title, "&#41;", chr(41)) // & #41;
    
    end Function
    Title and Notice are html forms varibles

    well the chars didnt come out
    Last edited by +Daemon+; August 22nd, 2002 at 04:33 PM.

  3. #18
    Registered User -Senectus-'s Avatar
    Join Date
    Jun 2002
    Location
    Kalgoorlie
    Posts
    305
    Renders perfectly for me..
    Opera 6.04
    nice...

  4. #19
    Registered User shamus's Avatar
    Join Date
    Apr 2001
    Location
    Cornish,Maine,USA
    Posts
    3,140
    Looks good Corey...where do i get my password for the pics page???

  5. #20
    Registered User Budd's Avatar
    Join Date
    Aug 2000
    Location
    i'm not telling
    Posts
    1,542
    <!-- Start of harbaughproject.com 468x60 banner-->
    <a href="http://harbaughproject.com" target="_blank"><img src="http://harbaughproject.com/images/hp_banner468x60.gif" border="0"></a>
    <!-- End of harbaughproject.com 468x60 banner-->

    <!-- Start of harbaughproject.com 88x31 banner-->
    <a href="http://harbaughproject.com" target="_blank"><img src="http://harbaughproject.com/images/hp_minibanner88x31.gif" border="0"></a>
    <!-- End of harbaughproject.com 88x31 banner-->

    nice

  6. #21
    Registered User
    Join Date
    Oct 2000
    Location
    Kansas City, MO
    Posts
    1,162
    Originally posted by +Daemon+
    heres a patch for you
    Code:
    function EditNotice()
       	Notice = replace(Notice, chr(10), "<br>")
    	Notice = replace(Notice, chr(34), "&#34;") // & #34;
    	Notice = replace(Notice, chr(39), "&#39;") // & #39;
    	Notice = replace(Notice, chr(40), "&#40;") // & #40;
    	Notice = replace(Notice, chr(41), "&#41;") // & #41;
    end Function
    
    function ReplaceArticle()
    
    	Title = replace(Title, "&#34;", chr(34)) // & #34;
    	Title = replace(Title, "&#39;", chr(39)) // & #39;
    	Title = replace(Title, "&#40;", chr(40)) // & #40;
    	Title = replace(Title, "&#41;", chr(41)) // & #41;
    
    end Function
    Title and Notice are html forms varibles

    well the chars didnt come out
    Ya, I was thinking something along those lines. I put my object names into an array.

    Code:
    	TOPIC(1) = Request.Form("topic")
    	TOPIC(2) = Request.Form("name")
    	TOPIC(3) = Request.Form("email")
    	TOPIC(4) = Request.Form("message")
    	
    	For i = 1 To Ubound(TOPIC)
    		TOPIC(i) = Replace(TOPIC(i), chr(34), "&#34;", 1, -1, 1)
    		TOPIC(i) = Replace(TOPIC(i), chr(39), "&#39;", 1, -1, 1)
    		TOPIC(i) = Replace(TOPIC(i), chr(40), "&#40;", 1, -1, 1)
    		TOPIC(i) = Replace(TOPIC(i), chr(41), "&#41;", 1, -1, 1)
    		TOPIC(i) = Replace(TOPIC(i), chr(42), "&#42;", 1, -1, 1)
    	Next
    I just hate that if I every wanted to use the database for anything else then I would have the HTML Character Codes in the records. I eventually want to put a search engine on the discussion forums and I think that the HTML Codes may complicate the search.

    O'Ya, it's fix now. Post away and let me know of any other problems please.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •