/    Sign up×
Community /Pin to ProfileBookmark

Very basic request

(Sorry about this in advance – I have searched forum after forum and tutorial after tutorial and it still ahsn’t sunk in, so I am trying to get exact answer to my question.)

I have the following:

<html>
<head>
<script language=”JavaScript”>

</script>
</head>

<body>
<form name=”nx”>
<textarea name=”nx1″></textarea>
<input name=”Run” type=Button value=”run” onClick=”CALL SCRIPT HERE”>
<form name=”nx2″><input type=Text>
</body>
<html>

What I want is simply to a have user input a value into “nx1”, onClick for that to become a variable which is then displayed in “nx2”. Thanks guys.

to post a comment
JavaScript

1 Comments(s)

Copy linkTweet thisAlerts:
@KorSep 05.2011 — 
  • - The document should bear a Doctype

  • - [B]language[/B] is deprecated. use[B] type[/B] instead.

  • - the FORM tag sho0uld be closed with </form>

  • - It is HTML illegal to nest a form inside another form.
    <i>
    </i>&lt;!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"&gt;
    &lt;html&gt;
    &lt;head&gt;
    &lt;title&gt;Untitled Document&lt;/title&gt;
    &lt;meta http-equiv="Content-Type" content="text/html; charset=utf-8"&gt;
    &lt;meta http-equiv="Content-Style-Type" content="text/css"&gt;
    &lt;meta http-equiv="Content-Script-Type" content="text/javascript"&gt;
    &lt;script type="text/javascript"&gt;
    function writeInput(textareaElement,inputElement){
    inputElement.value=textareaElement.value;
    }
    &lt;/script&gt;
    &lt;/head&gt;
    &lt;body&gt;
    &lt;form&gt;
    &lt;textarea name="nx1"&gt;&lt;/textarea&gt;
    &lt;input name="Run" type="button" value="run" onclick="writeInput(nx1,nx2)"&gt;
    &lt;input type="text" name="nx2"&gt;
    &lt;/form&gt;
    &lt;/body&gt;
    &lt;/html&gt;
  • ×

    Success!

    Help @tc03 spread the word by sharing this article on Twitter...

    Tweet This
    Sign in
    Forgot password?
    Sign in with TwitchSign in with GithubCreate Account
    about: ({
    version: 0.1.9 BETA 5.26,
    whats_new: community page,
    up_next: more Davinci•003 tasks,
    coming_soon: events calendar,
    social: @webDeveloperHQ
    });

    legal: ({
    terms: of use,
    privacy: policy
    });
    changelog: (
    version: 0.1.9,
    notes: added community page

    version: 0.1.8,
    notes: added Davinci•003

    version: 0.1.7,
    notes: upvote answers to bounties

    version: 0.1.6,
    notes: article editor refresh
    )...
    recent_tips: (
    tipper: @AriseFacilitySolutions09,
    tipped: article
    amount: 1000 SATS,

    tipper: @Yussuf4331,
    tipped: article
    amount: 1000 SATS,

    tipper: @darkwebsites540,
    tipped: article
    amount: 10 SATS,
    )...