Staredit Network > Forums > Technology & Computers > Topic: Vocabulary-test
Vocabulary-test
This topic is locked. You can no longer write replies here.
Sep 16 2009, 4:21 pm
By: Devourer  

Sep 16 2009, 4:21 pm Devourer Post #1

Hello

Hey everybody,
for my class I recently wanted to code a vocabulary-learn and test site.

My concept was to have a "learn-page" where all vocabluarys are listed, in german and english (we are from germany), that one works with no problem, the "test-page" should be structured like this: on one column there are the german words listed, right next to each in the other column there is a textbox in which the user shall enter the right solution. Another column on the righht there is a "check" button near each textbox, named "check".
You need to know that I'm using a MySQL-Table with 3 columns: ID, Englisch, German, on the learning and on the testing page I'm using "SELECT * FROM vocabluarys....".
The textbox got the name "id" (the current ID of the mysql fetch array).

About the check-button (and the problem):
I wanted the check-button to call via onclick a java-script function with 2 parameters: ids and englishvalue.
Why these two?
ids: I wanted the ids-parameter to receive the current ID of the mysql-fetch-array to use that parameter for getting the value of the textbox.
englishvalue: This one should contain the true english value from the mysql table.

The error: I don't know, after hitting the button nothing happens.

Codes:
The javascript on the header of the .php file:
Quote
function checks(ids, valueenglish){
x=document.getElementByName(ids).value;
if(x!=valueenglish)
{
alert("Wrong");
}
else
{
alert("Right");
}
}

the mysql-fetch-array "while" solution for the textbox and button:
Quote
echo "<td bgcolor='4C4C4C'><input type='text' name='".$row[id]."' style='background: black; color: white;'></td>";
echo "<td bgcolor='4C4C4C'><input type='button' onclick=checks('".$row[id]."', '".$row[englisch]."') value='Check'></td>";

any ideas?
I only know PHP HTML JavaScript and MySQL, don't come along with other languages if possible.

Post has been edited 2 time(s), last time on Sep 17 2009, 5:14 am by DeVouReR.



Please report errors in the Staredit.Network forum.

Sep 17 2009, 12:35 am O)FaRTy1billion[MM] Post #2

👻 👾 👽 💪

"SELETE"? I'm assuming you meant "SELECT". :P

View the page source of the generated page, see if there are any errors in that.



TinyMap2 - Latest in map compression! ( 7/09/14 - New build! )
EUD Action Enabler - Lightweight EUD/EPD support! (ChaosLauncher/MPQDraft support!)
EUDDB - topic - Help out by adding your EUDs! Or Submit reference files in the References tab!
MapSketch - New image->map generator!
EUDTrig - topic - Quickly and easily convert offsets to EUDs! (extended players supported)
SC2 Map Texture Mask Importer/Exporter - Edit texture placement in an image editor!
\:farty\: This page has been viewed [img]http://farty1billion.dyndns.org/Clicky.php?img.gif[/img] times!

Sep 17 2009, 2:01 pm Devourer Post #3

Hello

EDIT: Worked well now. Topic can be closed.

Post has been edited 1 time(s), last time on Sep 17 2009, 3:12 pm by DeVouReR.



Please report errors in the Staredit.Network forum.

Options
  Back to forum
Please log in to reply to this topic or to report it.
Members in this topic: None.
[03:42 am]
RIVE -- Hellooooo, Nurse
[2026-6-03. : 4:19 pm]
NudeRaider -- Hello World!
[2026-6-01. : 4:03 pm]
IskatuMesk -- no Hello World? No Hello . jpeg? Not even ddosing some government website? smh my head
[2026-5-31. : 10:02 pm]
Symmetry -- I was really just figuring out how to compile
[2026-5-31. : 10:02 pm]
Symmetry -- I didn't make it do anything
[2026-5-31. : 9:17 pm]
Ultraviolet -- hell yeah. did you have trouble making the button functional, or just haven't gotten there yet?
[2026-5-31. : 8:29 pm]
Symmetry -- I made the marine shoot lasers and gave the medic a nonfunctional button
[2026-5-31. : 8:07 pm]
Ultraviolet -- Symmetry
Symmetry shouted: I did my first EUD thing today. Feels like me finding arsenal at age 8 again
haha for sure. in some ways it's even more exciting because you can play EUD maps on regular battle.net, don't need to convince someone to download your mod to play with you. what did you do?
[2026-5-31. : 6:47 pm]
Symmetry -- I did my first EUD thing today. Feels like me finding arsenal at age 8 again
[2026-5-31. : 3:20 pm]
l)ark_ssj9kevin -- le reddit
Please log in to shout.


Members Online: NudeRaider, RIVE