tags:

views:

164

answers:

3

I was wondering if there was someone out there that would take pity on my poor soul? I have a piece of JavaScript that is trying its level best to put me into an early grave. I am very new to all of this and would be eternally greatful if someone could see thier way to helping me before I lose the will to live.

I have to add the following two groups, occasion and name of sender, to the piece of JavaScript below:

<html>
<head>
<title>(ii)</title)

var recipient
// Declare other variables here

recipient =
    window.prompt ('Please enter the name of the recipient', '');
// prompt for other values here

// output the customised greeting here

</script>

</head>
<body>
</body>
</html>
+6  A: 

I'm no web genius, nor am I the religious type who can help you with this "soul" business, but it seems to me you are missing the opening <script> tag.

Also, the closing </title> should end with > and not ).

Update: looking at the edit history, it looks like the missing and malformed tags were introduced by another SO reader who was editing your question. Sorry about that.

asveikau
@asveikau Nah, the malformed tags were there in the first version of the post, or that's at least how I read the edit history anyways
Dan F
Ok guys basically what it is to do with is this. Its a part of a program that would let the user and their own 'personal touches' to a greeting card message of their choice.I obviously made a mistake typing as far as the title are concerned so I can see what Ive done there. The other two lines that need to go in are to do with occasion and the other is the senders details.I must apologise for the slight confusion on this.
+2  A: 

Two problems:

  • The <title> tag isn't closed.
  • The <script> tag isn't opened.
John Feminella
+2  A: 

You won't be able to get all those fields into JavaScript pop-ups. Even if you could, you would run into trouble when you try and send some sort of message using JavaScript (that's what it looks like you're trying to do, any way).

If you write an HTML form and have it post to a server that uses something like PHP or Servlets, you might have better luck.

BranTheMan