|
Thanks!
Daniel
---------------------------
Never change a running system!
|
|
|
|
|
What u had given...
Megan Forbes wrote:
date=new Date();
gets only the current date and not the lastModified one... which was required..... There is already a right answer for the asked question
|
|
|
|
|
Last page update :
<script language="Javascript">
document.write (document.lastModified);
</script>
If you use this client-side script from a local web filepage, it returns the actual last modified date property of this file. If you use it through a real web server, it returns the HTTP header last-modified value.
If the date format is not nice enough for your needs, remember that document.lastModified is a string, and you can use RegExp on it to perform all kind of fancy replacements. Warning : locale issues.
|
|
|
|
|
Thanks!
Daniel
---------------------------
Never change a running system!
|
|
|
|
|
I need to send mail from my web-site. My webmaster says, SMTP is not installed in the server. He recomends me to use either of the following.
ASPMail, ASPEmail, PHPMail or CFMail.
Now, as all these are new for me, I wanna know, what of these will be more usefull to start learning with.
Thanks in advance....
- SPS
|
|
|
|
|
My hosting service offers ASPEmail (www.readyhosting.com) along with several others. Here's the script for one of my clients' sites:
<%
Set Mail = Server.CreateObject("Persits.MailSender")
Mail.Host= "mail.readyhosting.com"
Mail.From= "mydummyaddress@clientdomain.com"
Mail.FromName= "Refinance Contact"
Mail.AddAddress "myclient@clientdomain.com", "Client Name"
Mail.Subject= "Refinance Worksheet Submittal"
'Construct Message Body
Crlf= chr(13) & chr(10)
Body = "Broker Name: " & Request("Mort") & Crlf
Body = Body & "DPR Number: " & Request("DPR") & Crlf
.
.
.
Body = Body & Request("Cons10Amt") & " @ " & Request("Cons10Lend") & Crlf
'Prepare to send
Mail.Body = Body
'Send Mail
Mail.Send
%>
If that's not handy enough, here's the sample code from the vendor:
<%
Set Mail = Server.CreateObject("Persits.MailSender")
Mail.Host = "smtp.smtp-server.com" ' Specify a valid SMTP server
Mail.From = "sales@veryhotcakes.com" ' Specify sender's address
Mail.FromName = "VeryHotCakes Sales" ' Specify sender's name
Mail.AddAddress "andy@andrewscompany.net", "Andrew Johnson, Jr."
Mail.AddAddress "paul@paulscompany.com" ' Name is optional
Mail.AddReplyTo "info@veryhotcakes.com"
Mail.AddAttachment "c:\images\cakes.gif"
Mail.Subject = "Thanks for ordering our hot cakes!"
Mail.Body = "Dear Sir:" & Chr(13) & Chr(10) & _
"Thank you for your business."
On Error Resume Next
Mail.Send
If Err <> 0 Then
Response.Write "Error encountered: " & Err.Description
End If
%>
It works slick, and the client is a happy camper - that's the bottom line, ain't it?
Since his site solicits different types of customer applications, the mydummyaddress@clientdomain.com entry changes for each type, and I had him set up his office client to retrieve from each mailbox. He can tell from the From address of each message what kind of app he's received.
"My child was Inmate of the Month at Mohave County Jail" - Bumper Sticker in Bullhead City, AZ
|
|
|
|
|
Will give as try in it....
Roger Wright wrote:
It works slick
I will see if it works for me?
|
|
|
|
|
ASPMail rocks! Congrats on having that as a choice
Oddly enough it is at www.aspemail.com, although it is not the same tool as ASP Email. Possibly because aspmail.com is some dodgy site, pretending by it's URL to be useful for developers.
I knew it would end badly when I first met Chris in a Canberra alleyway and he said 'try some - it won't hurt you'..... - Christian Graus on Code Project outages
A moment of silence please. A programmer's best friend has passed beyond that great exception in the sky.... - Mark Conger on "The coffee machine has died"
|
|
|
|
|
Megan Forbes wrote:
aspmail.com is some dodgy site
Good God! Dodgy isn't the word for it! I never did try aspmail, but went straight for ASPEmail. Are they the same product? I can vouch for the latter - it is simple and works great. My hosting service offers both, but if the website has been hijacked by porn scum it's not really a good sign for the product; they could well be out of business.
"My child was Inmate of the Month at Mohave County Jail" - Bumper Sticker in Bullhead City, AZ
|
|
|
|
|
|
Hi.....
I wanna send mail from the web-site. It is something like the result of the form mailed to the web-master. As I am new to this topic, a basic explanation with reference/code will help me.
Thanks in advance...
|
|
|
|
|
Hi
Yes, it is exactly as you say. Set up an HTML page, with a form. Then set up an action page using ASP. Retrieve the values of the form (Request.Form("TextBoxName")) and load into variables. Then use a tool called CDonts to send the mail - type in "CDonts tutorial" on Google - you will get more examples than you need.
If the mail is only coming to you and you need to set up a quick plan while you get CDonts working you can put the action of the form as mailto:you@youraddress.whatever. You will then recieve the fields by email, but unformatted, with just comma's between them. I wouldn't suggest sending to a client like this.
Important to note - you must have SMTP installed for CDonts to work. A lot of people fall over on this point.
Good luck
I knew it would end badly when I first met Chris in a Canberra alleyway and he said 'try some - it won't hurt you'..... - Christian Graus on Code Project outages
A moment of silence please. A programmer's best friend has passed beyond that great exception in the sky.... - Mark Conger on "The coffee machine has died"
|
|
|
|
|
Thanks for the help..... Will give a try on CDONTS......
|
|
|
|
|
My webmaster says no to cdonts... as thats not in the server...
OK.. will have 2 try aspmail/aspemail then...
Thanks
|
|
|
|
|
Hi SPS,
If your web host does not support Form Emailers, then you may need try some RemotelyHosted Mailers like:
http://yahaa.hypermart.net/Remotely_Hosted/E-Mail/Form_Mailers/
Check some remotely hosted Emailer Solutions also with HotScripts.
If your webmaster supports FormEmailing, perhaps you may contact them whether they have a library of CGI Scripts for that or what ASP Email Component they support. For our example. our host did not support Form Emailing via ASP in any component. But he had a CGI Script which needed to be invoked and after sending mail, it would revert control the page specified by us in the hidden field.
Deepak Kumar Vasudevan
Deepak Kumar Vasudevan
http://deepak.portland.co.uk/
|
|
|
|
|
Thanks.... Will give a try on something that u listed...
|
|
|
|
|
Hello everyone! First post here:
Ok, i have some problems running an ASP script on my server. The script simply tries to create a new text file in a folder. But when i run the script, the browser just loads forever. No error msg.
Here's my sys-specs:
WindowXP Pro
IIS 5.1
The script runs fine if it only outputs some text. I think there are some permissions that need to be set on the target folder. I have created a virtual folder for it, setting all permissions possible. But that didnt help either. Here's the code for the script:
<br />
Dim fs<br />
Dim fo<br />
<br />
Set fs = Server.CreateObject("Scripting.FileSystemObject")<br />
Set fo = fs.CreateTextFile("c:\webdata\test.txt",true)<br />
<br />
set fo = nothing<br />
set fs = nothing<br />
<br />
Response.Write("Ok")<br />
Does anyone know what im doing wrong ?
Any help would be greatly appreciated. Thanks for your time.
|
|
|
|
|
Just for grins I created a folder on my machine, opened the Web Sharing tab and set permissions to include Write and Execute Scripts only, then copied and pasted your code into an ASP page in the wwwroot folder. I changed the path to the new file, of course. It worked perfectly, first try. Check the permissions on the target folder again...
"When in danger, fear, or doubt, run in circles, scream and shout!" - Lorelei and Lapis Lazuli Long
|
|
|
|
|
Hi Roger! Thanks for your reply.
Well, the first thing i did today was to re-install IIS, just to be sure.
Then i did just like you said, setting write + execute-scripts permissions,
but alas, still wont work.
Is there any settings i need to turn on/off in IIS somewhere ?
PS:
On thing i noticed, when i bring up the Properties on the target folder, in the general tab the ReadOnly box is checked. So i un-checked it, then opened the Properties dialog again, and its still checked. THough, every damn folder on my HD is like that.
Any ideas ?
|
|
|
|
|
That is strange. Are you using NTFS on that drive (you really should)? Check upstream from that folder - it could be at the tail of a chain that is read-only and has inherited the property from a parent folder. I assume you've given yourself write permissions in IIS or you wouldn't be able to make the site at all. Have you checked permissions on the IUSR_HOSTNAME account? Maybe that's blocking script execution.
"My child was Inmate of the Month at Mohave County Jail" - Bumper Sticker in Bullhead City, AZ
|
|
|
|
|
hi, i have created a COM server which is invoked from an ASP page (obj = CreateInstance(....) ).
I've two problems:
(1) IIS doesnt release my dll (ie. my in-process COM server) even after I shut down the server??
(2) IIS doesnt release the resources that COM server created earlier. More specifically, my COM server write to a disc file. No problem when the first request comes in coz the disc file has not been "locked" yet. But seems like the IIS server somehow lock the file and failed to release it.
Code in my in process server as follows:
FILE * fileA = NULL;
FILE * fileB = NULL;
fileA = fopen ("C:\logA.txt","w+"); //WARNING: warning C4129: 'l' : unrecognized character escape sequence. Note that the application will still compile with no Error. u just dont get the file at the desired location.
fileB = fopen ("C:/logB.txt","w+"); //This should work as intended.
if(fileA==NULL)
{
//Error handling.
}
else
{
fprintf(fileA, "Testing");
}
if(fileB==NULL)
{
//Error handling.
}
else
{
fprintf(fileB, "Testing");
}
fclose(fileA);
fclose(fileB);
Thanks!
norm
|
|
|
|
|
I need to ask a few interrelated questions on developing a web tool that does an automatic analysis of website features such as browser compatibility, load time, links, etc.
please try to imagine this:
I have one web page interface, with a single text box, and a single push button. the input for this page will be a website URL, which will be inserted in the text box, then when clicking the push button, this web tool will go to the URL specified, and then execute certain functions to analyze the website, such as checking its load time.
examples of such implementations are:
http://www.netmechanic.com/cobrands/zd_dev/
http://www.bcentral.com/products/link_checker.asp
http://designerwiz.com/docit.htm?http&&&www.designerwiz.com/test/link.htm
what I need to know is the codes and scripts behind these tools. I just heard that one of the methods is URL caching, but I'm not sure how it is done. I've tried searching for the codes, but cant' find them. please show me. please?
next, I need to know how to store or save these results into SQL server database. first, I need to know the codes for connecting the ASP page to the SQL server. I heard some suggestions that I have to connect it by using ODBC data source, but what code should I put on the ASP page?
and then, how do I store the results of all the web site analysis into the SQL server?
then, to display the results, I need to show in graphical representation. I heard some suggestion of using java applets to create graphical charts. where do I get this? how do I piece all these things together?
dear experts, please help me.
I'm desperate. I need urgent help. please help me!
thank you!
Good, better, best,
never let it rest;
till the good gets better,
and the better, best.
|
|
|
|
|
How to protect .zip,.doc,.pdf,etc files from being downloaded directly, using ASP...?so that only authorised person's can download
|
|
|
|
|
About the only way with asp is to either apply directory security or write a custom ISAPI handler.
|
|
|
|
|
how its done in codeproject.com...?when ever we click a zip file without logging in..it prompts for login name and password..
Thanks
|
|
|
|
|