![]() |
|
|
#1 | |||
|
Pro Starter
Join Date: Mar 2004
Location: Oakland, CA
|
Basic javascript help
I'm trying to get this code to output first and last name into the 3rd box. It's not working and I'm not sure why. Any help?
*I can't figure out how to put code in here, so I just attached the file.
__________________
Quote:
|
|||
|
|
|
|
|
#2 |
|
College Starter
Join Date: Dec 2000
Location: Sweden
|
I'm not seeing any attachment?
__________________
San Diego Chargers (HFL) - Lappland Reindeers (WOOF) - Gothenburg Giants (IHOF) Indiana: A TCY VC - year 2044 - the longest running dynasty ever on FOFC! |
|
|
|
|
|
#3 |
|
Pro Rookie
Join Date: Jun 2012
Location: Bahston Mass
|
Code:
Replace the (bracket) with [ and ] obv. But yeah, nothing attached on my end either.
__________________
There's no I in Teamocil, at least not where you'd think Last edited by Ronnie Dobbs2 : 03-09-2011 at 06:32 AM. |
|
|
|
|
|
#4 |
|
Pro Starter
Join Date: Mar 2004
Location: Oakland, CA
|
Oops. Here it is
HTML Code:
|
|
|
|
|
|
#5 |
|
Pro Starter
Join Date: Mar 2004
Location: Oakland, CA
|
Trying to get it to look like this, where the you enter your first and last name, hit GO and it puts your full name in the last box.
COMSC 100 WorkbookAssignment 4 Instructions: Type your first and last name, then click GO and a greeting will appear. Input values: First Name: Last Name: Output value: Happy New Year, |
|
|
|
|
|
#6 |
|
Head Coach
Join Date: Oct 2002
Location: Colorado Springs
|
Code:
That's all you need. Call popFull as an onClick in the 'go' button, done. HTML Code:
Last edited by Coffee Warlord : 03-09-2011 at 10:28 AM. |
|
|
|
|
|
#7 |
|
Pro Starter
Join Date: Mar 2004
Location: Oakland, CA
|
Thanks CW. I'm totally code illiterate, so I'm not sure what to replace to the old code or where to add your code or both? We're supposed to be learning this in class, but the teacher gives the same story about cake and we don't seem to be learning any JS or HTML.
|
|
|
|
|
|
#8 |
|
Head Coach
Join Date: Oct 2002
Location: Colorado Springs
|
What I gave you is basically the completed everything. You only need that one line of javascript to accomplish what you want, and I included the actual necessary portion of the html. You'll need to add like the html/body/etc tags and such, but the meat is all there.
Last edited by Coffee Warlord : 03-09-2011 at 12:34 PM. |
|
|
|
|
|
#9 |
|
Pro Rookie
Join Date: Jun 2012
Location: Bahston Mass
|
If you wanted to do it with your original code (which might be more appropriate for a CSCI 1 assignment) I would ask you to look at the insert function. You are saying WHAT to insert, but not including WHERE.
http://www.prototypejs.org/api/element/insert
__________________
There's no I in Teamocil, at least not where you'd think |
|
|
|
|
|
#10 |
|
Head Coach
Join Date: Oct 2002
Location: Colorado Springs
|
Learn it the efficient way, dammit. Don't learn bloated programming techniques.
![]() |
|
|
|
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
|
|