MyBB Community Forums

Full Version: Problem with displaying in other browsers than Firefox
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello.

I added my own mycode that replaces the regular expression \[item\](.*?)\[/Item\] to the following code:

<script type="text/javascript">
var message="$1";
var items=message.split(",");
for (var i = 0, item; item = items[i]; i++) {
document.write("<img src=http://matrixpna.pl/images/mycode/items/"+item+".png height=32px> ");
}
</script>

This script will display correctly only in Firefox browser:
[Image: 1.png]

while in others it looks like this:
[Image: 2.png]

Does anyone know what might be causing this behavior?