user4fun Posted November 30, 2007 Share Posted November 30, 2007 This should be simple1 combo box with a show buttonwhen the choice is made the text area (visible) the content will change based on the selection made.The combo box has a lsit of terms, the text area will be the definition of that term select. Link to comment Share on other sites More sharing options...
Synook Posted November 30, 2007 Share Posted November 30, 2007 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 More sharing options...
user4fun Posted November 30, 2007 Author Share Posted November 30, 2007 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 More sharing options...
Synook Posted December 1, 2007 Share Posted December 1, 2007 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 More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.