Submit Your Article Webforumz RegistrationAnnouncements Contact Webforumz StaffContact
Home Resources Blogs Meet the Team Contact Register
 

Go Back   WebForumz.com > The Code > Classic ASP

Reply
 
LinkBack Thread Tools
Old November 12th, 2007, 12:37 AM   #1
Most Reputable Member
 

Join Date: Feb 2004
Location: Borneo
Age: 28
Posts: 1,628
Blog Entries: 2
Thanks: 0
Thanked 4 Times in 3 Posts
Rep Altering Power: 0 Monie is a jewel in the rough Monie is a jewel in the rough Monie is a jewel in the rough Monie is a jewel in the rough
Formatting Passed Value Within ASP Page In Textarea?

Hai..

I have an ASP page that will pass a value to another ASP page. Something like reply PM things where all the message in our PM will be put as [quote] in the reply textarea form.

I manage to get the message to be placed as the default value in my reply form:

HTML Code:
<textarea name="myMessage" size="100" cols="60" rows="8"><%Response.Write(quoteTo)%></textarea>
What I want to do with this value is to format them like making them bold, or put them in a div like the [quote] tag..?

Anybody can help?
Thanks..
Monie is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Old November 13th, 2007, 02:02 PM   #2
Elite Veteran
 

Join Date: Jul 2007
Location: Webforumz 24/7
Age: 17
Posts: 3,799
Blog Entries: 9
Thanks: 2
Thanked 3 Times in 3 Posts
Rep Altering Power: 0 alexgeek is a name known to all alexgeek is a name known to all alexgeek is a name known to all alexgeek is a name known to all alexgeek is a name known to all alexgeek is a name known to all
Re: Formatting Passed Value Within ASP Page In Textarea?

Isn't this kinda CSS and HTML?
You'd just find [quote] and replace is with something like "<div class="quote">" or am I missing something?
__________________
Web Design and Development Blog

Alex Perry
Technical Administrator.
alexgeek is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Old November 13th, 2007, 05:14 PM   #3
WebForumz Member
 

Join Date: Sep 2007
Location: Wales, UK
Age: 37
Posts: 91
Thanks: 1
Thanked 0 Times in 0 Posts
Rep Altering Power: 0 robbied72 will become famous soon enough robbied72 will become famous soon enough
Re: Formatting Passed Value Within ASP Page In Textarea?

You need to explain this a bit better Monie.
robbied72 is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Old November 13th, 2007, 09:39 PM   #4
Most Reputable Member
 

Join Date: Feb 2004
Location: Borneo
Age: 28
Posts: 1,628
Blog Entries: 2
Thanks: 0
Thanked 4 Times in 3 Posts
Rep Altering Power: 0 Monie is a jewel in the rough Monie is a jewel in the rough Monie is a jewel in the rough Monie is a jewel in the rough
Re: Formatting Passed Value Within ASP Page In Textarea?

Quote:
Originally Posted by alexgeek View Post
Isn't this kinda CSS and HTML?
You'd just find [quote] and replace is with something like "<div class="quote">" or am I missing something?
This is what I wanted to do Alex!

Ok..! An illustrator might help

When I read someone message, and click the reply button, I manage to put them in my textarea reply form like this one I am replying Alex message! All Alex message will be put in my message textarea as QUOTE and later when Alex read his PM they it will be put DIV to indicate it is a QUOTE message!

So how to do this? I tried to make them bold but when diaplaying the message, it will print the <b> tag with the message! Maybe CSS could help me but I don't know how?

Thanks..
Attached Images
File Type: png reply.png (16.5 KB, 15 views)
File Type: jpg AlexPm.jpg (63.5 KB, 12 views)

Last edited by Monie; November 13th, 2007 at 09:43 PM..
Monie is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Old November 14th, 2007, 03:10 AM   #5
Elite Veteran
 

Join Date: Jul 2007
Location: Webforumz 24/7
Age: 17
Posts: 3,799
Blog Entries: 9
Thanks: 2
Thanked 3 Times in 3 Posts
Rep Altering Power: 0 alexgeek is a name known to all alexgeek is a name known to all alexgeek is a name known to all alexgeek is a name known to all alexgeek is a name known to all alexgeek is a name known to all
Re: Formatting Passed Value Within ASP Page In Textarea?

