CodeCharge Studio
search Register Login  

Web Reporting

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

YesSoftware Forums -> CodeCharge Studio -> General/Other

 activate search button on change of listbox.

Print topic Send  topic

Author Message
dikmus

Posts: 19
Posted: 06/08/2005, 12:11 PM

I want to get rid of the search button.
Is there a simple way to do this?
(using javasript or vb.net)
_________________
www.musit.nl
View profile  Send private message
Nicole

Posts: 586
Posted: 06/09/2005, 4:58 AM

Hello,
You can submit a search form via Javascript code in listbox onChange event:
document.forms.search_form_name.submit();

_________________
Regards,
Nicole
View profile  Send private message
dik mus
Posted: 06/09/2005, 6:24 AM

Hi nicole,
I thought so too, but in my page nothing happens.
I also tried to add the action submit on the onchange event of the listbox, but same result.
(only if i press the search button, the page is submitted)
could i be forgetting something? It could be something very basic ;-)
(generating vb.net code)
DonB
Posted: 06/09/2005, 8:11 PM

Put a javascript alert('some message') into the event to be sure it's
actually getting triggered.

--
DonB

http://www.gotodon.com/ccbth


<dikmus@forum.codecharge (dik mus)> wrote in message
news:242a84329f1b25@news.codecharge.com...
> Hi nicole,
> I thought so too, but in my page nothing happens.
> I also tried to add the action submit on the onchange event of the
listbox, but
> same result.
> (only if i press the search button, the page is submitted)
> could i be forgetting something? It could be something very basic ;-)
> (generating vb.net code)
>
> ---------------------------------------
> Sent from YesSoftware forum
> http://forums.codecharge.com/
>

E43509

Posts: 283
Posted: 06/16/2005, 1:59 PM

Assuming you are using .net, I brute forced it in this way by snooping around the code for how a navigator link works.

This does not work

myControl.Attributes("OnChange") = "javascript:this.form.submit();"

As you need to do some kind of a postback like the navigator controls

This worked for me
myctl.Attributes("OnChange") = "javascript:__doPostBack('mySearchButton_DoSearch','')"

Remember that for add Javascript to any controls in .net, you have to do it programmatically.

View profile  Send private message
dik mus
Posted: 06/17/2005, 12:11 AM

Interesting that you did get it to work. Very good!
But where exactly did you put the code?
I am indeed using .net (and still wondering why)
E43509

Posts: 283
Posted: 06/17/2005, 8:14 AM

I'm only part way skilled in .net so there may be better ways.
I put the code in the event for the form (before show).
View profile  Send private message
dik mus
Posted: 06/18/2005, 12:23 AM

Finally got this working too!! Thanks a lot.

Adding code to vb.net applications is not as simple as i had hoped.
The only place where i managed to get some code exceuted in vb.net is in the before show event. I dont realy onderstand why. But this is working great.


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.

Web Database

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.