ActiveX by using javascript help

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • shoram
    New Member
    • Feb 2007
    • 26

    #1

    ActiveX by using javascript help

    my first question is can i define a activex object using javascript so i won't need to use IIS
    and my second question is how to do so if it is possible
  • gits
    Recognized Expert Moderator Expert
    • May 2007
    • 5390

    #2
    hi ...

    what do you mean with 'define' ... clientside you may use ActiveX-Objects with jscript and IE only ...

    kind regards

    Comment

    • shoram
      New Member
      • Feb 2007
      • 26

      #3
      define like (in the javascript area)
      var obj = new createobject(.. .) or like
      var obj = new ActivexObject(. ..)

      Comment

      • gits
        Recognized Expert Moderator Expert
        • May 2007
        • 5390

        #4
        Originally posted by shoram
        define like (in the javascript area)
        var obj = new createobject(.. .) or like
        var obj = new ActivexObject(. ..)
        yes ... you can ;) for example:

        [CODE=javascript]
        var xml_http_reques t_obj = new ActiveXObject(' Microsoft.XMLHT TP');
        [/CODE]

        but as i said: it's IE-specific and not used by all other browsers ...

        kind regards

        Comment

        • shoram
          New Member
          • Feb 2007
          • 26

          #5
          thank you very much but if it wont be a problem can you tell me how to activate that object?

          Comment

          • gits
            Recognized Expert Moderator Expert
            • May 2007
            • 5390

            #6
            hmmm ... the object has some methods you may call ... the shown one has open(), send() etc. ... and as far as i know you may find the documentation for the most common ActiveX-Objects at msdn. when using new ActiveXObject you create an instance of the 'class' and then you may use its methods, ask for the properties etc.

            kind regards

            Comment

            • shoram
              New Member
              • Feb 2007
              • 26

              #7
              it really helped , thanks

              Comment

              • gits
                Recognized Expert Moderator Expert
                • May 2007
                • 5390

                #8
                no problem ;) ... post to the forum again when you have more questions ... anytime ...

                kind regards

                Comment

                • shoram
                  New Member
                  • Feb 2007
                  • 26

                  #9
                  ActiveX help

                  hey i want to start a control (in c# .net) using activex control
                  the problem is i need to start it using javascript so i dont know how to activate it

                  <script ...>

                  var myControl1 = new ActiveXObject(A ctiveXDotNet.my Control);//the name of the class


                  //the problem is that i dont know what to do from here to send the wanted value into the activex from the html and how to activate that control that it will do what it needs to do with that value
                  </script>

                  Comment

                  • shoram
                    New Member
                    • Feb 2007
                    • 26

                    #10
                    and i have to not! use the IIS so i cant define the object in HTML

                    Comment

                    • acoder
                      Recognized Expert MVP
                      • Nov 2006
                      • 16032

                      #11
                      Threads merged. Please keep all posts on one topic in the same thread.

                      Comment

                      • acoder
                        Recognized Expert MVP
                        • Nov 2006
                        • 16032

                        #12
                        Originally posted by shoram
                        hey i want to start a control (in c# .net) using activex control
                        the problem is i need to start it using javascript so i dont know how to activate it

                        <script ...>

                        var myControl1 = new ActiveXObject(A ctiveXDotNet.my Control);//the name of the class


                        //the problem is that i dont know what to do from here to send the wanted value into the activex from the html and how to activate that control that it will do what it needs to do with that value
                        </script>
                        Read up on the object in the documentation. Use the properties, attributes, methods, etc. of the class.

                        If you don't know how to access a particular element on the page, show your HTML code.

                        Also, perhaps you could explain exactly what you are trying to do. There may be a better way rather than using ActiveX.

                        Comment

                        • shoram
                          New Member
                          • Feb 2007
                          • 26

                          #13
                          no it must be activex and i unserstood all the rest but now my problem is a bit different
                          it says that my activex object is a null or dont exsist and i think its because script bolcker but i dont know how to handle them

                          Comment

                          • shoram
                            New Member
                            • Feb 2007
                            • 26

                            #14
                            skrech that my problem is now it says that the aotumation server can't create object and i made the initialize and script activex controls not marked as safe ... enabled

                            Comment

                            • acoder
                              Recognized Expert MVP
                              • Nov 2006
                              • 16032

                              #15
                              Originally posted by shoram
                              skrech that my problem is now it says that the aotumation server can't create object and i made the initialize and script activex controls not marked as safe ... enabled
                              See if this Microsoft KB article helps. Also, see this thread.

                              Comment

                              Working...