Well in PHP it would be like:
Code:
$q str_replace("[quote]""<div class=\"quote\">from <strong>AlexGeek</strong><div>Original message"$quote);
$q str_replace("[/quote]""</div></div>"$q);
echo 
$q
Something like that?
__________________
Web Design and Development Blog

Alex Perry
Technical Administrator.
alexgeek is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Old November 14th, 2007, 05:21 AM   #6
WebForumz Member
 

Join Date: Sep 2007
Location: Wales, UK
Age: 37
Posts: 91
Thanks: 1
Thanked 0 Times in 0 Posts
Rep Altering Power: 0 robbied72 will become famous soon enough robbied72 will become famous soon enough
Re: Formatting Passed Value Within ASP Page In Textarea?

Hi Monie, I have expanded on Alex's PHP example in ASP:

HTML Code:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>.:: ASP [quote] replace example ::.</title>
<style type="text/css">
<!--
#quote {
    width: 95%;
    border-top-width: 1px;
    border-right-width: 1px;
    border-bottom-width: 1px;
    border-left-width: 1px;
    border-top-style: solid;
    border-right-style: solid;
    border-bottom-style: solid;
    border-left-style: solid;
    border-top-color: #000000;
    border-right-color: #CCCCCC;
    border-bottom-color: #CCCCCC;
    border-left-color: #000000;
    font-family: Arial, Helvetica, sans-serif;
    font-size:0.8em;
    padding:3px;
}
#quote em {
    color:#FF0000;
}
h5 {
    font-family:Arial, Helvetica, sans-serif;
    font-size:0.7em;
    color:#000;
    margin-bottom:1px;
}
-->
</style>
</head>
<body>
<%
'-----Data colection and replace---------------------------------
'The values below would be collected dynamically, I have placed 
'them statically for this example.
'----------------------------------------------------------------
dim vQuote, vUser
vUser = "alexgeek"
vQuote = "[quote]This is the original message from Alex![/quote]"
vQuote = Replace(vQuote,"[quote]","<em>")
vQuote = Replace(vQuote,"[/quote]","</em>")
%>
<h5>Quote:</h5>
<div id="quote">
<%
'-----Output Quote------------------------------------------------
Response.Write("Originaly Posted by <b>"&vUser&"</b><br />")
Response.Write(vQuote)
%>
</div>
</body>
</html>
Hope this helps

Last edited by Monie; November 27th, 2007 at 03:58 AM..
robbied72 is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Old November 14th, 2007, 05:26 AM   #7
WebForumz Member
 

Join Date: Sep 2007
Location: Wales, UK
Age: 37
Posts: 91
Thanks: 1
Thanked 0 Times in 0 Posts
Rep Altering Power: 0 robbied72 will become famous soon enough robbied72 will become famous soon enough
Re: Formatting Passed Value Within ASP Page In Textarea?

Hi Monie, I have expanded on Alex's PHP example in ASP:

I have attached this in a text file as the code was not displaying properly on the forum as it was displaying quotes as visual quotes if you see what I mean

asp_replace_example.txt

Hope this helps
robbied72 is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Old November 14th, 2007, 09:32 PM   #8
Most Reputable Member
 

Join Date: Feb 2004
Location: Borneo
Age: 28
Posts: 1,628
Blog Entries: 2
Thanks: 0
Thanked 4 Times in 3 Posts
Rep Altering Power: 0 Monie is a jewel in the rough Monie is a jewel in the rough Monie is a jewel in the rough Monie is a jewel in the rough
Re: Formatting Passed Value Within ASP Page In Textarea?

Thanks Alex. Thanks Robbied. This sound promising to me! Another new programming knowledge! Let me try them first and let you guys informed soon
Monie is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Old November 16th, 2007, 02:55 AM   #9
Elite Veteran
 

Join Date: Jul 2007
Location: Webforumz 24/7
Age: 17
Posts: 3,799
Blog Entries: 9
Thanks: 2
Thanked 3 Times in 3 Posts
Rep Altering Power: 0 alexgeek is a name known to all alexgeek is a name known to all alexgeek is a name known to all alexgeek is a name known to all alexgeek is a name known to all alexgeek is a name known to all
Re: Formatting Passed Value Within ASP Page In Textarea?

Thanks Rob, I didn't know of any replace functions in ASP.
__________________
Web Design and Development Blog

Alex Perry
Technical Administrator.
alexgeek is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Old November 16th, 2007, 04:44 AM   #10
WebForumz Member
 

