|
Post by Rodak on Jul 7, 2006 9:37:10 GMT -5
That's Anti-Semantism!
(I've been waiting for a good chance to use that Joke!)
|
|
|
Post by thetruecoolness on Jul 7, 2006 17:52:15 GMT -5
Haha. I could put up some truly cool Java stuff as I probably have over 20000 lines, or more, of it on my computer from various school and side projects I've done.
And while were being technical Java is compiled then interpreted, as it gets compiled to byte-code and then that byte-code is interpreted by the virtual machine, which is why you can have catchable exceptions, and write once, run anywhere (well in theory, more like debug everywhere but sometimes you need no changes). But yes Javascript and Java are very different while syntactically similar (though really all of these are based on C). Both are object oriented, while neither are purely object oriented as both contain primitives. Of course Java is much more powerful since it is a general purpose language, and not a web-specific scripting language. I would go one but talking about languages is pretty dry, though you do learn some interesting things along the way.
So now you know, and knowing is half the battle (though more like 1/4 for programming, as just knowing the language doesn't mean you can use it effectively).
|
|
|
Post by Doan the Nado on Jul 7, 2006 18:32:34 GMT -5
Doan; I saved both versions of the posted icon above (Your's and the Yellow A Version) as .ico files! I can easily rename the one you like favicon.ico and send it to you. Then use that Truly Cool Java Stuff also poste in this thread and you're set! Let me know if you're interested... Peace. The reason that I used the colors I did was that it matched the color scheme of the message board. The yellow is definitely easier to see, but it doesn't have a counterpart on the message boards. I would like to try fixing up the one I made a little bit more to see if I can make it any clearer without changing the colors. If that doesn't work, I'll consider the one you came up with. As for the code that truecoolness posted, that is well and good for a personal website, but I do not have access to the "head" portion of the document on this page. All I can do is add some code at the top or bottom of the body. Much of the customizations on this board are mainly javascript hacks on the pre-existing DOM. There may be a way to use such a method to get into the head, but I haven't taken the time to figure that out yet. edit: Oh yeah, DOM means "Document Object Model" and is basically a hierarchy of representation of the pieces of a webpage. Javascript can be used to modify the way that a browser interprets a page's written DOM.
|
|
|
Post by thetruecoolness on Jul 7, 2006 19:31:11 GMT -5
Depending on how it is done you could write out the entire HTML using Javascript by using document.open("text/html", "replace"). I haven't played around with it enough to know if it will rewrite the whole document or not, of course that would be a lot of work, but it would allow you to edit the head. There is also the createElement(tag) method but I don't know how that works.
|
|
|
Post by Doan the Nado on Jul 7, 2006 20:47:54 GMT -5
I think I might be able to do something like:
var head = document.getElementByTagName('head'); head[0].innerHTML = head[0].innerHTML + stuffToAddToTheHead;
but I haven't tested that yet, and the idea of writing javascript inside itself makes my head hurt.
|
|
|
Post by thetruecoolness on Jul 7, 2006 21:33:22 GMT -5
Yeah it's one of those things that's possible, but probably not really a great idea. But really you would just use the Javascript to figure out the whole HTML to write out then write that to the document. But your idea might work too, and be much easier to understand and implement.
edit Haha success
var head = document.getElementsByTagName("head"); var stuffToAddToTheHead = ""; var faviconSrc = ""; var type = ""; if (navigator.appName== "Microsoft Internet Explorer") { faviconSrc = "favicon.ico"; type="image/x-icon"; } else if (navigator.appName== "Opera") { faviconSrc = "youricon.gif"; type="image/gif"; } else if (navigator.appName== "Netscape") { faviconSrc = "youricon.gif"; type="image/gif"; } stuffToAddToTheHead += "<link rel=\"icon\" href=\"" + faviconSrc + "\" type=\"" + type + "\" />"; stuffToAddToTheHead += "<link rel=\"shortcut icon\" href=\"" + faviconSrc + "\" type=\"" + type + "\" />"; head[0].innerHTML = head[0].innerHTML + stuffToAddToTheHead;
Put that in the body of my page to test and it works.
|
|
|
Post by Rodak on Jul 8, 2006 4:06:16 GMT -5
The reason that I used the colors I did was that it matched the color scheme of the message board. The yellow is definitely easier to see, but it doesn't have a counterpart on the message boards. I would like to try fixing up the one I made a little bit more to see if I can make it any clearer without changing the colors. If that doesn't work, I'll consider the one you came up with. Howzabout Dat? Just switched the harder to see color to the easier make out shape! Another idea would be to use the blue from your member name. I'm a better designer than programmer! But I like to think I can do both...
|
|
|
Post by realitybites on Jul 8, 2006 15:11:18 GMT -5
Thats good, its very easy to read.
|
|
|
Post by Doan the Nado on Jul 9, 2006 2:37:09 GMT -5
Wow, you guys are creating all my solutions for me! I'll be updating this very soon, along with a nice little surprise...
|
|
|
Post by Doan the Nado on Jul 15, 2006 19:13:25 GMT -5
Okay, I took Rodak's idea, made the letters a little bit bigger, and now we have our new favicon.ico file. You may need to empty your cache (or Temporary Internet Files) before you'll be able to see it.
Edit: By the way, truecoolness, I tried that code that you just gave me, and it works just fine in Firefox, but in IE, it gives a Javascript error saying that head[0] does not have the innerHTML property. So I'm still in the same boat in that it doesn't work in IE. Also, I noticed you were using \" in your javascript. You do know that you can say: document.write('<a href="somesite.com">'); right? I did the same thing at first, coming from a Java programming background, but you can use either ' or " to delimit strings in Javascript, and whichever you use, you don't need to escape the non-delimiter. It's nice to avoid writing all those backslashes.
|
|
|
Post by Rodak on Jul 16, 2006 3:04:58 GMT -5
Well I can read it now, and my eyes are Old and Bent!!
Much Better.
Interesting thing is that it shows the new way in the browser, but the bookmarks won't refresh.
I had to bookmark it twice, and have one with each icon.
Then delete the old one.
Bizarre!
|
|
|
Post by Doan the Nado on Jul 16, 2006 9:33:06 GMT -5
Yeah, that happened to me, too. Must be some kind of Firefox glitch, I guess. It's easy enough to fix, though it does make me wonder if some of my bookmarks for other sites are also outdated.
|
|