PDA

Click to See Complete Forum and Search --> : Values from ActiveX controls


cedx
Oct 12th, 2000, 03:54 AM
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.

Mark Sreeves
Oct 12th, 2000, 04:33 AM
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!

monte96
Oct 12th, 2000, 10:02 AM
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.