Results 1 to 3 of 3

Thread: Values from ActiveX controls

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Jun 1999
    Posts
    80

    Smile

    Hi,

    How do I get a value from an ActiveX control that I put in a ASP page?

    This is the code I use:

    <OBJECT CLASSID="clsid:20DD1B9E-87C4-11D1-8BE3-0000F8754DA1" ID="dtpFrom" HEIGHT=30 WIDTH=120>

    I get an error when I send the value in a hidden INPUT tag as VALUE=<%=dtpFrom.Value%>.

    Thanks in advance.

  2. #2
    Frenzied Member Mark Sreeves's Avatar
    Join Date
    Nov 1999
    Location
    UK
    Posts
    1,845
    it looks to me that the activeX control is Client-side but you are trying to set VALUE using Serverside <% %> stuff.

    is this the case?

    you could try setting the hidden field value using Javascript in the <BODY> onLoad event

    <BODY onLoad="document.formName.HiddenFieldName.value=document.dtpFrom.Value">

    I have no idea whether or not this will work though because I never use Client-side activeX stuff!
    Mark
    -------------------

  3. #3
    Frenzied Member monte96's Avatar
    Join Date
    Sep 2000
    Location
    Somewhere in AZ
    Posts
    1,379
    Create a hidden INPUT tag. In the onsubmit event for the form, put the contents of the ActiveX control's value into the value of the hidden INPUT tag and reference the value in the INPUT tag on your processing page.
    oOOo--oOOo
    __/\/\onte96
    oOOo--oOOo
    Senior Programmer/Analyst
    MCP
    monte96_@hotmail.com
    monte96@vbgarage.com


    Your results may vary.. some restrictions may apply.. pricing and participation may vary.. not available in all states.. professional driver closed course..quantities limited..

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width