UGN Security Forums
My ProfileMember DirectoryLogin
Search our ForumsView our FAQView our Site Rules
View our CalendarView our Active TopicsGo to our Main Page

UGN Security Store
 

Network Sites UGN Security, The GoNix Initiative, Elite Web Gamers, Back of the Web, EveryDay Helper, VNC Web Design & Development
November
Su M Tu W Th F Sa
1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30
Sponsored Links
Latest Postings
Latest Reviews
Topic Options
Rate This Topic
#19227 - 03/04/04 04:33 AM Javascript problem (please help!)
jonlenin Offline
Junior Member

Registered: 02/27/04
Posts: 7
Loc: North Calkalaka
Hey guys,

I read a couple of tutorials and started learning how to program javascript. I tried to do one of the excercises, and the code just doesnt work could someone please help me out? sorry about the weird spacing
Code:
  
<html>
<head>
<title>stuff</title>
<script language ="Javascript">
<!-- hide me
var red_monkey = prompt("What is your name?","Ryan");

var blue_monkey = prompt("what is your favorite color?""Blue");

var green_monkey = "I hate you";

var orange_monkey = "and I hate";

var all_in_one = green_monkey + red_monkey + orange_monkey + blue_monkey;
// stop hiding me -->
</script>
</head>

<body>
<script language = "javascript">
<!-- hide me
document.writeln(all_in_one)
// stop hiding me -->
</script>
</body>
</html>

Top
Sponsored Links
      
#19228 - 03/04/04 05:20 AM Re: Javascript problem (please help!)
§intå× Offline


*****

Registered: 12/03/02
Posts: 3255
Loc: Maryland
Not sure if that is what you want, but try that. You were missing a comma...


Code:
var blue_monkey = prompt("what is your favorite color?""Blue");
>
>
>
this should have been 
>
>
>
var blue_monkey = prompt("what is your favorite color?","Blue");
                                                       ^
                                                       Notice the comma
This is the code corrected

Code:
 <html>
     <head>
        <title>stuff</title>
  <script language ="Javascript">
  <!-- hide me
    var red_monkey = prompt("What is your name?","Ryan");
    var blue_monkey = prompt("what is your favorite color?","Blue");
    var green_monkey = "I hate you";
    var orange_monkey = "and I hate";
    var all_in_one = green_monkey + red_monkey + orange_monkey + blue_monkey;
  // stop hiding me -->
  </script>
     </head>
<body>
<script language = "javascript">
  <!-- 
     hide medocument.writeln(all_in_one)
  // stop hiding me -->
</script>
</body>
</html>
_________________________
My New site OpenEyes

Top
#19229 - 03/05/04 05:29 AM Re: Javascript problem (please help!)
jonlenin Offline
Junior Member

Registered: 02/27/04
Posts: 7
Loc: North Calkalaka
Thank you very much sin_tax. this is why programing can sometimes be suck a pain.

Top
#19230 - 03/05/04 06:27 AM Re: Javascript problem (please help!)
§intå× Offline


*****

Registered: 12/03/02
Posts: 3255
Loc: Maryland
Sure, just keep coming back. You are what this site needs more of. You are already my favorite newbie. You come here seeking knowledge but are already looking for it on your own. I will help guys like you out all day.

Good luck.
_________________________
My New site OpenEyes

Top

Moderator:  §intå×, Gremelin 
Featured Member
Registered: 03/02/02
Posts: 136
Forum Stats
2150 Members
46 Forums
35738 Topics
70908 Posts

Max Online: 1567 @ 04/25/10 05:20 AM
Top Posters
UGN Security 28899
Gremelin 7193
§intå× 3255
SilentRage 1273
Ice 1146
pergesu 1136
Infinite 1041
jonconley 955
Girlie 908
unreal 860
Newest Members
HushHush, golqm, Tim050, Gecko666, defghi795767
2150 Registered Users
Who's Online
0 registered (), 344 Guests and 306 Spiders online.
Key: Admin, Global Mod, Mod
Latest News
luxury goods sales at $405B by 2019
by golqm
10/28/14 05:19 AM


Donate
  Get Firefox!
Get FireFox!