Javascript's Journal
[Most Recent Entries]
[Calendar View]
[Friends View]
Wednesday, April 28th, 2004
| Time |
Event |
| 2:43a |
OK. Here's the deal.
first off, i just joined, hello. I have a problem. Which is why I joined and I need some assistance. I am making my site, and on it, I have a random image js in the head tag that refreshes and then I have a portfolio section, where I have rollover images and the such. The header, is in a dreamweaver template, and I have a editable region for all the content. The scripts, both go in the head tag i assume. Well, for some reason, now everytime I try to view anything in safari or ie 5.2 on my mac, the screen comes up as blank, with absolutely nothing on the page. and I am assuming that something is broken in the code, but shouldn't SOMETHING show up when I publish the page? am i wrong to include to js scripts in the head? are the two conflicting. Keep in mind that the one j script was made in fireworks, and I just exported the one from the portfolio section and pasted in underneath the other script in the template for the random image header. Thank you for answering if you do, and have a good day. -josh | | 8:51a |
here is my code from my previous question.
here is my code from my previous question. I am making my site, and on it, I have a random image js in the head tag that refreshes and then I have a portfolio section, where I have rollover images and the such. The header, is in a dreamweaver template, and I have a editable region for all the content. The scripts, both go in the head tag i assume. Well, for some reason, now everytime I try to view anything in safari or ie 5.2 on my mac, the screen comes up as blank, with absolutely nothing on the page. and I am assuming that something is broken in the code, but shouldn't SOMETHING show up when I publish the page? am i wrong to include to js scripts in the head? are the two conflicting. Keep in mind that the one j script was made in fireworks, and I just exported the one from the portfolio section and pasted in underneath the other script in the template for the random image header. ( Read More...Collapse ) | | 10:32a |
Reminder
It seems a refresher on the community guidelines is in order. In particular: - If you have a question about some specific piece of code, post the code! It'll make it much easier for people to help you.
- When you post code, make it readable. You can use this tool to do exactly that.
| | 1:14p |
Java versus JavaScript
Since there's confusion now and then about the difference between Java and JavaScript -- and since I've yet to see an explanation geared toward people who don't already know the difference -- I took some time to write what I think is a decent explanation. Comments and suggestions are welcome. Java versus JavaScript
Java and JavaScript both look a little like C, and that's about as much as they have in common. There is a huge list of specific ways in which they are fundamentally different, but the most important difference -- as far as a web developer is concerned -- is the context in which the two languages are used.
Context
JavaScript is part of the web browser*. JavaScript programs are used to control pretty much any part of the browser window, including the content of the web page.
Java on the other hand -- although it can run inside a browser window -- is not part of the browser. A Java program runs inside an "applet," which is kind of like a container for Java programs. That container is just one element on the web page. Everything that the Java applet does, it does inside that container. It can't manipulate the web page or the browser window.
How To Tell
If you've found a web page that's doing something neat, view the HTML source. If you're familiar with HTML, it should be self-explanatory. JavaScript will be inside <script> tags. Java applets will probably be in <applet> tags.
If you're looking at a program's source code (not HTML source), and can't decide whether it's Java or JavaScript, you can tell based on certain keywords. Each language has several words that are used in that language but not the other. Generally, if you see the words public, private, or class, you're dealing with Java. If you see the words var, function, document, or window, chances are it's JavaScript.
* JavaScript exists in other contexts, but if you're writing JavaScript code that isn't destined to run in a web browser, you don't need the differences between Java and JavaScript explained to you. |
|