MyBB Community Forums

Full Version: Quoting bug
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
in template showthread_quickreply

<a href="#"  href="javascript:Thread.loadMultiQuoted();">{$lang->quickreply_multiquote_now}<\/a>

in some enviroment will make the link goes on a new blank page with word false in it

to fix the problem this maybe changed to

<a href="#"  onclick="Thread.loadMultiQuoted();return false;">{$lang->quickreply_multiquote_now}<\/a>

see discusion about his on

JavaScript function in href vs. onclick - Stack Overflow
I agree - it would be good to change it
Not sure how we handle that in other places but IMHO this should be changed.
The template looks like this to me:
<a href="javascript:Thread.multiQuote({$post['pid']});"

That should work without any problems. Though it's not the best style it shouldn't redirect to any page. If someone thinks changing this feel free to comment. Also note that at least the report button looks the same.
It's not about looking differently.. return false; in onclick ensures indentical proper behavior in all browsers. Read:
http://stackoverflow.com/a/11348403
http://stackoverflow.com/a/138233
IMO it should be fixed wherever possible. But with a very low priority.
I dislike the usage of # as the href value. If it is not an anchor then use other tag.
As said "#" isn't used anymore, that was changed in 1.8.0
href="javascript:void(0)" onclick="doSomethingWithJS(); return false"
should be rather used.
There seem to have been changes related to this however can someone confirm that there are more places where similar issues should be fixed?
Pages: 1 2