Wrox Programmer Forums
| Search | Today's Posts | Mark Forums Read
Classic ASP Basics For beginner programmers starting with "classic" ASP 3, pre-".NET." NOT for ASP.NET 1.0, 1.1, or 2.0
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
  #1 (permalink)  
Old June 28th, 2007, 07:30 PM
Authorized User
 
Join Date: Jun 2007
Location: Las Vegas, Nevada, USA.
Posts: 17
Thanks: 0
Thanked 0 Times in 0 Posts
Default geting the value from an Object

I want to add a calanar object to my page so that the user can select a date. I did this witht he <Object> Tag and the MS datepicker control my question is how do I get the value from the control when I post the page the Object code is as follows.. Any help would be greatly appricated. so far I have tried to assign the Dtpicker1.value to a text box as a test and i get an error stating this is an invalid use of the property.

<OBJECT id=DTPicker1 height=25 width=100 classid=CLSID:20DD1B9E-87C4-11D1-8BE3-0000F8754DA1 VIEWASTEXT NAME="Cal">
    <PARAM NAME="_ExtentX" VALUE="2646">
    <PARAM NAME="_ExtentY" VALUE="1349">
    <PARAM NAME="_Version" VALUE="393216">
    <PARAM NAME="MousePointer" VALUE="0">
    <PARAM NAME="Enabled" VALUE="1">
    <PARAM NAME="OLEDropMode" VALUE="0">
    <PARAM NAME="CalendarBackColor" VALUE="-2147483643">
    <PARAM NAME="CalendarForeColor" VALUE="-2147483630">
    <PARAM NAME="CalendarTitleBackColor" VALUE="-2147483633">
    <PARAM NAME="CalendarTitleForeColor" VALUE="-2147483630">
    <PARAM NAME="CalendarTrailingForeColor" VALUE="-2147483631">
    <PARAM NAME="CheckBox" VALUE="0">
    <PARAM NAME="CustomFormat" VALUE="">
    <PARAM NAME="DateIsNull" VALUE="0">
    <PARAM NAME="Format" VALUE="662831105">
    <PARAM NAME="UpDown" VALUE="0">
    <PARAM NAME="CurrentDate" VALUE="39261">
    <PARAM NAME="MaxDate" VALUE="2958465">
    <PARAM NAME="MinDate" VALUE=date>
    </OBJECT>
  #2 (permalink)  
Old June 29th, 2007, 10:59 AM
Authorized User
 
Join Date: Sep 2006
Location: Jax, NC, USA.
Posts: 74
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to misskaos
Default

OK.. Im not familiar with your method.. however there is a free web calendar u can download..
http://www.fullrevolution.com/23y543...endar_FREE.zip

in this calendar.zip file there is a folder called "calendar" and inside calendar there is a folder called "datepicker". The datepicker folder holds the popcalendar which is a js file (popcalendar.js).. copy the entire datepicker folder to where ever you are hosting your page. (put it in the root directory).

To use the calendar.. simply locate where you want the calendar to go (by an input box)...

From an ASP page:
<%
response.write "<script language=""javascript"" src=""datepicker/popcalendar.js""></script>"
%>
<html>
<tr>
<table>
<td width="550" colspan = "11">
<input type="text" name="InputBoxName" value = "" readonly="readonly" size = "30">
<%
response.write "<IMG SRC='datepicker/datepicker.gif' VALUE=PICK onClick=""popUpCalendar(this, InputBoxName, 'mm/dd/yyyy')"">"
%>
</td>
</tr>
</table>
</html>

the only thing else you MAY need to change is the image directory in the popcalendar.js file itself.
If your images do not popup correctly.. open the .js file, look around line 28 for "var imgDir = 'calendar/datepicker/'; this will need to be changed to 'datepicker/datepicker/' since u are removing the datepicker folder from the calendar folder.

Hope that's not too complicated sounding. Its really just a matter of downloading.. copying the folder.. and adding those 2 or 3 lines of code to your coding.

T.B.
misskaos99@yahoo.com


Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem in geting the @@Identity Value janamca_thanan Biztalk 0 December 17th, 2006 09:31 AM
geting money type from sql msrnivas Classic ASP Components 1 July 19th, 2004 11:09 AM
geting money type from sql msrnivas .NET Web Services 1 July 19th, 2004 06:36 AM
Geting Index of a children tutul128 XML 2 May 27th, 2004 10:34 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.