|
|
A good choice... but occupies lotsa space in the disk/ram isnt it?
|
|
|
|
|
Hi! I am very new in Java / HTML ... and I have a problem ...
I want to display a "last update: 25.11.2002 - 10:45" string on my homepage, but I don't want to add this string on every page by hand.
How can I get the "last update" date of my HTML file?
I want to write:
document.write("Last Update: " + date);
So, how to get the date (the last update of my HTML file, example "25.11.2002 - 10:45")?
Daniel
---------------------------
Never change a running system!
|
|
|
|
|
Put it into an include file, but you will still have to paste the include line in every page.
Damn, as the queen of lazy methods, I feel I am failing you here
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"
|
|
|
|
|
I know ... but I don't want to change the date every time I update the file ... I want to get the date from the file with Java ...
How can I get the date with Java?
Daniel
---------------------------
Never change a running system!
|
|
|
|
|
You are probably talking about Javascript, not Java.
|
|
|
|
|
Ohh... yes sorry
Daniel
---------------------------
Never change a running system!
|
|
|
|
|
lol - sorry, document.write was automatically changed to ASP response.write by my Monday morning brain
In Javascript you can say this
date=new Date();
day=date.getDate();
year=date.getYear();
month=date.getMonth();
then document.write them as a string with whatever you want inbetween in the string (/ or - or whatever), and put that into a variable which stores it till the next time you update.
HTH
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!
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.
|
|
|
|