On 6/5/06, Bruce Sorge <[EMAIL PROTECTED]> wrote:
> Is there a way to refresh a select list from a child form that is spawned
> from the page the select list is coming from? I have a list that if a vendor
> is not there, the user will click a link that opens a new window so they can
> add the vendor. Then, when the click the submit button to add the vendor I
> want to re-query the database and have that vendor selected in the list. Is
> this difficult? Has anyone done this before?
>

In your new window, after you submit the new information, you could
return some javascript that adds the value to the list and selects
it...
something like...

var l = opener.document.form.somefield.length++;
opener.document.form.somefield.options[l].value = somevalue;
opener.document.form.somefield.options[l].text = sometext;
opener.document.form.somefield.selectedIndex = l;
self.close();

from memory...not tested...

-- 
Jim Wright
Wright Business Solutions
[EMAIL PROTECTED]
919-417-2257

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:242476
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to