Go Back   CodingForums.com > :: Client side development > JavaScript programming

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 01-04-2011, 11:44 PM   PM User | #1
jls1988
New Coder

 
Join Date: Jan 2011
Posts: 15
Thanks: 0
Thanked 0 Times in 0 Posts
jls1988 is an unknown quantity at this point
Array and Dialog box

Hey Scripters,

I need to complete a task for a friend and I am stuck at this part. I am new with Javascript but I'm his only friend that knows a bit of Javascript.

So for this problematic part of my task, I need to use tables and dialog boxes.

First of all I need to define an array of 3 elements. Each element is associated with a different first name.

Then I shall realize a first function to add a name in the table. The function takes as parameter the table previously created and return it containing an additional element whose value is the name that the visitor wants to add. I must use the dialog box prompt so that the user can specify the name he wishes to add in the table.

I shall also perform a second function which will display the name that is included in the different array elements. This function will also take the table in parameters and proceed with setting the display name with a dialog box alert type that contains all of the name separated by ";".


Help is very much appreciated.

Please don't post links, I need explanations, so that I can understand next time I encounter this situation.
jls1988 is offline   Reply With Quote
Old 01-05-2011, 12:25 AM   PM User | #2
jmrker
Senior Coder

 
jmrker's Avatar
 
Join Date: Aug 2006
Location: FL
Posts: 2,799
Thanks: 30
Thanked 463 Times in 457 Posts
jmrker will become famous soon enough
Do you have an attempt at this homework assignment?

See: http://www.webdeveloper.com/forum/fo...c&daysprune=30
jmrker is offline   Reply With Quote
Old 01-05-2011, 01:25 AM   PM User | #3
Old Pedant
Supreme Master coder!

 
Old Pedant's Avatar
 
Join Date: Feb 2009
Posts: 23,579
Thanks: 62
Thanked 4,064 Times in 4,033 Posts
Old Pedant is a name known to allOld Pedant is a name known to allOld Pedant is a name known to allOld Pedant is a name known to allOld Pedant is a name known to allOld Pedant is a name known to all
jmrker means specifically
http://www.webdeveloper.com/forum/sh...d.php?t=240566

It's considered bad netiquette to crosspost the same question in different forums. Somebody will spend a bunch of time answering you only to find out that the question was already answered in the other forum. At a minimum, you should mention where else you have posted the question.

But anyway, look here:
http://www.codingforums.com/rules.htm

And look at rule 1.5, especially.

You will, I am sure, pardon us if we are more than skeptical about your claim that this is "a task for a friend." Unless you mean your friend is the person who has this homework assignment.

Why do we KNOW this is homework? Quite simply because it has no possible use in the real world. I could see something like this being used as a way to add "friends" to a list of existing friends. But since the list will not be visible on any computer except the one where the name was added, it clearly has no practical purpose. Couple that with the requirement that you must use a "dialog box prompt" and then display the result via an "alert type that contains all of the name" and we know it's not something you would use on a real website. It's a beginning level homework assignment.

*IF* you do some of the work and show us what you have done and tell us what parts work and what parts don't, *THEN* you could well get some help. But we won't do the entire homework for you.
__________________
An optimist sees the glass as half full.
A pessimist sees the glass as half empty.
A realist drinks it no matter how much there is.
Old Pedant is offline   Reply With Quote
Old 01-05-2011, 01:38 AM   PM User | #4
jmrker
Senior Coder

 
jmrker's Avatar
 
Join Date: Aug 2006
Location: FL
Posts: 2,799
Thanks: 30
Thanked 463 Times in 457 Posts
jmrker will become famous soon enough
Thumbs up

Quote:
Originally Posted by Old Pedant View Post
jmrker means specifically
...
*IF* you do some of the work and show us what you have done and tell us what parts work and what parts don't, *THEN* you could well get some help. But we won't do the entire homework for you.
Boy, you took a lot of words to say what I meant!
jmrker is offline   Reply With Quote
Old 01-05-2011, 01:43 AM   PM User | #5
Old Pedant
Supreme Master coder!

 
Old Pedant's Avatar
 
Join Date: Feb 2009
Posts: 23,579
Thanks: 62
Thanked 4,064 Times in 4,033 Posts
Old Pedant is a name known to allOld Pedant is a name known to allOld Pedant is a name known to allOld Pedant is a name known to allOld Pedant is a name known to allOld Pedant is a name known to all
LOL!!!

I just get so tired of these "doing this for a friend" or "I urgently need help for my website" or ...

All the possible ways of not admitting that this is a homework assignment.

It's like they all think we are certified idiots. Have they never looked at a real website, to see how much more complex it is than these toy assignments? Or, even when the sites aren't complex, have they ever seen one that *really* asked questions using prompt boxes and gave answers with alerts???
__________________
An optimist sees the glass as half full.
A pessimist sees the glass as half empty.
A realist drinks it no matter how much there is.
Old Pedant is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 12:27 PM.


Advertisement
Log in to turn off these ads.