We hope you enjoy your visit.

You're currently viewing our forum as a guest. This means you are limited to certain areas of the board and there are some features you can't use. If you join our community, you'll be able to access member-only sections, and use many member-only features such as customizing your profile, sending personal messages, and voting in polls. Registration is simple, fast, and completely free.


Join our community!


If you're already a member please log in to your account to access all of our features:

Username:   Password:
Add Reply
BBcode... Good to go for IE not FireFox
Topic Started: Jun 1 2005, 01:48 AM (365 Views)
JCink
Member
[ *  *  *  *  * ]
I'm making a flat-file board, and I added some BBCodes and smileys, and now I am stuck on this.

http://jcinkcom.ho8.com/php/sources/admin/...rum=generalchat

The smileys, and the buttons work great... only on IE. I dont know why.

Example:

Code:
 
<img src="emoticons/13.gif" onclick="document.forms.postbox.message.value=this.document.forms.postbox.message.value+':angry:'">


you can view source if you need to see more. But thats how they're made (the buttons and the bbcode).

Is there anything wrong with this? I suspect it must have something to do with webstandards of sorts...

Thanks,
jcink
Offline Profile Quote Post Goto Top
 
Gornakle
Member
[ *  *  *  *  * ]
Code:
 
<img src="emoticons/13.gif" onclick="document.forms['myform'].elements['message'].value=document.forms['myform'].elements['message'].value+':angry:'">


Where 'myform' is the ID of the form and 'message' the ID of the textarea.
Offline Profile Quote Post Goto Top
 
JCink
Member
[ *  *  *  *  * ]
Got it, thanks. They ALL work now. Thanks for the help, and teaching me about that.
Offline Profile Quote Post Goto Top
 
Gornakle
Member
[ *  *  *  *  * ]
No problem. ;)
The script could be simplified a bit too, to clean up the page a little. For instance:

Code:
 
<script type="text/javascript">
function add_smiley(smiley_code) {
 var post_area = document.getElementById('message');
 post_area.value += smiley_code;
}
</script>
...
onclick="add_smiley(':anger:')"


Or something similar. Just a suggestion.
Offline Profile Quote Post Goto Top
 
1 user reading this topic (1 Guest and 0 Anonymous)
« Previous Topic · Technology Chat · Next Topic »
Add Reply