Sunday, June 22, 2008

I m having a problem with my computer where I can t see any music videos or anything cause it keeps on saying that my JavaScript is turned off or I need the latest Adobe Flash Player- which I ve tried to download but it says my ActiveX Controls won t let me.

How can I solve this problem?

10 points for best answer :D

a. ActionScript has similar syntax as JavaScript
b. Flash movies cannot be standalone applications- They must be embedded in a web page
c. Flash uses the JavaScript to do scripting inside the Flash
d. Flash does not have a scripting facility

Actual error message reads:

Hello- you either have JavaScript turned off or an old version of Adobe s Flash Player. Get the latest Flash player.

I have downloaded the latest version of flash player many times- but this hasn t helped. I am using Windows Vista.

Any help is greatly appreciated!!!

3.Complete the following codes to achieve the following:
(i)When the page is loaded- prompt for the user name
(ii)When the phrase click me is clicked- an alert box will be displayed to tell the user how many times he/she has clicked the phrase click me.

<html>
<head>
<title>Simple JavaScript</title>
<script type="text/javascript">
<!â€"your functions here 
</script>
</head>
<body>
<h1>Please <span style="text-decoration:underline; color:red; font-size:+2em" click me</span>!!</h1>
</script>
</body>

teacher havent taught us how to do this yet- but i m learning it on my own so I do have difficulty doing it..please help me..Thanks

This is a program used to ask a user to roll a dice.

<html>
<head>
<script type="text/javascript">

var result;

function rollDice() {
result = Math.floor(Math.random()*7);
alert("You rolled a " + result);
return false;

}

</script>
</head>
<body>
<a href = "#" onclick = "rollDice();">Roll The Dice</a>
</body>
</html>

I don t understand why there is a (Math.random()*7)?
Why is there a return false?
why is there a "#"?
The function with the name rollDice..We can name it another name right- no need rollDice also can?
Why it is rollDice() << the brackets are important?

Sorry sorry I havent learnt this chpt yet so I m confused with all these stuffs and hence asked a lot of stupid questions.. .__-
ohya why is it *7? Other numbers also acceptable?
this is java language though. not c++ or c#

Just wondering- how to make scrolling text using javascript. I meant- eh- the words/texts that keep scrolling at the bottom bar (eg when you visit a blog- you can see words scrolling at the bottom bar- above the start button- there s a little bar where you can see the words scrolling. This can be done using javascript..but I havent learn that before so I dont know how...not marquee..)

Thanks

No comments: