Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Dropdownlist and OnMouseover Event using Ajax

Reply
Thread Tools

Dropdownlist and OnMouseover Event using Ajax

 
 
=?Utf-8?B?RGVlcGE=?=
Guest
Posts: n/a
 
      03-31-2007
Hi All,

I have a webform in asp.net framework 1.1 where the dropdownlist is
populated with list of locations from the database. The depending on the list
selected, the user will be able to see functions associated for that location.

Ex: Location: Charleston
Functions: Add, Delete, Cancel, Edit

Location: Los Angeles
Functions: Activate, Cancel

The functions will be displayed in a Repeater control in the right corner of
the page.
I was able to use OnChange of this dropdownlist to show the list of
functions. But, I would like to use OnMouseover of the list of items in the
dropdownlist to show the functions. The list has to change everytime the user
does a mouseover on the location. How can I accomplish this?

Here is my code:

<aspropDownList id="LocationsGroups" tabIndex="16" runat="server"
cssclass="body-small" width="100%"></aspropDownList>

<asp:repeater id="GrpLocFunctions" runat="server">
<ItemTemplate>
<tbody>
<tr class="regular-row">
<td width="100%"><%# DataBinder.Eval(Container.DataItem, "FUNCTION") %>
</td>
</tr>
</ItemTemplate>
<AlternatingItemTemplate>
<tr class="alternate-row">
<td width="100%"><%# DataBinder.Eval(Container.DataItem, "FUNCTION") %>
</td>
</tr>
</AlternatingItemTemplate>
<FooterTemplate>
</tbody>
</table>
</FooterTemplate>
</asp:repeater>

AJAX code:

function filterFuncs() {
var gl = document.getElementById('LocationsGroups').options .value;
SunCom.UsersAgentAdmin.UserMaint.FilterGroupLocati onFunctions(gl,
filterFuncs_CallBack);

}

function filterFuncs_CallBack(res) {
if(res.error == null) {
document.getElementById('GroupLocationFunctions'). innerHTML =
res.value;
}
}

The code behind calls this

LocationsGroups.Attributes.Add("OnChange", "filterFuncs();")

I tried to change the OnChange to OnMouseOver. It didnot work.

Appreciate some help.

Thanks.

 
Reply With Quote
 
 
 
 
Ben Rush
Guest
Posts: n/a
 
      03-31-2007
Hi Deepa,

IE doesn't seem to support onmouseover on the option tag, which is I *think*
what you're getting at (ie, when someone mouses over an item in the opened
drop-down menu you can detect that through an event and, in your case,
update something on the page). It appears as though some browsers support
this, but IE does not (see the "Applies to" section at the bottom of this
page):

http://msdn.microsoft.com/library/de...nmouseover.asp

--
~~~~~~~~~~~
Ben Rush
http://www.ben-rush.net/blog


"Deepa" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Hi All,
>
> I have a webform in asp.net framework 1.1 where the dropdownlist is
> populated with list of locations from the database. The depending on the
> list
> selected, the user will be able to see functions associated for that
> location.
>
> Ex: Location: Charleston
> Functions: Add, Delete, Cancel, Edit
>
> Location: Los Angeles
> Functions: Activate, Cancel
>
> The functions will be displayed in a Repeater control in the right corner
> of
> the page.
> I was able to use OnChange of this dropdownlist to show the list of
> functions. But, I would like to use OnMouseover of the list of items in
> the
> dropdownlist to show the functions. The list has to change everytime the
> user
> does a mouseover on the location. How can I accomplish this?
>
> Here is my code:
>
> <aspropDownList id="LocationsGroups" tabIndex="16" runat="server"
> cssclass="body-small" width="100%"></aspropDownList>
>
> <asp:repeater id="GrpLocFunctions" runat="server">
> <ItemTemplate>
> <tbody>
> <tr class="regular-row">
> <td width="100%"><%# DataBinder.Eval(Container.DataItem, "FUNCTION") %>
> </td>
> </tr>
> </ItemTemplate>
> <AlternatingItemTemplate>
> <tr class="alternate-row">
> <td width="100%"><%# DataBinder.Eval(Container.DataItem, "FUNCTION") %>
> </td>
> </tr>
> </AlternatingItemTemplate>
> <FooterTemplate>
> </tbody>
> </table>
> </FooterTemplate>
> </asp:repeater>
>
> AJAX code:
>
> function filterFuncs() {
> var gl = document.getElementById('LocationsGroups').options .value;
> SunCom.UsersAgentAdmin.UserMaint.FilterGroupLocati onFunctions(gl,
> filterFuncs_CallBack);
>
> }
>
> function filterFuncs_CallBack(res) {
> if(res.error == null) {
> document.getElementById('GroupLocationFunctions'). innerHTML =
> res.value;
> }
> }
>
> The code behind calls this
>
> LocationsGroups.Attributes.Add("OnChange", "filterFuncs();")
>
> I tried to change the OnChange to OnMouseOver. It didnot work.
>
> Appreciate some help.
>
> Thanks.
>



 
Reply With Quote
 
 
 
 
=?Utf-8?B?RGVlcGE=?=
Guest
Posts: n/a
 
      04-01-2007
