danglingpointers
Technical User
I would like to be able to use a single page that would be able to refresh a table based on the input into a text box and after clicking a button. Here is what I have thus far:
foo() was just a test, what I would like to do is take an entire resultset (which I will generate inside of foo()) and write it into a table within the same page that contains the input text box and button. I have already taken care of the database logic, so that is of no concern. However, the document.writeln(val) creates a new window when it runs but I would like to keep the table on the same page and be able to refresh its contents when the user enters a new value in the text box and presses the button.
Also, I would presume that a simple modification to this solution would allow me to populate text boxes with my resultset as well?
I hope that is somewhat clear. All of your responses to my previous posts have really aided my javascript learning curve quite well. Thanks in advance.
- Tim
Code:
<form>
<input type="text" name="qstr">    
<input type="button" value="Search" onClick="foo(document.forms[0].qstr.value)">
</form>
<script>
function foo(val){
document.writeln(val);
};
</script>
foo() was just a test, what I would like to do is take an entire resultset (which I will generate inside of foo()) and write it into a table within the same page that contains the input text box and button. I have already taken care of the database logic, so that is of no concern. However, the document.writeln(val) creates a new window when it runs but I would like to keep the table on the same page and be able to refresh its contents when the user enters a new value in the text box and presses the button.
Also, I would presume that a simple modification to this solution would allow me to populate text boxes with my resultset as well?
I hope that is somewhat clear. All of your responses to my previous posts have really aided my javascript learning curve quite well. Thanks in advance.
- Tim