Click to See Complete Forum and Search --> : sorry, but I need more fast help.. diff. subject..


Jonathan
10-27-2003, 10:04 PM
I tried the frame appendChildes but It didn't work, but how could i insert a <br> after the append child?

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<HTML>
<HEAD>
<TITLE></TITLE>
<LINK REL="stylesheet" href="" type="text/css">
<meta http-equiv="content-type" content="text/html; charset=iso-8859-1">
<META NAME="keywords" CONTENT="">
<META NAME="description" CONTENT="">
<META NAME="author" CONTENT="Jonathan">
<script language="JavaScript" type="text/javascript">
<!--
function addVocab(){
var vword = document.formVocab.word.value.toUpperCase();
var definition = document.formVocab.definition.value;
var vocabulary = document.createTextNode(vword+ "- " + definition);

document.getElementById("v").appendChild(vocabulary);
}

function addQuestion(){
var question = document.formQuestion.question.value.toUpperCase();
var answer = document.formQuestion.answer.value;
var questions = document.createTextNode(question + answer);

document.getElementById("q").appendChild(questions);
}
//-->
</script>
</HEAD>

<BODY>

<!-- Vocabulary --><font color="red">Please enter the information below: (just ignore when you copy and paste)</font>
<form name="formVocab">
<fieldset>
<legend>Insert a Vocabulary Word</Legend>
Word:&nbsp;<input type="text" name="word">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Definition:&nbsp;<input type="text" name="definition">&nbsp;&nbsp;<input type="button" value="Add Vocabulary Word" onclick="addVocab();">
</fieldset>
</form>
<!-- /Vocabulary -->
<!-- Questions -->
<form name="formQuestion">
<fieldset>
<legend>Insert a Question and Answer</Legend>
Question:&nbsp;<input type="text" name="question">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Answer:&nbsp;<input type="text" name="answer">&nbsp;&nbsp;<input type="button" value="Add Question and Answer" onclick="addQuestion();">

</fieldset>
</form>
<!-- /Questions -->






<BR><BR>======== This is where you copy and paste or click print =============<br><br><br><br>
<script language="javascript">
<!--
var now = new Date();
var yourName = prompt('What is your name?','Dude');
var period = prompt('When do you have science?','2*');
document.write("<b>"+yourName + " | " +period+ " | " + now.getMonth() + "/" + now.getDate() + "/" + now.getYear()+"</b>");
//-->
</script><p>
<b>Vocabulary</b></p>
<p id="v">&nbsp;</p><p>

<b>Questions</b></p>
<p id="q">&nbsp;</p>
</BODY>
</HTML>

skriptor
10-28-2003, 06:42 AM
Hi,
try this


var element = document.createElement( "br" )
document.getElementById("v").appendChild(element);

Good luck, skriptor

Jonathan
10-28-2003, 08:21 AM
Thank you!