Jump to content

Combo box


user4fun

Recommended Posts

Umm.. where do you get the data from? Say you use AJAX to request a text file into the textareaJavaScript

<script type="text/javascript">	function changetext() {		document.getElementById('text').value = "Loading...";		var page = document.getElementById('choice').value;		xmlHttp = new XMLHttpRequest; //Add IE code		xmlHttp.onreadystatechange = function() {			if (xmlHttp.readyState == 4) document.getElementById('text').value = xmlHttp.responseText;		}		xmlHttp.open("GET", file, true);		xmlHttp.send(null);	}</script>

Combobox

<select id="choice">	<option value="eula.txt">EULA</option>	<option value="copy.txt">Copyright</option>	<option value="disclaim.txt">Disclaimer</option></select><input type="button" onclick="changetext()" value="show" />

Textarea

<textarea id="text"></textarea>

Link to comment
Share on other sites

I am going to have the terms in a Mysql table.so I need a php file (get_def.php) that will $REQUEST the value of the the choice, and then back the $definition value pulled from the table??Is that correct? or do I need to save every term in a seperate txt file?

Link to comment
Share on other sites

No, you can do the database system if you want. You seem to be progressing well in your other posts.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...