![]() ![]() The second piece will be executed only in chrome instead: if ((). The document.write line will be executed in every browser. Is like your code: you can see the semicolon at the end of the if line. The first piece of code: if (().indexOf('you can write everything yo.') > -1) ĭocument.write('rendered in every browser.') simply open the page and check the result in the bottom right box. Hi Charlynne, except of your enviroment, Arachnophilla or whatever you'd like to use, I'm talking about a general programming rule. Perhaps it's got something to do with parameters passed by Arachnophilia and has nothing to do with your solution, I simply don't know. To be honest, I am a little confused now. However, when I go into the windows file explorer and open the file directly from there (right click), it works perfectly on both browsers just like my old version did. I am talking about launching the IE directly from Arachnophilia. Today I again opened my modified file, loaded it directly from Arachnophilia and it didn't work. This was the day you posted your solution. Following has happened: The first time I tried it, it worked. What I did in the meantime was to give you the benefit of the doubt, omit my solution, take your solution and try it out. Again, I created my solution to work for Chrome and the IE9. Matteo, Thanks again and sorry for only replying now. Or you can simply verify that the css will be added also in firefox e.g. If you want you can verify what I'm saying by adding an alert message after the semicolumn. But the same css will be added also in other browsers. So, in your case, if you check only the behaviour in chrome, everything seems ok. The lines that follows the if will be executed regardless. So, the if condition is checked but completely ignored. ![]() Usually an if condition has this structure: if(some condition will be satisfied) I think you might be making a mistake, with the semicolumn at the end of the "if" line, the script works but not with the behaviour you're expecting. The impact of this work is the design and making of new materials, new art and music, and a deep mathematical understanding of. Buehler, Department Head and McAfee Professor of Engineering at MIT. My solution also works, seems there is more than one way to skin the proverbial cat. On Friday, July 12th between 11 AM and 1 PM, Studio Tomás Saraceno hosted the first Arachnophilia Meeting with esteemed collaborator Markus J. JS does not require you to end with a semicolon, but the code still works if you include them. I prefer using semicolons at the end, old programming habit. ![]()
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |