javascript

here you can make posts that do not belong in other forums
kanreea
Posts: 1

javascript

Post by kanreea »

How do I find out whether javascript is enabled or not on my IE browser? When I download tutorials from a site, the download seems fine, but when I play it there is no sound, and I get a notice to check if javascript is enabled in my browser. I have no idea how to check this. Help please!!

Eenie
Posts: 606
Location: Virginia, USA

Post by Eenie »

kanreea wrote:How do I find out whether javascript is enabled or not on my IE browser? When I download tutorials from a site, the download seems fine, but when I play it there is no sound, and I get a notice to check if javascript is enabled in my browser. I have no idea how to check this. Help please!!


Although I personally do not use IE and do not recommend people using it, a quick google search showed me this:

How do I enable Java in my web browser?
Internet Explorer 4.x and Up

1. Click "Tools" --> "Internet Options"
2. Select the Advanced Tab, and scroll down to "Java "
3. Check the box next to the Java version
4. Next, select the Security Tab, and select the "Custom Level" button
5. Scroll down to "Scripting of Java applets"
6. Make sure the "Enable" radio button is checked.
7. Click OK to save your preference.

http://www.java.com/en/download/help/enable_browser.xml

I recommend you get FireFox. In the meantime, the above steps should do what you want.

~Eenie
Just a small fish in a big sea Image
Image

panneer
Posts: 1

Post by panneer »

Hmm. So a simulation would be "as soon as user presses key, block moves forward, user presses key again to stop block." ?
In that case, how about abusing javascript's loose casting:

var animId = null;

function moveBlock() {do stuff}

function startMotion() {
animId = setInterval("moveBlock()", 42);
}

function stopMotion() {
clearInterval(animId);
animId = null;
}

function switchMotion() {
if(animId)
stopMotion();
else
startMotion();
}

Then, attached to your body tag, you have the event onkeydown="switchMotion()". Be careful with what happens when a user holds a key down. The casted Boolean value of a variable is true if it is anything other than the empty string "", the number 0, undefined, null, NaN, or the Boolean value false. See http://developer.mozilla.org/en/docs/Cor


==========================

CatReporter
Posts: 1
Location: Europe & US

Post by CatReporter »

I dont use IE either and only use Firefox. However, that browser has been giving me some javascript errors lately. Everytime when I want to open a file or save one (like an image) and browse through the opened up Firefox file window an error message like this pops up: "A script on this page may be busy, or it may have stopped responding. You can stop the script now, or you can continue to see if the script will complete. Script: file:///D:/Programme/Siber%20Systems/AI%20RoboForm/Firefox/components/rfhelper.js:129"
Sometimes the error code has different numbers, like js:9289. I would appreciate any suggestions you guys may have. Thanks!

p.s.: Nice forum, will try to look around more during the next few days. :)