GUI

This is a discussion on "GUI" within the Classic ASP section. This forum, and the thread "GUI are both part of the Program Your Website category.



Go Back   Webforumz.com > Main Forums > Program Your Website > Classic ASP

Notices


Closed Thread
 
LinkBack Thread Tools
  #1 (permalink)  
Old Oct 13th, 2004, 12:10
Most Reputable Member
Join Date: Feb 2004
Location: Borneo
Age: 27
Posts: 1,608
Blog Entries: 2
Thanks: 0
Thanked 4 Times in 3 Posts
Send a message via Yahoo to Monie
GUI

I am wondering how to do the BOLD, ITALIC, UNDERLINE function that webforums have?
Let say I have a form which the user able to fill in their comment about anything...

I want to provide them the basic function (at the top of the <textarea>) such as to make a text BOLD, ITALIC, UNDERLINE etc,
with each function have their own GUI.

How to achieve this?
At the current time, I just provide the user with text explaination like this:

PLEASE PUT ""YOUR TEXT"" TO MAKE YOUR TEXT BOLD.
PLEASE PUT "<U>"YOIUR TEXT"</U>" TO MAKE YOUR TEXT UNDERLINE....etc.

This is very difficult for the user to follow
I have been searching to find how to apply this method to my page but I ended up with nothing

Any idea
What is the javascript name for that?
(If I want to search in the internet for the coding)
Last Blog Entry: ASP Programming Tips and Technique (Oct 26th, 2007)

  #2 (permalink)  
Old Oct 13th, 2004, 12:26
Highly Reputable Member
Join Date: Jul 2003
Location: Ipswich, UK
Posts: 690
Thanks: 0
Thanked 0 Times in 0 Posts
its a web based rich text editor, check it out: http://www.google.co.uk/search?q=ric...or&hl=en&meta=
  #3 (permalink)  
Old Oct 14th, 2004, 02:27
Most Reputable Member
Join Date: Feb 2004
Location: Borneo
Age: 27
Posts: 1,608
Blog Entries: 2
Thanks: 0
Thanked 4 Times in 3 Posts
Send a message via Yahoo to Monie
Hey.. I found this simple javascript code for RTE.
It uses the text as the control. What the code does is it changes the text attributes in the <div>. How about if i want to change the <div> to a <textarea>?

I tried to change it like this but it didn't work!
<textarea CONTENTEDITABLE="true">The text in this page is editable.</textarea>

Code: Select all
<html>
<head>
<title>editablepageexample</title>    

<script>    
function b(){
    document.execCommand("Bold", false, null);
    }    
function i(){
    document.execCommand("Italic", false, null);
    }
function r(){
    document.execCommand("ForeColor", false, "red");
    }    
</script>
</head>

<body>

<div CONTENTEDITABLE="true">The text in this page is editable.
</div>

bold
red
italic




</body>
</html>
Last Blog Entry: ASP Programming Tips and Technique (Oct 26th, 2007)
  #4 (permalink)  
Old Oct 14th, 2004, 08:37
Rob's Avatar
Rob Rob is offline
Head Admin & CEO

SuperMember
Join Date: Jul 2003
Location: at my desk
Age: 34
Posts: 2,952
Blog Entries: 7
Thanks: 7
Thanked 4 Times in 4 Posts
Send a message via MSN to Rob Send a message via Skype™ to Rob
LOL!!!

monie..... you can only do it via a DIV... and only in Internet Explorer (At least, the way you are trying)

Have a look at the source code and javascripts of this forum... it should be simple enough to edit so it produces HTML instead of Forum code.
__________________
Rob - SEO Specialist
Owner & Founder of Webforumz.com

I am currently unavailable for private work
  #5 (permalink)  
Old Oct 15th, 2004, 02:01
Most Reputable Member
Join Date: Feb 2004
Location: Borneo
Age: 27
Posts: 1,608
Blog Entries: 2
Thanks: 0
Thanked 4 Times in 3 Posts
Send a message via Yahoo to Monie
LOL...
Ok...I have found a nice code here...

