Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Snitz Forums 2000 DEV-Group
 DEV Discussions (General)
 Formatting Icons in Netscape & Opera
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

aspwiz
Junior Member

250 Posts

Posted - 13 November 2003 :  09:33:57  Show Profile  Visit aspwiz's Homepage
In IE, when you select text and click on the Bold icon, it wraps the selected text up in [ b] and [ /b] tags as you would expect... but in opera and netscape, it adds the tags to the end of the message!!!

I've done a search and looked in the archives, and can't see any topic referencing this.

Is this something that the development team is aware of?

Are there any fixes in existence or indeed, any planned?

Cheers,

Edited by - Davio on 13 November 2003 10:25:50

HuwR
Forum Admin

United Kingdom
20584 Posts

Posted - 13 November 2003 :  10:19:16  Show Profile  Visit HuwR's Homepage
sorry, but this isn't a bug, opera and netscape do not support the forums insert feature.

It may however be possible to enable it for Mozilla 1.3+ and Netscape 7.1 as discussed below.
Go to Top of Page

Nathan
Help Moderator

USA
7664 Posts

Posted - 13 November 2003 :  20:19:11  Show Profile  Visit Nathan's Homepage
At the time that was implemented in Snitz other browsers didn't support script manipulation of textarea elements. Though not a bug, it may be something that could be considered for future versions.

Some of the newer Gecko based browsers do support this functionality. Here's some example code I found and tested in firebird.

<script>
function inserttext(myTA, texttoinsert) {
myTA.value = myTA.value.substring(0,myTA.selectionStart) + texttoinsert + myTA.value.substring(myTA.selectionStart,myTA.value.length) 
}
</script> 
<div onclick="inserttext(document.getElementById('mytextarea'),'text to insert')">
insert now
</div>
<textarea id="mytextarea" cols="40" rows="4"></textarea>

Nathan Bales
CoreBoard | Active Users Download

Edited by - Nathan on 13 November 2003 21:29:53
Go to Top of Page

Nathan
Help Moderator

USA
7664 Posts

Posted - 13 November 2003 :  20:57:35  Show Profile  Visit Nathan's Homepage
I just uploaded that code I posted to here -> http://www.ls3k.com/Random/test.html

It works both in IE6 and Mozilla Firebird 0.7 which are the two browsers I have installed. If you dont believe me try it.<edit> Yeah, I was wrong, it only works in Mozilla/Firebird.

Nathan Bales
CoreBoard | Active Users Download

Edited by - Nathan on 13 November 2003 21:28:54
Go to Top of Page

RichardKinser
Snitz Forums Admin

USA
16655 Posts

Posted - 13 November 2003 :  21:12:13  Show Profile
quote:
Originally posted by Nathan

Sorry, I beg to differ again.

I just uploaded that code I posted to here -> http://www.ls3k.com/Random/test.html

It works both in IE6 and Mozilla Firebird 0.7 which are the two browsers I have installed. If you dont believe me try it.

I'm only saying that Mozilla has the functionality, I'm not saying its a problem that it hasn't been implmented in Snitz. (Though I would very much like to see it added, as would many other Mozilla users.)

just tried that page in IE6 and it inserts the text at the end, not where the cursor is. And, it's inserting more text each time.

First time I press to insert the text it looks like this:

text to insert

next time it now looks like:

text to inserttext to inserttext to insert

and then the next time it looks like this:

text to inserttext to inserttext to inserttext to inserttext to inserttext to inserttext to insert

and so on....
Go to Top of Page

Nathan
Help Moderator

USA
7664 Posts

Posted - 13 November 2003 :  21:14:32  Show Profile  Visit Nathan's Homepage
quote:
just tried that page in IE6 and it inserts the text at the end, not where the cursor is.

Really? It works in my IE6. Build 2800.1106. Do you have a differnt version?

Try typing a whole string of letter 'f's, then put the cursor in the middle and click the link.

Nathan Bales
CoreBoard | Active Users Download

Edited by - Nathan on 13 November 2003 21:15:15
Go to Top of Page

Nikkol
Forum Moderator

USA
6907 Posts