Hi Ben,

Thanks for the info.

Is there any other way to accomplish this?

Deepa

"Ben Rush" wrote:

> Hi Deepa,
>
> IE doesn't seem to support onmouseover on the option tag, which is I *think*
> what you're getting at (ie, when someone mouses over an item in the opened
> drop-down menu you can detect that through an event and, in your case,
> update something on the page). It appears as though some browsers support
> this, but IE does not (see the "Applies to" section at the bottom of this
> page):
>
> http://msdn.microsoft.com/library/de...nmouseover.asp
>
> --
> ~~~~~~~~~~~
> Ben Rush
> http://www.ben-rush.net/blog
>
>
> "Deepa" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
> > Hi All,
> >
> > I have a webform in asp.net framework 1.1 where the dropdownlist is
> > populated with list of locations from the database. The depending on the
> > list
> > selected, the user will be able to see functions associated for that
> > location.
> >
> > Ex: Location: Charleston
> > Functions: Add, Delete, Cancel, Edit
> >
> > Location: Los Angeles
> > Functions: Activate, Cancel
> >
> > The functions will be displayed in a Repeater control in the right corner
> > of
> > the page.
> > I was able to use OnChange of this dropdownlist to show the list of
> > functions. But, I would like to use OnMouseover of the list of items in
> > the
> > dropdownlist to show the functions. The list has to change everytime the
> > user
> > does a mouseover on the location. How can I accomplish this?
> >
> > Here is my code:
> >
> > <aspropDownList id="LocationsGroups" tabIndex="16" runat="server"
> > cssclass="body-small" width="100%"></aspropDownList>
> >
> > <asp:repeater id="GrpLocFunctions" runat="server">
> > <ItemTemplate>
> > <tbody>
> > <tr class="regular-row">
> > <td width="100%"><%# DataBinder.Eval(Container.DataItem, "FUNCTION") %>
> > </td>
> > </tr>
> > </ItemTemplate>
> > <AlternatingItemTemplate>
> > <tr class="alternate-row">
> > <td width="100%"><%# DataBinder.Eval(Container.DataItem, "FUNCTION") %>
> > </td>
> > </tr>
> > </AlternatingItemTemplate>
> > <FooterTemplate>
> > </tbody>
> > </table>
> > </FooterTemplate>
> > </asp:repeater>
> >
> > AJAX code:
> >
> > function filterFuncs() {
> > var gl = document.getElementById('LocationsGroups').options .value;
> > SunCom.UsersAgentAdmin.UserMaint.FilterGroupLocati onFunctions(gl,
> > filterFuncs_CallBack);
> >
> > }
> >
> > function filterFuncs_CallBack(res) {
> > if(res.error == null) {
> > document.getElementById('GroupLocationFunctions'). innerHTML =
> > res.value;
> > }
> > }
> >
> > The code behind calls this
> >
> > LocationsGroups.Attributes.Add("OnChange", "filterFuncs();")
> >
> > I tried to change the OnChange to OnMouseOver. It didnot work.
> >
> > Appreciate some help.
> >
> > Thanks.
> >

>
>
>

 
Reply With Quote
 
Ben Rush
Guest
Posts: n/a
 
      04-01-2007
