Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Javascript SSI Countdown from 30 or 90 days (user select)

Status
Not open for further replies.

artisst

Programmer
Apr 24, 2004
18
US
I would like to know if there is a way to get the date of a user's server and store it in a hidden field, and automatically add 30 or 90 days - by user pulldown/radio button selection - to the equation. I would like the script to count down from the time an account was created to the time it will expire. If this could be a javascript documentwrite or written to an external file and used via SSI would be great. Google results turn up some with one attribute or another, not both.
 
"A user's server". Which server? How do you know any of your users are even running servers?

Do you mean their local PC? Or do you mean your server? Or something else entirely?

Dan



Coedit Limited - Delivering standards compliant, accessible web solutions

[tt]Dan's Page [blue]@[/blue] Code Couch
[/tt]
 
Now, what will happen is when the user option selects 30 days or 90 days, the HTML:Template will automatically insert the hidden field value in %placeholder_one% and the user select value in %placeholder_two% once the user submits the page. This will submission will create a file with the entire javascript - while inserting the values into the placeholders.

The external file can then be used for each individual because the program I am modifying uses cookies when users log in. It will automatically find this js file in the directory via link or SSI.

It will need to count down 30 or 90 days from when the user signed up.
 
artisst,

You've not clarified your original post, and now you're talking about new stuff you've not clarified (what on earth are "%placeholder_one%" and "%placeholder_two%"?).

How about you actually give us some detail we can work with?

Dan



Coedit Limited - Delivering standards compliant, accessible web solutions

[tt]Dan's Page [blue]@[/blue] Code Couch
[/tt]
 
There is one server, mine. The users will be using my server's time and there hosting accounts will be on my server. I need a script which will get my server date and year on the page where the user creates an account. I would like for the date and year to be displayed in in a textarea or hidden.

I need the script to count down 30 days from when the user creates their account. When they go to their administration page, it should be displayed there (whatever days remaining). Sessions / cookies would be okay. I using standard DHTML and Perl.

Please disregard the %placeholder% info as I have figured that part out already.

Thanks
 
I recommend that you ask in the forum for whatever server-side scripting you are using (ASP, JSP, etc), as you'd ideally want to do this all server-side (so getting the server time & date, storing in a DB how many days, etc).

I wouldn't do any of this with client-side JavaScript.

Hope this helps,
Dan



Coedit Limited - Delivering standards compliant, accessible web solutions

[tt]Dan's Page [blue]@[/blue] Code Couch
[/tt]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top