RE: Inserting text without refreshing
by Rebecca Campbell <rcampbel(at)standard.com>
|
| Date: |
Fri, 14 Jan 2000 12:28:09 -0800 |
| To: |
"'Luke Jordan'" <ljordan(at)mweb.co.za>, hwg-techniques(at)hwg.org |
| |
todo: View
Thread,
Original
|
|
here's a dummy page i made up... sounds like you're looking for something
like this;
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title>Untitled</title>
<script language="javascript">
function addText() {
current = document.myForm.myText.value;
shouldBe = current + " also, i like cheese";
document.myForm.myText.value = shouldBe;
}
</script>
</head>
<body>
<form name="myForm">
<textarea name="myText" cols=40 rows=5>
</textarea>
<br>
<input type="Button" name="theButton" value="click me" onClick="addText()">
</form>
</body>
</html>
-rebecca
http://www.nerdygirl.com
-----Original Message-----
From: Luke Jordan [mailto:ljordan(at)mweb.co.za]
Sent: Thursday, January 13, 2000 2:57 PM
To: hwg-techniques(at)hwg.org
Subject: Inserting text without refreshing
Hi,
Is there a way I can insert text into document based on user input without
having to refresh it? I've got a text area, and I want the user to be able
to
hit a button/link and have text put in the area at the current insertion
point,
without the page having to reload. I hope I've explained this properly,
TIA,
Luke Jordan.
HWG hwg-techniques mailing list archives,
maintained by Webmasters @ IWA
This page is part of a preserved archive of archives.hwg.org. The site is no longer active and its content is not maintained. For enquiries about this archive, write to archive(at)iwanet.org.