Currently I am using this code to make the selected text to be a hyperlink

'+AnyWebAddress+'

This works well if the user enter any address without the http:// header!
If the user enter the web address including the "http://" header,
the link will not be working since there will be two "http://" header inside the link!

I have tried to use the <url> method but it is not working..
<url=\""+txt+"\">"+txt2+"</url> --> code from webforumz

When I type [url] followed by the web address, the output will show the "[]" in my display page.
and I tried to type <url> instead but the link is not active in my display page..

I wonder how webforumz uses the [url] method?
we can just type any web address enclosed with the [url], and then if works! But when I tried inside my textarea, it didn't work:mad:

Can anybody tell me whats wrong with my code?
I dont understand how the <url> method works...???

This is the code that I am using now...
Code: Select all
function hiliteToExternLink(txtArea){
	txtAreaName   = txtArea.name;
	txtRange      = document.all[txtArea].createTextRange();
	txtContainer  = txtRange.parentElement().name;
	
	objRange      = document.selection.createRange();
	hiliteTxt     = objRange.text;

	toExternLink   = '' + hiliteTxt + '';
	
	if(hiliteTxt != ""){
		objRange.text = toExternLink;
	}
}
Last Blog Entry: ASP Programming Tips and Technique (Oct 26th, 2007)
  #6 (permalink)  
Old Oct 15th, 2004, 09:46
Rob's Avatar
Rob Rob is offline
Head Admin & CEO

SuperMember
Join Date: Jul 2003
Location: at my desk
Age: 34
Posts: 2,952
Blog Entries: 7
Thanks: 7
Thanked 4 Times in 4 Posts
Send a message via MSN to Rob Send a message via Skype™ to Rob
Are you trying to do this with client side, or server side Jscript?
__________________
Rob - SEO Specialist
Owner & Founder of Webforumz.com

I am currently unavailable for private work
  #7 (permalink)  
Old Oct 16th, 2004, 02:35
Most Reputable Member
Join Date: Feb 2004
Location: Borneo
Age: 27
Posts: 1,608
Blog Entries: 2
Thanks: 0
Thanked 4 Times in 3 Posts
Send a message via Yahoo to Monie
All the javascript i put inside the <head> tag...
Does that refer to client side programming?
Last Blog Entry: ASP Programming Tips and Technique (Oct 26th, 2007)
  #8 (permalink)  
Old Oct 17th, 2004, 15:08
Rob's Avatar
Rob Rob is offline
Head Admin & CEO

SuperMember
Join Date: Jul 2003
Location: at my desk
Age: 34
Posts: 2,952
Blog Entries: 7
Thanks: 7
Thanked 4 Times in 4 Posts
Send a message via MSN to Rob Send a message via Skype™ to Rob
Hi monie...

Client side programming EXECUTES on the client. Server side programming (eg, ASP, PHP, CGI.. etc) EXECUTES on the server.
__________________
Rob - SEO Specialist
Owner & Founder of Webforumz.com

I am currently unavailable for private work
  #9 (permalink)  
Old Oct 18th, 2004, 03:29
Most Reputable Member
Join Date: Feb 2004
Location: Borneo
Age: 27
Posts: 1,608
Blog Entries: 2
Thanks: 0
Thanked 4 Times in 3 Posts
Send a message via Yahoo to Monie
Ok then...
My programming is in ASP format (intranet)


<blockquote id="quote" class="ffs">quote:<hr height="1" noshade="noshade" id="quote" />'+AnyWebAddress+'<hr height="1" noshade="noshade" id="quote" /></blockquote id="quote">
Last Blog Entry: ASP Programming Tips and Technique (Oct 26th, 2007)
Closed Thread

Tags
gui

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


All times are GMT. The time now is 05:07.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC8
© 2003-2008 Webforumz.com : All Rights Reserved

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43