CodeCharge Studio
search Register Login  

Web Reports

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> General/Other

 Updating a listbox NOT dependant on another listbox

Print topic Send  topic

Author Message
greywire


Posts: 37
Posted: 02/28/2008, 1:35 PM

I want to do something like the dependant listboxes, but instead of being linked to another listbox, I want to just have a button that calls a service and that populates the listbox.

How would I do that?
_________________
--
Aric Caley
Fonality, inc
View profile  Send private message
wkempees


Posts: 1679
Posted: 02/28/2008, 2:05 PM

What would you have the button do?
Because what you describe here is not totaly clear to me.
For instance, you arrive at the form, it is in EditMode.
Some data is displayed and there is your button, now what does it hace to do?
There is also a listbox on the form, is it empty?
A listbox is always a ID, Value pair, the ID is part of your main forms dtatastructure.
So what is it filled with?

Help me help you.

Walter
_________________
Origin: NL, T:GMT+1 (Forumtime +9)
CCS3/4.01.006 PhP, MySQL .Net/InMotion(Vista/XP, XAMPP)

if you liked this info PAYPAL me: http://donate.consultair.eu
View profile  Send private message
DonB
Posted: 03/01/2008, 5:29 AM

In jQuery:

$("#listbox").load('/somepage.php #mylistbox option');

That's assuming /somepage.php outputs a page that simply contains a listbox
(with all the desired options) whose ID is 'listoptions.' The <option> tags
are filtered out of the page content (thus discarding the header, body tags
or other 'noise') and what's left (all the option tags) are inserted in
between the <select id="mylistbox">...</select>. Whatever <option> elements
were there are now replaced with the new values returned from somepage.php

You could add a Link with the id 'loaderlink' that initiates the loading
process:

$("#loaderlink").click(
function() {
$("#listbox").load('/somepage.php #mylistbox option');
return false; // To prevent the click from being seen and processed
by the <a> tag itself.
}
);

See this for further details:
http://docs.jquery.com/Ajax/load#urldatacallback

--
DonB



"greywire" <greywire@forum.codecharge> wrote in message
news:247c72908b5119@news.codecharge.com...
>I want to do something like the dependant listboxes, but instead of being
>linked
> to another listbox, I want to just have a button that calls a service and
> that
> populates the listbox.
>
> How would I do that?
> ---------------------------------------
> Sent from YesSoftware forum
> http://forums.codecharge.com/
>


Add new topic Subscribe to topic   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

MS Access to Web

Convert MS Access to Web.
Join thousands of Web developers who build Web applications with minimal coding.

CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.