|
I have a fields called validfrom and validto
something like
SELECT * from table where form.date1 and form.date2 fall between "VALIDDFROM" and "VALIDTO"
So I have a validfrom date January and a validto date of december in the db in same record
but my user types in feb to march
as
feb - march falls inside the jan - dec
that result is pulled to the broweser?
- Michael Fasani
www.michaelfasani.com
|
|
|
|
|
if U need to make it in february or january then used function date("m") or goto http://www.asp101.com/articles/john/expirationdate/default.asp, u find everything. If not find then mail me at himadrish@yahoo.com, else take sunbath in bay area. BE COOL PLS.
Ur site is not running
Himadrish Laha
|
|
|
|
|
Hello,
I would like to write a page with c# in which the user can upload a file to the server. When I tested this on my machine it worked, but when the page was tested on the server, the user could not upload the file. It said access to the folder on the server was denied. Does anyone know how to set permissions so that any user can upload to the server from this page?
Thanks,
RC
|
|
|
|
|
Hello,
I had the same problem a few days ago!
The user on the server that executes the scripts doesn't have write acces to the directories. I don't think that you can change the permissions directly, you'll have to ask the server administrator to set permissions.
Hope this helps.
A student knows little about a lot.
A professor knows a lot about little.
I know everything about nothing.
|
|
|
|
|
I need to be able to import text files and manipulate them
|
|
|
|
|
What's your point?
NATHAN RIDLEY
Web Application Developer
email: nathan @ netlab.com.au
[remove the spaces before and after the @ symbol]
|
|
|
|
|
Fascinating. What's your question?
- Mike
|
|
|
|
|
Hello,
I'm building a site which requires a user to login. I've seen pages where the user is prompted to enter the username and password in a modal dialog.
I want a similar solution, but I can't seem to find any documentation on this subject.
Does anyone know a tutorial or something?
thanks
A student knows little about a lot.
A professor knows a lot about little.
I know everything about nothing.
|
|
|
|
|
I think you are referring to the standard authentication dialogs which browsers pop up in response to a page that uses an HTTP authentication scheme (not JavaScript), the most common of which is called "Basic Authentication" (there's also "Digest Authentication").
This requires configuration of the web server, or a server-side script that accesses HTTP headers directly.
- Mike
|
|
|
|
|
thanks for your answer!
A student knows little about a lot.
A professor knows a lot about little.
I know everything about nothing.
|
|
|
|
|
I very like JScrip.NET with Class-based Objects function. It looks like clearly. Now JScrip.NET 's syntax has became close to with other OPP languages as C#, VB.NET. I want to translate some old JavaScrip functions to JScrip.NET.
But I don't now that what does JScrip.NET require about client web browsers. If these requirements are too high, may be I will have to consider again.
Please help me.
Thank you
Trong Tuan
|
|
|
|
|
JScript.NET is NOT a replacement for JScript. JScript.NET - for one - is a compiled, type-safe language. Also, JScript is an automation language, which uses dispatch interfaces to attach to late-bound functions and classes.
If you like having classes, you can create these even in JScript by declaring a function, use the this property, and define methods. You don't to use the .NET BCL like you do in JScript.NET, but I gave you just a couple reasons why this isn't feasible or possible above.
For more information about how to create JScript classes with properties and methods, see http://caucuscare.com/~roth/JAVASCRIPT/ch07_05.htm[^] (randomly pulled from google after checking its validity).
-----BEGIN GEEK CODE BLOCK-----
Version: 3.21
GCS/G/MU d- s: a- C++++ UL@ P++(+++) L+(--) E--- W+++ N++ o+ K? w++++ O- M(+) V? PS-- PE Y++ PGP++ t++@ 5 X+++ R+@ tv+ b(-)>b++ DI++++ D+ G e++>+++ h---* r+++ y+++
-----END GEEK CODE BLOCK-----
|
|
|
|
|
I guess this is a simple problem for which I do not have an answer. The following is taken from "global.asa" for an ASP application. It simply calls a method that parses an XML file (LoadSiteConfig). This method is included in loadsiteconfig.vb. However, it appears that the method LoadSiteConfig is not called on application start. I'm suspecting there's some syntax error the way I included the source "loadsiteconfig.vb" using the "src" attribute:
<script language="vbscript" runat="server" src="loadsiteconfig.vb">
sub Application_OnStart
LoadSiteConfig()
end sub
sub Application_OnEnd
end sub
</script>
Here's what "loadsiteconfig.vb" looks like:
Function LoadSiteConfig()
... parses an XML file using Server.CreateObject("microsoft.XMLDOM") ...
End Function
Am I doing the right thing? The way I included the ".vb" file in "global.asa"?? I'm having some trouble to trace where it went wrong that the function is not called it appears. Thanks!
|
|
|
|
|
Doesn't a Function have to return a value in VBScript? I don't use them often enough to be sure, but I seem to recall that functions have to be used on the right side of an assignment operator, while Subs can be called as freestanding entities. Try changing the Function to a Sub in loadsiteconfig.vb and see if that helps.
"Your village called - They're missing their idiot."
|
|
|
|
|
does anyone know how to use the Javascript fireEvent method? - I'm having some problems implementing it with an object in IE 6.
- here's an example of what does work.
<script>document.onkeydown = doalert<br />
function doCalc(){<br />
var evtObj = document.createEventObject();<br />
<br />
evtObj.ctrlKey = true;<br />
evtObj.keyCode = 70;<br />
<br />
document.fireEvent("onkeydown",evtObj);<br />
}<br />
function doalert(){<br />
document.forms.temp.field1.innerHTML = document.forms.temp.field1.innerHTML +String.fromCharCode(window.event.keyCode)<br />
}<br />
</script><br />
</component><br />
<form name="temp"><br />
<textarea name="field1">hello</textarea><br />
</form>
I am using microsofts dhtml editor in IE 6 and I'm trying to emulate the "tab" key in tables - so that it moves to the next cell... - one way of doing this is by replacing the "tab" key click with the "ctrl" + "down arrow" keys, now for some reason I cannot get IE to apply these keystrokes to the object and for that matter I cannot get it to recognize that the "ctrlKey" value is set to true (for a case where I would like to press "ctrl" + "f"...)
if someone can please help me out that would be greatly appreciated.
Thank you,
webProgrammer
|
|
|
|
|
Does anyone know if it's possible to do *anything* other than a standard form post with a file input field? I'd ideally like to base64 encode the file data into an xml file and send the xml file off to the server, rather than using the standard multipart/form-data method.
NATHAN RIDLEY
Web Application Developer
email: nathan @ netlab.com.au
[remove the spaces before and after the @ symbol]
|
|
|
|
|
For the pro's I am sure this is simple:
I need to be able to filter my main table based on the contents using 1 of 4 fields in the table. It would be something like this, you have a dropdown box listing the type of filter you want, Owner/Phase/Type/Class; by selecting one of these you would then populate another dropdown box with all of those objects. Then by selecting your object from the second box and hitting a submit button you are then returned a filtered table of the corresponding objects.
I have been looking at the <a href="http://www.codeproject.com/jscript/dynaframe.asp">dynaframe</a> example posted here on the site, but can not get it to function in my architecture.
<b>Thanks to all the pro's!!! </b>
David E.Wright
URS Corporation - Denver Downtown Operations
|
|
|
|
|
|
consider a FORM with a Browse for file feature, and some other FORM elements in it. Now, lets assume that some FORM processing can't be done in Javascript and needs to post the information to the server for validation. Now, if the validation failed, I would like to present the user with an option to resubmit a correction. This is where I am stuck.
The free ASPSimpleUpload component doesn't let me use FOR EACH element IN... which was intended to write out all the form data (regardless of what form elements I have) to a HIDDEN INPUT field. What I wanted to achieve by this is let the user correct only the non-valid fields, and the rest remain hidden. Then, upon re-submit, the form gets processed again.
1. What happens to the uploaded file? does it get uploaded again?
2. How can I go around the FOR EACH statment and let the user enter a correction? Is there a way to do a BACK button without loosing information?
Notes:
-I can't install DLLs or components on the server.
-The server only supports ASPSimpleUpload
-splitting the form from the file upload is hazardous, since someone can
start the form, enter a record in the database, and not upload files...
Appreciate the help or any input on this matter.
I have read all the articles regarding this issue on codeproject.
Thanks in advance!
Does ASP stand for Awful Server Punishment ?
|
|
|
|
|
Thats why real programmers use PHP
jk.
What happens to the uploaded file? does it get uploaded again?
AFAIK yes it would, if it was successfully uploaded in the first place, unless ASPSimpleUpload checks for duplicates and auto-renames files to avoid conflict.
How can I go around the FOR EACH statment and let the user enter a correction? Is there a way to do a BACK button without loosing information?
Have you considered using cookies? My experience is very limited in ASP becuz I switched to PHP very early, so I'm not sure why you can't FOR EACH elements while using ASPSimpleupload. How are you suppose to validate INPUT fields period? Anyways, you could store the info in cookies and just use JScript to restore values in INPUT fields when someone clicks back.
p.s-You might want to try and flag down Paul, he seems to be the resident ASP guru on CP
Cheers and remember, you could easily solve this problem with PHP
The word of the day is legs, let's go back to my house and spread the word
|
|
|
|
|
Hockey wrote:
why you can't FOR EACH elements while using ASPSimpleupload
Well you can't FOR EACH elements because the object doesn't support this property. You validate input by using the upload_component.Form methods. But I need to write about 30 lines of code to extract all data instead of using a simple FOR EACH loop...
PHP is not an option since most of the code has been already written in ASP. converting the whole logic to PHP is a time hassle.
Appreciate any ideas!
Thanks.
|
|
|
|
|
I have this code but the price in $ 25 only.
Himadrish Laha
|
|
|
|
|
Hey ne1... can u help
I need to be able to populate a dropdownlist control based on the selection of a previous dropdownlist control !CLIENTSIDE! ...using javascript I am having a problem retrieving both name/value pairs... value is fine - name seems not possible? using XML I can't seem to filter the values in dropdownlist2 based on the selection in dropdownlist1.... is it possible? can u help?
thanks
X
|
|
|
|
|
Hi all,
I'm kind of a newby in webservices so I think this will be a simple question for you all.
I want to create an object on de webservice side (server) and return it to the application (client). The object on the client side must have the methods of the original object.
The code on the client side:
[webmethod]
public car createCar (string licenceplate)
{
car car = new car(licencePlate);
return car;
}
method in object class file (car.cs)
public string getLicencePlate
{
return this.licencePlate;
}
on the client side i want to ask the object its licenceplate. So: car.getLicencePlate();
But i can't see the methods. I only get the public attributes (and i don't want those)
Does anyone have a clear sample of returning Custom Type objects with WebServices or maybe give me a lesson in Serializable.
Ow.. I forgot... the client side is reacting asyn.
I hope someone can help me.
Kind regards,
Joost Voskuil
The Netherlands.
|
|
|
|
|
First, the method attributed with WebMethodAttribute must be on the server-side. You use the WSDL (contract) for the WebService to create a proxy object (i.e., an object that the client uses to proxy calls to the WebService).
As far as serialization goes, there is an example in your .NET Framework SDK. See <SDK>v1.0\Samples\Technologies\Serialization. You should also take a look at the System.Xml.Serialization . Many of the classes and methods in that namespace have example source code. It's just another way to control serialization that's designed more for XML. Just attributed classes and properties with various XML serialization attributes and have a public default constructor (a public constructor with no parameters).
Ultimately, serialization will get you farther (like with remoting), but I thought I'd mention XML serialization as an alternative when using WebServices (also handy to persist application settings and documents that you want other applications to be able to read easily).
Whichever way, just create an class that is attributed with SerializableAttribute (and optionally implements ISerializable , or that uses the attributes in System.Xml.Serialization . Pass that type as a parameter (or as a return value) in your WebService method and that's really all you need to do.
-----BEGIN GEEK CODE BLOCK-----
Version: 3.21
GCS/G/MU d- s: a- C++++ UL@ P++(+++) L+(--) E--- W+++ N++ o+ K? w++++ O- M(+) V? PS-- PE Y++ PGP++ t++@ 5 X+++ R+@ tv+ b(-)>b++ DI++++ D+ G e++>+++ h---* r+++ y+++
-----END GEEK CODE BLOCK-----
|
|
|
|