Join Date: Sep 2007
Location: Wales, UK
Age: 37
Posts: 91
Thanks: 1
Thanked 0 Times in 0 Posts
Rep Altering Power: 0 robbied72 will become famous soon enough robbied72 will become famous soon enough
Re: Formatting Passed Value Within ASP Page In Textarea?

Quote:
Originally Posted by alexgeek View Post
Thanks Rob, I didn't know of any replace functions in ASP.
Your welcome mate, If you have a look at the following site it will show you many of the functions you can use in ASP:-

http://www.haneng.com/FunctionSearch.asp
robbied72 is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Old November 17th, 2007, 03:16 AM   #11
Most Reputable Member
 

Join Date: Feb 2004
Location: Borneo
Age: 28
Posts: 1,628
Blog Entries: 2
Thanks: 0
Thanked 4 Times in 3 Posts
Rep Altering Power: 0 Monie is a jewel in the rough Monie is a jewel in the rough Monie is a jewel in the rough Monie is a jewel in the rough
Re: Formatting Passed Value Within ASP Page In Textarea?

Thanks robbied for the link.
Monie is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Old November 27th, 2007, 04:01 AM   #12
Most Reputable Member
 

Join Date: Feb 2004
Location: Borneo
Age: 28
Posts: 1,628
Blog Entries: 2
Thanks: 0
Thanked 4 Times in 3 Posts
Rep Altering Power: 0 Monie is a jewel in the rough Monie is a jewel in the rough Monie is a jewel in the rough Monie is a jewel in the rough
Re: Formatting Passed Value Within ASP Page In Textarea?

Wow, brilliant code there! If only we have the rep points..
Monie is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Old November 27th, 2007, 04:32 AM   #13
WebForumz Member
 

Join Date: Sep 2007
Location: Wales, UK
Age: 37
Posts: 91
Thanks: 1
Thanked 0 Times in 0 Posts
Rep Altering Power: 0 robbied72 will become famous soon enough robbied72 will become famous soon enough
Re: Formatting Passed Value Within ASP Page In Textarea?

What has happened to everyones rep points?
robbied72 is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Old November 27th, 2007, 09:52 AM   #14
WebForumz Admin Badge
SuperMember
 
Marc's Avatar
 

Join Date: Apr 2007
Location: Scotland, UK
Posts: 2,086
Thanks: 2
Thanked 23 Times in 23 Posts
Rep Altering Power: 89 Marc is just really nice Marc is just really nice Marc is just really nice Marc is just really nice
Re: Formatting Passed Value Within ASP Page In Textarea?

http://www.webforumz.com/webforumz-c...to-the-rep.htm - Have a look there Robbie.
__________________
Regards
Marc
Administrator - Webforumz.com

Web Design and Development Blog - Marc Fraser
Marc is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Old November 27th, 2007, 09:59 AM   #15
WebForumz Member
 

Join Date: Sep 2007
Location: Wales, UK
Age: 37
Posts: 91
Thanks: 1
Thanked 0 Times in 0 Posts
Rep Altering Power: 0 robbied72 will become famous soon enough robbied72 will become famous soon enough
Re: Formatting Passed Value Within ASP Page In Textarea?

Quote:
Originally Posted by Marc View Post
Ah, thanks mate, it all makes sense now
robbied72 is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Old November 27th, 2007, 07:57 PM   #16
Most Reputable Member
 

Join Date: Feb 2004
Location: Borneo
Age: 28
Posts: 1,628
Blog Entries: 2
Thanks: 0
Thanked 4 Times in 3 Posts
Rep Altering Power: 0 Monie is a jewel in the rough Monie is a jewel in the rough Monie is a jewel in the rough Monie is a jewel in the rough
Re: Formatting Passed Value Within ASP Page In Textarea?

I hope there will be a good replacement for this
Monie is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
information passed from servlet to JSP pesho318i Other Languages 1 May 26th, 2008 02:22 PM
Passed Aesir The Café 1 April 21st, 2008 03:46 PM
Textarea errors pritmadlani HTML, XHTML and CSS 2 April 3rd, 2008 04:58 PM
transorm xml in textarea scribble Other Languages 0 November 29th, 2006 07:18 PM
Controlling Textarea Size With CSS xKillswitchx HTML, XHTML and CSS 2 March 4th, 2006 02:11 AM


Search Engine Optimization by vBSEO 3.2.0 RC8