473,400 Members | 2,163 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,400 software developers and data experts.

Urgent: Trigger javascript function after bind control

Hi All,

I've a problem here, I want to trigger a javascript function after binding
the ListBox control. Basically the javascript will remove the duplicates
records after recordset is bind in the ListBox control automatically without
users onclick/onchange the ListBox.

I don't want to distinct the records in the SQL query, because I have other
usage for those duplicates records.

How can this be done? Please help, thanks in advance.
Jun 7 '06 #1
3 2193
Hi Mae,

Does it have to be client-side and right after binding the control?

It's hard to get into a server-side event like that to do client-side stuff.

Why not loop through the items collection on the server-side to remove the
duplicates?

Or, what about running the JavaScript immediately after the page is loaded?
That's far safer:

http://msdn2.microsoft.com/en-us/lib...tupscript.aspx

Ken
Microsoft MVP [ASP.NET]

"Mae Lim" <Ma****@discussions.microsoft.com> wrote in message
news:59**********************************@microsof t.com...
Hi All,

I've a problem here, I want to trigger a javascript function after binding
the ListBox control. Basically the javascript will remove the duplicates
records after recordset is bind in the ListBox control automatically
without
users onclick/onchange the ListBox.

I don't want to distinct the records in the SQL query, because I have
other
usage for those duplicates records.

How can this be done? Please help, thanks in advance.

Jun 7 '06 #2

Ken Cox [Microsoft MVP] wrote:
Hi Mae,

Does it have to be client-side and right after binding the control?

It's hard to get into a server-side event like that to do client-side stuff.

Why not loop through the items collection on the server-side to remove the
duplicates?

Or, what about running the JavaScript immediately after the page is loaded?
That's far safer:

http://msdn2.microsoft.com/en-us/lib...tupscript.aspx

Ken
Microsoft MVP [ASP.NET]

"Mae Lim" <Ma****@discussions.microsoft.com> wrote in message
news:59**********************************@microsof t.com...
Hi All,

I've a problem here, I want to trigger a javascript function after binding
the ListBox control. Basically the javascript will remove the duplicates
records after recordset is bind in the ListBox control automatically
without
users onclick/onchange the ListBox.

I don't want to distinct the records in the SQL query, because I have
other
usage for those duplicates records.

How can this be done? Please help, thanks in advance.


Can you not use two SQL queries one that returns distinct rows and one
that doesn't and use them accordingly.

Jun 7 '06 #3

Rather than maintaining 2 SPs, could you use the create a DataView from
the binded DataSet? In other words apply your DataView (where you
remove the duplicates) to the DataSet and then bind your list box to the
DataView?

Bill Gregg
MCP, MCAD
*** Sent via Developersdex http://www.developersdex.com ***
Jun 7 '06 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Frustrated | last post by:
I have an application that we are porting from Unmanaged C++ to VB.NET that involves sockets. There are two pieces to the code. One piece is a one to one TCP call to a server which is working...
4
by: John | last post by:
Hi all, This really is quite an urgent matter. I have a page with multiple, dynamically-loaded user controls and when a user clicks on a button, the whole form is submitted. Now at this stage...
9
by: Moe Sizlak | last post by:
Hi There, I am trying to write the selected value of a listcontrol when a button is clicked and I keep getting the error "object not set to a reference of an object". The libox itself is in a...
1
by: Bob | last post by:
Hi, Hope you can help me with this one. I'm at my wits end. I'm trying to create an intelligent edit-box like the excellent "Customer" one at the URL: ...
1
kaleeswaran
by: kaleeswaran | last post by:
this is my trigger function but when i tried to run the pgm the error shows like this: PLS-00049: bad bind variable 'NEW.SNO' PLS-00049: bad bind variable 'OLD.SNO' PLS-00049: bad bind...
4
by: ashasivan | last post by:
Hi, Please help me as soon as possible for the following problem. It is very very urgent. I have an XML file as follows: <?xml version="1.0" standalone="yes"?> <Employee> <em...
0
by: imran haq | last post by:
Hi All, I have 3 rather Long Questions that are causing alot of trouble: I would appreciate all the help i can get and tried to use A post sent to atli in the past but it did not help... !) I...
1
by: daonho | last post by:
I tried to use javascript to trigger up the button click function when user press enter key from the textbox. This function work fine with a single button click such has login page. However, if the...
2
by: pankajsingh5k | last post by:
Dear All, Please help me... I had read an article to lazy load a tab in a tabcontainer using an update panel on http://mattberseth.com/blog/2007/07/how_to_lazyload_tabpanels_with.html ...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.