|
-
Aug 21st, 2005, 11:30 PM
#1
Thread Starter
New Member
Simulating a dropdown event for a select object in html.
Not sure if this is the right forum.
I want to Simulating a dropdown event for a select object in html.
First I thought something like this could do,
For j = 0 To mtag.Options.length - 1
If InStr(1, mtag.Options(j).innerText, "XXXX") > 0 Then
mtag.Item(j).Selected = True
Exit For
End If
Next j
It turns out a dropdown event never happen although the item in the select object is selected.
Anyone have an idea how to do this?
Thanks in advance
-
Aug 22nd, 2005, 06:24 AM
#2
Re: Simulating a dropdown event for a select object in html.
-
Aug 22nd, 2005, 06:55 AM
#3
Re: Simulating a dropdown event for a select object in html.
After selecting the item using .Selected, call the .onChange() method of the dropdown list.
-
Aug 22nd, 2005, 12:27 PM
#4
Thread Starter
New Member
Re: Simulating a dropdown event for a select object in html.
 Originally Posted by mendhak
After selecting the item using .Selected, call the .onChange() method of the dropdown list.
Sorry I'm a newbie into this. Isn't the onchange method controlled by the webpage client-side javascript? Or should I transferred some parameters to the client-side javascript? Or object.Fireevent(OnChange) works?
And I found that "The onchange event does not fire when the selected option of the select object is changed programatically"
Thanks
-
Aug 22nd, 2005, 12:31 PM
#5
Thread Starter
New Member
Re: Simulating a dropdown event for a select object in html.
Yeah, the fireevent method works.
Thanks a lot.
-
Aug 23rd, 2005, 01:23 AM
#6
Re: Simulating a dropdown event for a select object in html.
Excellent. Add [Resolved] to the thread title.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|