Click to See Complete Forum and Search --> : form input -> function variable


Ninjagranny
11-16-2003, 03:16 PM
4 days javascript so if im being stupid sorry

what i want to do is to pass a drop down form box results to a javascript variable
(im doing a converter sort of thing)

also are there any decent javascript aware editors as my script looks like a drunk spider and i keep losing " marks - used to use a c++ editor that coloured stuff in and told you about arphaned statements.

TIA

Charles
11-16-2003, 03:29 PM
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="Content-Script-Type" content="text/javascript">
<title>Example</title>

<form action="">
<div>
<select onchange="alert(this.value)">
<option value="fee">Fee</option>
<option value="fie">Fie</option>
<option value="foe">Foe</option>
<option value="fum">Fum</option>
</div>
</form>

1) Do not, however, let something like this loose upon the internet. JavaScript dependent pages are an accessibility nightmare.

2) If you are familiar with C++ then you know that you cannot learn a language by simply playing with it. I've seen people wrestle with 50 or so lines of code that I got down to two or three because I knew something about the language that they didn't. Read, mark, learn and inwardly digest Netscape's Client-Side JavaScript Guide (http://devedge.netscape.com/library/manuals/2000/javascript/1.3/guide/) for JavaScript 1.3.

Ninjagranny
11-16-2003, 03:39 PM
THANK YOU :)

Im playing on a personal website - read a lot of books now including dummies for javascript :) and netscapes guide - I learnt most of my comp languages by setting myself a task and doing it - for javascript first one was a frame timer countdown for a webcam - this next one is for a sorta joke item about time zones etc but for my use and some friends :) - dont worry matey - wont be cutting loose with any non ALL platform compliant stuff - just adding bits extra for people who can :)

Any idea about an editor ? i would like to see my statements in colour etc and something to slap me when i loose a bracket or apostrophe

Ninja

Charles
11-16-2003, 03:54 PM
I'm a big fan of HTML Kit (http://www.chami.com/html-kit/).