Posted - 13 November 2003 :  21:20:01  Show Profile
i have same version as you Nathan and I get the results Richard does. when I do as you say (I typed 6 f's and put the cursor in the middle), I get:

fffffftext to insertffffff

Nikkol ~ Help Us Help You | ReadMe | 3.4.03 fixes | security fixes ~
Go to Top of Page

RichardKinser
Snitz Forums Admin

USA
16655 Posts

Posted - 13 November 2003 :  21:20:39  Show Profile
I've got the same build.

trying again.

I typed 20 f characters:

ffffffffffffffffffff

I placed the cursor right after the 10th f (so right in the middle) and then clicked on the link to insert the text, here is what is now in the textarea:

fffffffffffffffffffftext to insertffffffffffffffffffff
Go to Top of Page

HuwR
Forum Admin

United Kingdom
20584 Posts

Posted - 13 November 2003 :  21:22:38  Show Profile  Visit HuwR's Homepage
quote:

It works in my IE6. Build 2800.1106


doesn't in mine, same version as yours, does what Richard's does.
Go to Top of Page

Nathan
Help Moderator

USA
7664 Posts

Posted - 13 November 2003 :  21:24:10  Show Profile  Visit Nathan's Homepage
Yeah, I didn't count my f's. I guess thats the grade I get for this example.

So this isn't IE/Gecko universal code, but it does work properly in Gecko(Firbird). Might require some browser spacific Javascript to get one code to work for all.

Nathan Bales
CoreBoard | Active Users Download
Go to Top of Page

HuwR
Forum Admin

United Kingdom
20584 Posts

Posted - 13 November 2003 :  21:48:53  Show Profile  Visit HuwR's Homepage
this should work, but will need a browser check.


function mozAddText(txtarea, open, close) 
{ 
   var selLength = txtarea.textLength; 
   var selStart = txtarea.selectionStart; 
   var selEnd = txtarea.selectionEnd; 
   if (selEnd == 1 || selEnd == 2) 
      selEnd = selLength; 

   var s1 = (txtarea.value).substring(0,selStart); 
   var s2 = (txtarea.value).substring(selStart, selEnd) 
   var s3 = (txtarea.value).substring(selEnd, selLength); 
   txtarea.value = s1 + open + s2 + close + s3; 
   return; 
}
function AddText(text) { 
   if (is_ie) 
   { 
      if (document.post.message.createTextRange && document.post.message.caretPos) { 
         var caretPos = document.post.message.caretPos; 
         caretPos.text = caretPos.text.charAt(caretPos.text.length - 1) == ' ' ?   text + ' ' : text; 
      } 
      else document.post.message.value += text; 
      document.post.message.focus(caretPos); 
   } 
   else 
   { 
      mozAddText(document.post.message, text, ''); 
   } 

}
Go to Top of Page

aspwiz
Junior Member

250 Posts

Posted - 14 November 2003 :  10:17:41  Show Profile  Visit aspwiz's Homepage
I'm getting excited....

This looks to be moving toward a fix, that this bug/issue is screaming for!
Go to Top of Page

HuwR
Forum Admin

United Kingdom
20584 Posts

Posted - 14 November 2003 :  10:58:49  Show Profile  Visit HuwR's Homepage
it is not a bug, and therefore does not require a fix.
Go to Top of Page

Nathan
Help Moderator

USA
7664 Posts

Posted - 14 November 2003 :  11:02:38  Show Profile  Visit Nathan's Homepage
quote:
Originally posted by aspwiz

This looks to be moving toward a fix, that this bug/issue is screaming for!



The origional Snitz code was never intended to work in anything other than IE, so its not a bug.

I suppose it could be implmented as a micro-mod for those who want it now. I'll look into doing that later today.

Nathan Bales
CoreBoard | Active Users Download
Go to Top of Page

aspwiz
Junior Member

250 Posts

Posted - 15 November 2003 :  10:29:46  Show Profile  Visit aspwiz's Homepage
Thanks Nathan!!!

Sweet!
Go to Top of Page

Nathan
Help Moderator

USA
7664 Posts

Posted - 16 November 2003 :  02:03:54  Show Profile  Visit Nathan's Homepage
Ok, here it is: http://forum.snitz.com/forum/topic.asp?TOPIC_ID=49230

Nathan Bales
CoreBoard | Active Users Download
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Topic Locked
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.19 seconds. Powered By: Snitz Forums 2000 Version 3.4.07