inherit
136262
0
Jun 24, 2013 21:59:18 GMT -8
nowdocking
1,086
January 2009
nowdocking
|
Post by nowdocking on Jan 9, 2010 6:37:11 GMT -8
|
|
inherit
Official Code Helper
65613
0
1
Apr 15, 2024 17:01:41 GMT -8
Chris
"'Oops' is the sound we make when we improve"
8,870
December 2005
horace
|
Post by Chris on Jan 9, 2010 23:12:19 GMT -8
I just did a test and for reasons unknown (as yet) the following line in that code is not returning the expected result:
function removeImg() { var re = mes[0].innerHTML; re = re.replace(/\[img(.+?)?\].+?\[\/img\]/gi,'') mes[0].innerHTML = re; }
After ruling out the usual event and global variable naming conflict (two codes by Ross are actually using the exact same name for a variable), the only thing I can see is probably the non-standard method of accessing the textarea contents. So try changing that red line to
var re = mes[0].value;
|
|
inherit
136262
0
Jun 24, 2013 21:59:18 GMT -8
nowdocking
1,086
January 2009
nowdocking
|
Post by nowdocking on Jan 10, 2010 23:14:48 GMT -8
Thanks, Eton.
I changed it, then logged out and put a picture in a message box. I didn't attempt to post it, but Previewed it and the picture showed.
Can you think of anything else that might keep it from working?
Thanks.
|
|
inherit
Official Code Helper
65613
0
1
Apr 15, 2024 17:01:41 GMT -8
Chris
"'Oops' is the sound we make when we improve"
8,870
December 2005
horace
|
Post by Chris on Jan 11, 2010 7:49:39 GMT -8
I should have given you two mods. This line which is 2 lines below the red line in my previous post would also need to be converted from innerHTML to value
mes[0].innerHTML = re;
change to:
mes[0].value = re;
|
|
inherit
136262
0
Jun 24, 2013 21:59:18 GMT -8
nowdocking
1,086
January 2009
nowdocking
|
Post by nowdocking on Jan 11, 2010 8:55:11 GMT -8
Hey hey -- that did the trick!
Thanks, Eton. You came through again.
|
|