Avatar

BBCodes and JavaScript, Search (Bugs)

by Alfie ⌂, Vienna, Austria, Saturday, September 22, 2007, 13:02 (6054 days ago)

Hi Alex,

just realised, that Buttons to insert BBCodes into a message right to the textarea are not functional without JavaScript. I'm currently working on a solution for the 1.7x-branch; see this thread in the German forum.
Currently I was successful for all BBCodes except link/smilies.

The search function is also problematic, e.g., a search for fooxyzbar will give no result, because BBCodes within a word are not stripped prior to the query.

--
Cheers,
Alfie (Helmut Schütz)
BEBA-Forum (v1.8β)

locked
6932 views
Avatar

BBCodes and JavaScript, Search

by Alex ⌂, Saturday, September 22, 2007, 14:23 (6054 days ago) @ Alfie

Hi Alfie,

just realised, that Buttons to insert BBCodes into a message right to the textarea are not functional without JavaScript.

Yes, that's true and it would be more "clean" to generate them with JavaScript. But I also wonder whether it really makes sense to blow up the code for a negligible amount of users who deactivated JS. Furthermore by default JS is activated in all common browsers and I think if someone deactivates JS he knows what he does and knows about the resulting restrictions. But I agree that all important functions should work without JS!
Without JS the buttons at least show the titles like "Format text in bold: [b]Text[/b]". But if you made it for v. 1.7 we can of course take it up (and also for v. 2 - here it should just be a template issue)!

The search function is also problematic, e.g., a search for fooxyzbar will give no result, because BBCodes within a word are not stripped prior to the query.

Right, should be fixed!

Alex

locked
6172 views
Avatar

BBCodes and JavaScript, Search

by Alex ⌂, Saturday, September 22, 2007, 15:06 (6054 days ago) @ Alfie

Hi again, Alfie,

I'm currently working on a solution for the 1.7x-branch;

What about just putting the buttons into a div with properties display:none; and then switching it with JS to display:block;?

Alex

locked
6182 views
Avatar

BBCodes and JavaScript, Search

by Alex ⌂, Saturday, September 22, 2007, 15:18 (6054 days ago) @ Alex

What about just putting the buttons into a div with properties display:none; and then switching it with JS to display:block;?

Shouldn't it work like this:

<div id="jsbuttons" style="display:none;">
<!-- JS Buttons... -->
</div>
<script type="text/javascript">/* <![CDATA[ */
document.getElementById('jsbuttons').style.display="block";
/* ]]> */</script>
<noscript>
<!-- Non JS explanations...... --> 
</noscript>

EDIT:
Now implemented here for testing.

locked
6097 views
Avatar

BBCodes and JavaScript, Search

by Alfie ⌂, Vienna, Austria, Sunday, September 23, 2007, 11:51 (6053 days ago) @ Alex

Hi Alex!

Shouldn't it work like this:
...
Now implemented here for testing.

Yes, looks great! I will try to get it working for 1.7.3 also... ;-)

--
Cheers,
Alfie (Helmut Schütz)
BEBA-Forum (v1.8β)

locked
6072 views

RSS Feed of thread