|
-
Aug 21st, 2002, 10:55 PM
#1
Thread Starter
New Member
how to trigger javascript from active x control
Dear all,
1. I've made an activeX control that is embedded in IE, however I want to
trigger an javascript or vbscript function when the user leave my control
( my control has GUI ), how could this be done?
I've tried the code intuitively like
Public Event onFieldLeave(strField As String, strTable As String)
Private Sub UserControl_LostFocus()
RaiseEvent onFieldLeave("attachment", "attachment")
End Sub
and use javacript like
<SCRIPT language="JavaScript" FOR="ReadDirCtl" EVENT="OnFieldLeave(
strField, strTable )">
alert ("OnFieldLeave is fired");
</script>
however, nothing appeared.
2. Everytime I open the active X control that have script to control it, it
always ask "may not safe for scripting", could I register the control as
safe for scripting so i don't need to answer this question each time when I
open the browser, in face the active X control is registered and it is an
OCX from local computer.
Thank you for any advice!
Regards,
Ginrai
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
|