You may want to start looking at other control developers and see if someone
has implemented anything that will allow you to do this. Perhaps Telerik
(http://www.telerik.com); I've used them before and am a big fan. I'm
unaware as to whether they have anything for you.

You can maybe look to another option for displaying the locations (in lieu
of using a dropdown list). Perhaps just a scrollable DIV tag in the browser,
etc.

--
~~~~~~~~~~~
Ben Rush
http://www.ben-rush.net/blog


"Deepa" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Hi Ben,
>
> Thanks for the info.
>
> Is there any other way to accomplish this?
>
> Deepa
>
> "Ben Rush" wrote:
>
>> Hi Deepa,
>>
>> IE doesn't seem to support onmouseover on the option tag, which is I
>> *think*
>> what you're getting at (ie, when someone mouses over an item in the
>> opened
>> drop-down menu you can detect that through an event and, in your case,
>> update something on the page). It appears as though some browsers support
>> this, but IE does not (see the "Applies to" section at the bottom of this
>> page):
>>
>> http://msdn.microsoft.com/library/de...nmouseover.asp
>>
>> --
>> ~~~~~~~~~~~
>> Ben Rush
>> http://www.ben-rush.net/blog
>>
>>
>> "Deepa" <(E-Mail Removed)> wrote in message
>> news:(E-Mail Removed)...
>> > Hi All,
>> >
>> > I have a webform in asp.net framework 1.1 where the dropdownlist is
>> > populated with list of locations from the database. The depending on
>> > the
>> > list
>> > selected, the user will be able to see functions associated for that
>> > location.
>> >
>> > Ex: Location: Charleston
>> > Functions: Add, Delete, Cancel, Edit
>> >
>> > Location: Los Angeles
>> > Functions: Activate, Cancel
>> >
>> > The functions will be displayed in a Repeater control in the right
>> > corner
>> > of
>> > the page.
>> > I was able to use OnChange of this dropdownlist to show the list of
>> > functions. But, I would like to use OnMouseover of the list of items in
>> > the
>> > dropdownlist to show the functions. The list has to change everytime
>> > the
>> > user
>> > does a mouseover on the location. How can I accomplish this?
>> >
>> > Here is my code:
>> >
>> > <aspropDownList id="LocationsGroups" tabIndex="16" runat="server"
>> > cssclass="body-small" width="100%"></aspropDownList>
>> >
>> > <asp:repeater id="GrpLocFunctions" runat="server">
>> > <ItemTemplate>
>> > <tbody>
>> > <tr class="regular-row">
>> > <td width="100%"><%# DataBinder.Eval(Container.DataItem, "FUNCTION") %>
>> > </td>
>> > </tr>
>> > </ItemTemplate>
>> > <AlternatingItemTemplate>
>> > <tr class="alternate-row">
>> > <td width="100%"><%# DataBinder.Eval(Container.DataItem, "FUNCTION") %>
>> > </td>
>> > </tr>
>> > </AlternatingItemTemplate>
>> > <FooterTemplate>
>> > </tbody>
>> > </table>
>> > </FooterTemplate>
>> > </asp:repeater>
>> >
>> > AJAX code:
>> >
>> > function filterFuncs() {
>> > var gl = document.getElementById('LocationsGroups').options .value;
>> > SunCom.UsersAgentAdmin.UserMaint.FilterGroupLocati onFunctions(gl,
>> > filterFuncs_CallBack);
>> >
>> > }
>> >
>> > function filterFuncs_CallBack(res) {
>> > if(res.error == null) {
>> > document.getElementById('GroupLocationFunctions'). innerHTML =
>> > res.value;
>> > }
>> > }
>> >
>> > The code behind calls this
>> >
>> > LocationsGroups.Attributes.Add("OnChange", "filterFuncs();")
>> >
>> > I tried to change the OnChange to OnMouseOver. It didnot work.
>> >
>> > Appreciate some help.
>> >
>> > Thanks.
>> >

>>
>>
>>



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to trap onclick event handler amidst onmouseleave, onmouseover, and onmouseout JJA Javascript 0 10-31-2007 04:53 PM
Ajax en the Form_load event and Ajax in serveruser controls =?Utf-8?B?VG9u?= ASP .Net 2 06-22-2007 09:16 AM
OnMouseOver, ImageMap and AJAX BP ASP .Net 1 05-02-2007 04:14 PM
AJAX IDE and AJAX TOOL--The Release of JoyiStar AJAX WebShop 3 Beta minnie Java 1 12-13-2006 06:29 AM
onmouseover and onmouseout event Samir Javascript 7 11-05-2004 12:36 PM



Advertisments