Welcome to WebmasterWorld Guest from 54.226.23.160

Forum Moderators: open

Message Too Old, No Replies

Is there a way to add a "quote" button?

Such as adding some HTML to the top of the page?

     
5:54 pm on Oct 19, 2003 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:Jan 17, 2003
posts:1947
votes: 0


I see we can add a chunk of HTML to our WW pages. Can this be used to add a chunk of code to add a button to make quoting easier?

TIA

6:12 pm on Oct 19, 2003 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:Apr 3, 2003
posts:1633
votes: 0


Can this be used to add a chunk of code to add a button to make quoting easier?

There's nothing a bit of JavaScript can't do.


<input type="button" value="Quick Quote" onclick="javascript:text=(document.all)? document.selection.createRange().text : document.getSelection();document.all.post.value = document.all.post.value + '[qu0te]' + text + '[/qu0te]';">

Replace "qu0te" with "quote" of course, disable style codes doesn't seem to work...

Then highlight text to be quoted and hit the button.

6:28 pm on Oct 19, 2003 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:July 26, 2003
posts:881
votes: 0


You could also make it a 'scriptlet'...

javascript:(function(){ var text = window.getSelection(), post = document.getElementsByTagName('textarea')[0]; post.value = post.value + ' [qu0te]' + text + '[/qu0te] '; })();

Jordan

6:34 pm on Oct 19, 2003 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:Apr 3, 2003
posts:1633
votes: 0


Version 2.0

Only visible on the reply to post page...


<input name='qq' style='display:none' type="button" value="Quick Quote" onclick="javascript:text=(document.all)? document.selection.createRange().text : document.getSelection();document.all.post.value = document.all.post.value + '[qu0te]' + text + '[/qu0te]';"><script type='text/javascript'>var t=new String(window.location);if(t.indexOf("edpost",0)>0){document.all.qq.style.display="inline";}</script>
 

Join The Conversation

Moderators and Top Contributors

Hot Threads This Week

Featured Threads

Free SEO Tools

Hire Expert Members