Welcome, Guest. Please Login or Register.
May 7th, 2024, 7:53am

Home Home Help Help Search Search Members Members Login Login Register Register
Arimaa Forum « Javascript vs. Flash Client »


   Arimaa Forum
   Arimaa
   Site Discussion
(Moderator: supersamu)
   Javascript vs. Flash Client
« Previous topic | Next topic »
Pages: 1 2  Reply Reply Notify of replies Notify of replies Send Topic Send Topic Print Print
   Author  Topic: Javascript vs. Flash Client  (Read 2793 times)
dree12
Forum Senior Member
****



Arimaa player #4082

   


Gender: male
Posts: 27
Re: Javascript vs. Flash Client
« Reply #15 on: Jul 10th, 2011, 8:42pm »
Quote Quote Modify Modify

Code:
function makeUnselectable(node) {
    node.style.MozUserSelect = "none";
    var child = node.childNodes;
    for (i=0;i<child.length;i++) {
        if (child[i].style) makeUnselectable(child[i]);
    }
}
if (document.body.style.MozUserSelect) {
    makeUnselectable(document.getElementById("boardspan"))
}

A small improvement for other browsers' sake, and slight optimization. Untested, but should work.
[Edit: grammer]
[Edit2: maybe this will be better:
(in external stylesheet) Code:

.moznoselect {-moz-user-select: none}

(in script) Code:
[code]
function makeUnselectable(node) {
    node.className += node.className ? " moznoselect" : "moznoselect";
    var child = node.childNodes;
    for (i=0;i<child.length;i++) {
        if (child[i].style) makeUnselectable(child[i]);
    }
}
if (document.body.style.MozUserSelect) {
    makeUnselectable(document.getElementById("boardspan"))
}
]
« Last Edit: Jul 10th, 2011, 8:50pm by dree12 » IP Logged
Nazgand
Forum Guru
*****



Arimaa player #6461

   
Email

Gender: male
Posts: 87
Re: Javascript vs. Flash Client
« Reply #16 on: Jul 11th, 2011, 1:05am »
Quote Quote Modify Modify

Looks Good. Looks Great!
IP Logged
omar
Forum Guru
*****



Arimaa player #2

   


Gender: male
Posts: 1003
Re: Javascript vs. Flash Client
« Reply #17 on: Jul 17th, 2011, 12:35pm »
Quote Quote Modify Modify

Using FF 5.0 on Windows 7, I can't get the squares to be selected.
IP Logged
Nazgand
Forum Guru
*****



Arimaa player #6461

   
Email

Gender: male
Posts: 87
Re: Javascript vs. Flash Client
« Reply #18 on: Jul 18th, 2011, 8:38am »
Quote Quote Modify Modify

I cleared my entire firefox(5.0) history, and it still looks like this:

After pressing Ctrl+Shift+K and entering the code I posted, I get this:
I am curious as to why it is working in firefox for you,(perhaps you coded it to work correctly in both firefox and chrome, but after it got stuck in cache you accidentally changed it to a chrome-only fix), but it is not working for everyone. I suppose we could just tell them all to use chrome though.
 
Edit: I also tested IE9.0, and it doesn't work there either.
« Last Edit: Jul 18th, 2011, 8:50am by Nazgand » IP Logged
dree12
Forum Senior Member
****



Arimaa player #4082

   


Gender: male
Posts: 27
Re: Javascript vs. Flash Client
« Reply #19 on: Jul 18th, 2011, 5:37pm »
Quote Quote Modify Modify

It should work fine in IE9, except for the fact that the gameroom window is pushed to quirks mode. Fixing this issue may be a even bigger issue, since it would require doing a lot of modifications. First, <center> is no longer a tag. Second, a <!DOCTYPE > is needed. There are no doubt countless other problems, which arguably could be a problem either with IE9 or the page itself.
IP Logged
Swynndla
Forum Guru
*****



Arimaa player #1821

   


Posts: 235
Re: Javascript vs. Flash Client
« Reply #20 on: Jul 18th, 2011, 6:29pm »
Quote Quote Modify Modify

For what it's worth, google-chrome (12.0) on linux works fine (no blue squares) ... but you probably already know that.
IP Logged
Pages: 1 2  Reply Reply Notify of replies Notify of replies Send Topic Send Topic Print Print

« Previous topic | Next topic »

Arimaa Forum » Powered by YaBB 1 Gold - SP 1.3.1!
YaBB © 2000-2003. All Rights Reserved.