I have a <input type="text"... that I would like to have filled by a popup window that accesses a mysql database to give the user valid choices
I have this script to open the window:
and this to return the value:
this works great for a simple form w/ a drop down or text box or this or that, but I have it a little bit more complicated b/c my script refreshes the page when a user selects a category so that the subcategory drop down will be smaller
This script is:
Any help or ideas would be appreciated.
I have this script to open the window:
Code:
function myOpen() {
targetitem = document.getElementById("classCodeTB");
dataitem = window.open("test.php","dataitem", "toolbar=no,menubar=no, scrollbars=yes");
dataitem.targetitem = targetitem;
}
and this to return the value:
Code:
function select_item() {
targetitem.value = document.getElementById("selectSubCategoryDD").options[document.getElementById("selectSubCategoryDD").options.selectedIndex].value;
//alert(test);
top.close();
return false;
}
this works great for a simple form w/ a drop down or text box or this or that, but I have it a little bit more complicated b/c my script refreshes the page when a user selects a category so that the subcategory drop down will be smaller
This script is:
Code:
function reload(form){
var val=form.selectCategoryDD.options[form.selectCategoryDD.options.selectedIndex].value;
self.location='findClassCode.php?cat=' + val ;
}
Any help or ideas would be appreciated.