p2p.wrox.com Forums

Need to download code?

View our list of code downloads.


  Return to Index  

asp_databases thread: Javascript validating function and uploading


Message #1 by Romy Jarr <romyjarr@t...> on Sat, 01 Dec 2001 14:54:35 +0800
This is a multi-part message in MIME format.



--Boundary_(ID_P7qUuzc+EJ61HArL4zpHcw)

Content-type: text/plain; charset=iso-8859-1

Content-transfer-encoding: 7BIT



Hello guys,



I have two problems here:



(a)  I need to create a Javascript function that will allow me to validate data entry from a textbox.  This textbox shall allow the
user to enter only two kind of inputs.  These two situations are as follows:



- to key in a date in a coventional date format, for example: 6/12/2001, 12/5/2001, 12/31/2001, etc.

OR

- to just key in a number of days, for example: +7 would means 7 days, +21 would means three weeks, +60 would means two months, etc.



The user shall only be allowed to key in data in these two formats.  Otherwise, the system shall prompt an alert box stating that
the user's input is not in the desired format.  Can someone here please show me the source code for that validating function?



(b)  I'm currently creating a simple Web-based application using ASP.  I'm using Microsoft Access as its database repository.  The
application shall allow its user to upload picture/image (.jpg, .gif, .bmp).  How am I supposed to upload a picture? Would it be
sufficient to just only using <INPUT TYPE="file" NAME="picture".......> and then store the picture variable into the relevant
created recordset like this: rsItems("picture") = Request.Form("picture").  Is this the correct way to perform this uploading
(picture/image) function?  Or should I use any other ASP element in order to perform the uploading (picture/image) function, for
instance by using ASP upload component, etc?  Please show me the right way and perhaps the source code also.



Thank you.  Your assistance is greatly appreciated.



Kindly regards,

Romy

Kuala Lumpur, Malaysia.




Message #2 by "Dallas Martin" <dmartin@z...> on Sat, 1 Dec 2001 08:53:30 -0500
a) www.docjavascript.com



b) www.persits.com - look for the ASPUpload product.









----- Original Message -----

From: "Romy Jarr" <romyjarr@t...>

To: "ASP Databases" <asp_databases@p...>

Sent: Saturday, December 01, 2001 1:54 AM

Subject: [asp_databases] Javascript validating function and uploading





> Hello guys,

>

> I have two problems here:

>

> (a)  I need to create a Javascript function that will allow me to validate

data entry from a textbox.  This textbox shall allow the user to enter only

two kind of inputs.  These two situations are as follows:

>

> - to key in a date in a coventional date format, for example: 6/12/2001,

12/5/2001, 12/31/2001, etc.

> OR

> - to just key in a number of days, for example: +7 would means 7 days, +21

would means three weeks, +60 would means two months, etc.

>

> The user shall only be allowed to key in data in these two formats.

Otherwise, the system shall prompt an alert box stating that the user's

input is not in the desired format.  Can someone here please show me the

source code for that validating function?

>

> (b)  I'm currently creating a simple Web-based application using ASP.  I'm

using Microsoft Access as its database repository.  The application shall

allow its user to upload picture/image (.jpg, .gif, .bmp).  How am I

supposed to upload a picture? Would it be sufficient to just only using

<INPUT TYPE="file" NAME="picture".......> and then store the picture

variable into the relevant created recordset like this: rsItems("picture") 

Request.Form("picture").  Is this the correct way to perform this uploading

(picture/image) function?  Or should I use any other ASP element in order to

perform the uploading (picture/image) function, for instance by using ASP

upload component, etc?  Please show me the right way and perhaps the source

code also.

>

> Thank you.  Your assistance is greatly appreciated.

>

> Kindly regards,

> Romy

> Kuala Lumpur, Malaysia.

>

>

>




$subst('Email.Unsub')

>

>

>

> Read the future with ebooks at B&N

>

http://service.bfast.com/bfast/click?bfmid=2181&sourceid=38934667&categoryid

=rn_ebooks

>




  Return to Index