Making a client side script Server Side

Y

Yonih

Hey All,

I need some help the following scrip below is used to write the date
however its client side so its pulling the date from the visitors
computer. Does anyone know a way to make it server side so it will get
its date from the server and I don't have to worry about people's
computer date being wrong or manipulating it since it has to do with
prices we will be paying for that date.

<Script type="text/javaScript">

// Get today's current date.
var now = new Date();

// Array list of days.
var days = new Array
('Sunday','Monday','Tuesday','Wednesday','Thursday','Friday','Saturday');

// Array list of months.
var months = new Array
('January','February','March','April','May','June','July','August','September','October','November','December');

// Calculate the number of the current day in the week.
var date = ((now.getDate()<10) ? "0" : "")+ now.getDate();

// Calculate four digit year.
function fourdigits(number) {
return (number < 1000) ? number + 1900 : number;
}

// Join it all together
today = months[now.getMonth()] + " " +
date + ", " +
(fourdigits(now.getYear())) ;
</script>


Display Date
<Script type="text/javaScript"> document.write(today);</script>



Thank you in advanced
Yoni
 
T

Tim Greer

Yonih said:
Hey All,

I need some help the following scrip below is used to write the date
however its client side so its pulling the date from the visitors
computer. Does anyone know a way to make it server side so it will get
its date from the server and I don't have to worry about people's
computer date being wrong or manipulating it since it has to do with
prices we will be paying for that date.

JavaScript is browser, rather than server-side, unless you're using it
in a framework. Try SSI, PHP, or something else for server-side date
and time.
 
J

Jeremy J Starcher

Hey All,

I need some help the following scrip below is used to write the date
however its client side so its pulling the date from the visitors
computer. Does anyone know a way to make it server side so it will get
its date from the server and I don't have to worry about people's
computer date being wrong or manipulating it since it has to do with
prices we will be paying for that date.

This should be done server-side anyways. Never trust *anything* that can
come from the client.


If you are looking to fill in a date field, have your server-side
generate a hidden field in your form with the current date. You can
double-check this date when it is resubmitted.


[code snipped]

You can print the date at the same time.
 
D

Dr J R Stockton

In comp.lang.javascript message <35225cbe-a2a0-45f2-8d68-d2a74ed342d2@n3
3g2000pri.googlegroups.com>, Tue, 16 Dec 2008 11:41:18, Yonih
// Get today's current date.
var now = new Date();

// Array list of days.
var days = new Array
('Sunday','Monday','Tuesday','Wednesday','Thursday','Friday','Saturday');

You will not need that.
// Array list of months.
var months = new Array
('January','February','March','April','May','June','July','August','Sep
tember','October','November','December');

You should not need that. When posting code to News, do not allow
machine-wrapping of code; see the regularly-posted newsgroup FAQ.
// Calculate the number of the current day in the week.
var date = ((now.getDate()<10) ? "0" : "")+ now.getDate();

Method getDate is comparatively slow. You should do it once, and
adjust the result; preferably with a function (or method), which should
be in the FAQ.
// Calculate four digit year.
function fourdigits(number) {
return (number < 1000) ? number + 1900 : number;
}

Assuming that your code does mot need to work for more than 91 years, I
would prefer 2000 + number%100 - but AIUI most browsers less than a
decade old have method getFullYear which gives the right answer
anyway.
today = months[now.getMonth()] + " " +
date + ", " +
(fourdigits(now.getYear())) ;

A rather silly field order, favoured mainly in the northern
chronologically-retarded regions. Using alphabetical months is a waste
of resources in this context.
Display Date
<Script type="text/javaScript"> document.write(today);</script>

Ambiguous, with that field order, on the WORLD-WIDE Web. You should use
either YYYY-MM-DD or YYYY/MM/DD; the former is ISO compliant, the latter
equally good otherwise and cam be read directly on many systems.
 
T

Thomas 'PointedEars' Lahn

Tim said:
Yonih said:
I need some help the following scrip below is used to write the date
however its client side so its pulling the date from the visitors
computer. Does anyone know a way to make it server side so it will get
its date from the server and I don't have to worry about people's
computer date being wrong or manipulating it since it has to do with
prices we will be paying for that date.

JavaScript is browser, rather than server-side, unless you're using it
in a framework.  [...]

Utter nonsense, STFW.


PointedEars
 
T

Thomas 'PointedEars' Lahn

Yonih said:
I need some help the following scrip below is used to write the date
however its client side so its pulling the date from the visitors
computer. Does anyone know a way to make it server side so it will get
its date from the server and I don't have to worry about people's
computer date being wrong or manipulating it since it has to do with
prices we will be paying for that date.

Good idea. Following the pretty-printed equivalent in Server-Side
JavaScript.
<Script type="text/javaScript">

Remove this.
// Get today's current date.
var now = new Date();

// Get today's current date.
var now = new Date();
// Array list of days.
var days = new Array
('Sunday','Monday','Tuesday','Wednesday','Thursday','Friday','Saturday');

// Array list of days.
var days = new Array('Sunday', 'Monday', 'Tuesday', 'Wednesday',
'Thursday', 'Friday', 'Saturday');
// Array list of months.
var months = new Array
('January','February','March','April','May','June','July','August','September','October','November','December');

// Array list of months.
var months = new Array('January', 'February', 'March', 'April',
'May', 'June', 'July', 'August', 'September', 'October', 'November',
'December');
// Calculate the number of the current day in the week.
var date = ((now.getDate()<10) ? "0" : "")+ now.getDate();

(This can be optimized.)

// Calculate the number of the current day in the week.
var date = ((now.getDate() < 10) ? "0" : "") + now.getDate();
// Calculate four digit year.
function fourdigits(number)   {
   return (number < 1000) ? number + 1900 : number;
                        }

(Don't do that; use Date.prototype.getFullYear() where available.)

function fourdigits(number)
{
return (number < 1000) ? number + 1900 : number;
}
// Join it all together
today =  months[now.getMonth()] + " " +
         date + ", " +
         (fourdigits(now.getYear())) ;

(You want to declare `today' as well.)

var today = months[now.getMonth()] + " " + date + ", " + fourdigits
(now.getYear()) ;
</script>

Remove this.
Display Date
<Script type="text/javaScript"> document.write(today);</script>

write(today);

This is, of course, Netscape JavaScript[tm](R) which runs on Netscape
Enterprise Server and compatible Web servers.

See also: <http://docs.sun.com/source/816-6411-10/contents.htm>,
in particular: <http://docs.sun.com/source/816-6411-10/
jsserv.htm#1031015>

Other vendors provide their own ECMAScript language implementations
and APIs, e.g. with Microsoft JScript in ASP on Internet Information
Services and compatible Web servers you would write

<% Response.Write(today); %>

or simply

<%= today %>

See also: <http://msdn.microsoft.com/en-us/library/ms525585.aspx>

Or, you may want to employ a completely different programming
language, such as (ba)sh, PHP, Perl, Python, Tcl, and so on.
Thank you in advanced

You're welcome.


PointedEars
 
T

Tim Greer

Thomas said:
Tim said:
Yonih said:
I need some help the following scrip below is used to write the
date however its client side so its pulling the date from the
visitors computer. Does anyone know a way to make it server side so
it will get its date from the server and I don't have to worry
about people's computer date being wrong or manipulating it since
it has to do with prices we will be paying for that date.

JavaScript is browser, rather than server-side, unless you're using
it in a framework.  [...]

Utter nonsense, STFW.


Hardly nonsense. Are you talking about a specific web server? I'm
talking about Apache, the most used web server software. You can't use
JavaScript intended to interface with the web browser in a normal HTML
page in Apache to get the local date/time of the server its running on,
unless you do something server side, using JSP, ASP, CGI, PHP, SSI, or
some type of framework (or unless you include/call the function in a
manner which uses browser site JS to grab that data from somewhere that
can obtain that data).
 
E

Evertjan.

Tim Greer wrote on 17 dec 2008 in comp.lang.javascript:
JavaScript is browser, rather than server-side, unless you're using
it in a framework. [...]

Utter nonsense, STFW.


Hardly nonsense. Are you talking about a specific web server? I'm
talking about Apache, the most used web server software.

"You cannot carry 20 tons on a motor vehicle,
because most are to small for it"
 
T

Tim Greer

Evertjan. said:
Tim Greer wrote on 17 dec 2008 in comp.lang.javascript:
JavaScript is browser, rather than server-side, unless you're using
it in a framework. [...]

Utter nonsense, STFW.


Hardly nonsense. Are you talking about a specific web server? I'm
talking about Apache, the most used web server software.

"You cannot carry 20 tons on a motor vehicle,
because most are to small for it"

But you "can" claim "utter nonsense" in response to a true response, by
posting a solution that is specific to an unlikely answer (which
probably doesn't fit in this or most other cases). You can sure try to
do this, but it's unreliable, unless you use something server-side, if
you want the server's own actual date and time. Thus, it didn't answer
the question.
 
E

Evertjan.

Tim Greer wrote on 17 dec 2008 in comp.lang.javascript:
Evertjan. said:
Tim Greer wrote on 17 dec 2008 in comp.lang.javascript:
JavaScript is browser, rather than server-side, unless you're using
it in a framework. [...]

Utter nonsense, STFW.


Hardly nonsense. Are you talking about a specific web server? I'm
talking about Apache, the most used web server software.

"You cannot carry 20 tons on a motor vehicle,
because most are to small for it"

But you "can" claim "utter nonsense" in response to a true response, by
posting a solution that is specific to an unlikely answer (which
probably doesn't fit in this or most other cases). You can sure try to
do this, but it's unreliable, unless you use something server-side, if
you want the server's own actual date and time. Thus, it didn't answer
the question.

This is not a paid helpdesk so you cannot claim a response needs to be an
answer.

"JavaScript is browser, rather than server-side, unless you're using
it in a framework."

This is utter nonsense.

Javascript can run confortably on a server, and on a wscript/cscript.

That "you" are talking apache does not mean it is not utter nonsense.
 
T

Tim Greer

Evertjan. said:
Tim Greer wrote on 17 dec 2008 in comp.lang.javascript:
Evertjan. said:
Tim Greer wrote on 17 dec 2008 in comp.lang.javascript:

JavaScript is browser, rather than server-side, unless you're
using it in a framework. [...]

Utter nonsense, STFW.


Hardly nonsense. Are you talking about a specific web server? I'm
talking about Apache, the most used web server software.

"You cannot carry 20 tons on a motor vehicle,
because most are to small for it"

But you "can" claim "utter nonsense" in response to a true response,
by posting a solution that is specific to an unlikely answer (which
probably doesn't fit in this or most other cases). You can sure try
to do this, but it's unreliable, unless you use something
server-side, if
you want the server's own actual date and time. Thus, it didn't
answer the question.

This is not a paid helpdesk so you cannot claim a response needs to be
an answer.

"JavaScript is browser, rather than server-side, unless you're using
it in a framework."

This is utter nonsense.

Javascript can run confortably on a server, and on a wscript/cscript.

That "you" are talking apache does not mean it is not utter nonsense.

I never said it can ONLY run in a framework. You're still talking about
a service, API, framework, etc. when you're talking about getting JS to
grab server-side data, such as the system's local time. I said nothing
more, and nothing less, and it is true. Offering a solution that
doesn't touch on answering their question of using JS in the way they
wanted and asked about, is hardly helpful. Moreover, what's the reason
to argue or debate that? Pardon me if I wasn't clearer in my original
response, but I wasn't wrong about the answer.
 
E

Evertjan.

Tim Greer wrote on 17 dec 2008 in comp.lang.javascript:
Evertjan. said:
Tim Greer wrote on 17 dec 2008 in comp.lang.javascript:
Evertjan. wrote:

Tim Greer wrote on 17 dec 2008 in comp.lang.javascript:

JavaScript is browser, rather than server-side, unless you're
using it in a framework. [...]

Utter nonsense, STFW.


Hardly nonsense. Are you talking about a specific web server?
I'm talking about Apache, the most used web server software.

"You cannot carry 20 tons on a motor vehicle,
because most are to small for it"



But you "can" claim "utter nonsense" in response to a true response,
by posting a solution that is specific to an unlikely answer (which
probably doesn't fit in this or most other cases). You can sure try
to do this, but it's unreliable, unless you use something
server-side, if
you want the server's own actual date and time. Thus, it didn't
answer the question.

This is not a paid helpdesk so you cannot claim a response needs to
be an answer.

"JavaScript is browser, rather than server-side, unless you're using
it in a framework."

This is utter nonsense.

Javascript can run confortably on a server, and on a wscript/cscript.

That "you" are talking apache does not mean it is not utter nonsense.

I never said it can ONLY run in a framework. You're still talking
about a service, API, framework, etc. when you're talking about
getting JS to grab server-side data, such as the system's local time.

I was not talking about that, only about your statement:

"JavaScript is browser .."
I said nothing more, and nothing less, and it is true.

What is true? "JavaScript is browser" ??
Offering a
solution that doesn't touch on answering their question of using JS in
the way they wanted and asked about, is hardly helpful.

I did not offer a solution, and I certainly did not want to be helpful,
except to p.ears.
Moreover,
what's the reason to argue or debate that?

About what?
You want a reason for debating something in a NG? Oh, come on!
I just stated you were wrong.
Pardon me if I wasn't
clearer in my original response, but I wasn't wrong about the answer.

I never said you were wrong about any answer, only that you were wrong
about "JavaScript is browser". If you count [and I would not] the latter
as an answer, you are wrong about 'the' answer.
 
T

Tim Greer

Evertjan. said:
Tim Greer wrote on 17 dec 2008 in comp.lang.javascript:
Evertjan. said:
Tim Greer wrote on 17 dec 2008 in comp.lang.javascript:

Evertjan. wrote:

Tim Greer wrote on 17 dec 2008 in comp.lang.javascript:

JavaScript is browser, rather than server-side, unless you're
using it in a framework. [...]

Utter nonsense, STFW.


Hardly nonsense. Are you talking about a specific web server?
I'm talking about Apache, the most used web server software.

"You cannot carry 20 tons on a motor vehicle,
because most are to small for it"



But you "can" claim "utter nonsense" in response to a true
response, by posting a solution that is specific to an unlikely
answer (which
probably doesn't fit in this or most other cases). You can sure
try to do this, but it's unreliable, unless you use something
server-side, if
you want the server's own actual date and time. Thus, it didn't
answer the question.

This is not a paid helpdesk so you cannot claim a response needs to
be an answer.

"JavaScript is browser, rather than server-side, unless you're using
it in a framework."

This is utter nonsense.

Javascript can run confortably on a server, and on a
wscript/cscript.

That "you" are talking apache does not mean it is not utter
nonsense.

I never said it can ONLY run in a framework. You're still talking
about a service, API, framework, etc. when you're talking about
getting JS to grab server-side data, such as the system's local time.

I was not talking about that, only about your statement:

"JavaScript is browser .."

The JavaScript he was asking about was browser side. I never said it
only runs that way or that you can't use it server side. I even said
you could put it into a framework, etc.
What is true? "JavaScript is browser" ??

Is that true? "JavaScript is"?? What is the point of taking a partial
sentence, out of a paragraph, to try and make a point?
I did not offer a solution,

I didn't say _you_ did.
and I certainly did not want to be
helpful,

You could have simply asked for clarification or suggested "I assume you
meant....", instead of what you're doing now?


About what?

You tell me?
You want a reason for debating something in a NG? Oh, come on!
I just stated you were wrong.

And I just responded to clarify. Now you're saying above that I'm
saying "JavaScript is browser", whatever you think that's supposed to
mean. I wasn't wrong about what I said. He was wanting to use
JavaScript in a normal fashion on a web page and that will not talk to
the server-side, unless you do something else. Another poster
responded saying that was "utter nonsense", which it is absolutely not
nonsense. You then responded to tell me I'm wrong. So, please, show
me JavaScript coded to talk to the web browser (client side) and how
that code will get the _server's_ actual time, and don't use an API,
framework, scripting engine or anything on the server side (and just
put the JavaScript in a normal HTML page and don't call to a different
script or program to get the server's actual local time). If I'm
wrong, you should be able to do that. Not using SSI, PHP, Wscript,
etc.
I never said you were wrong about any answer,

You said I was wrong (I wasn't). I never said you claimed any "answer"
was wrong.
only that you were wrong
about "JavaScript is browser".

You're not making sense. Why would you intentionally take a portion of
a complete sentence and use that to say someone's wrong? Should I say
you're wrong about "only that you"?
If you count [and I would not] the
latter as an answer, you are wrong about 'the' answer.

I guess you're just looking to argue with someone given your attitude.

Taking: "JavaScript is browser, rather than server-side"
and saying I was wrong by saying "JavaScript is browser" without the
rest of the sentence, is just acting like a usenet troll. I even
clarified for you, saying that while JavaScript isn't *always* browser
side, it was in his example and question. I then went on to say they
could use it in a framework, etc. Even after all of that, you want to
argue and say I was wrong. Like I said, I guess you're just looking to
argue with someone, because there's no rational reason for you to be
doing this.
 
E

Evertjan.

Tim Greer wrote on 17 dec 2008 in comp.lang.javascript:


You could have simply asked for clarification or suggested "I assume
you meant....", instead of what you're doing now?

You could ask that to Pointed Ears who said you were wrong,
I only responderd to your denial.

Should I have said: "I assume you meant, that you were wrong" ?

You said I was wrong (I wasn't). I never said you claimed any
"answer" was wrong.


You said "I wasn't wrong about the answer"

I guess you're just looking to argue with someone given your attitude.

Taking: "JavaScript is browser, rather than server-side"
and saying I was wrong by saying "JavaScript is browser" without the
rest of the sentence, is just acting like a usenet troll.

Not true, I was repeating part of the complete sensece I had quoted
earlier again and again in the same posting.

"JavaScript is browser, rather than server-side"

And that is wrong, wrong, wrong.

But please be my guest,
and call everyone who disagrees with you a troll,
if that makes you happy.
 
T

Tim Greer

Evertjan. said:
Tim Greer wrote on 17 dec 2008 in comp.lang.javascript:




You could ask that to Pointed Ears who said you were wrong,

You're posting to me, I'm responding to you. Where's the confusion?
I only responderd to your denial.

Denial that you're mistaken?
Should I have said: "I assume you meant, that you were wrong" ?

What is your problem? All of this for the mention of a (software)
framework sent you two up the wall. That's a little weird.
You said "I wasn't wrong about the answer"

My response provided an answer to retrieving the server's time, and not
a code solution that wouldn't help them anyway. That response (answer)
wasn't wrong. I challenge you to create a JavaScript code solution
that just talks to the browser (client side) and somehow _accurately_
get the time from the server the site is on. Rather than being a jerk
and arguing about this because I simply mentioned a software framework
would be one solution, you two could calm down and cease attacking me
for no reason. Honestly, what is the point to all of this?
Not true, I was repeating part of the complete sensece I had quoted
earlier again and again in the same posting.

Wrong, it was completely true. That's what usenet trolls do. Explain
why else you're doing what you are now!
"JavaScript is browser, rather than server-side"

And that is wrong, wrong, wrong.

No it's not. I even clarified in a later post that I said the OP was
trying to use browser (client side) code and that it wouldn't do what
they wanted. Prove otherwise, show just JavaScript code that just
works with the client's browser and gives the time of the server the
site is on.
But please be my guest,
and call everyone who disagrees with you a troll,
if that makes you happy.

Hardly. I certainly didn't expect you to admit it (how you're acting).
This isn't a disagreement, you are simply ignoring everything said so
you can try and act like you have a reason to attack me. That's weird.
Why would you do that? You're going to pretend you're just a nice guy
and aren't trying to incite an argument for no good reason? I can't
reason with you at all (but that wasn't anything you were willing to do
from the start).
 
E

Evertjan.

Tim Greer wrote on 18 dec 2008 in comp.lang.javascript:
I can't
reason with you at all (but that wasn't anything you were willing to do
from the start).

Why should I be willing to do your reasoning with me, Tim, if you cann't?
 
T

Tim Greer

Evertjan. said:
Tim Greer wrote on 18 dec 2008 in comp.lang.javascript:


Why should I be willing to do your reasoning with me, Tim, if you
cann't?

Good play... after all, if you just accuse me of what you're doing (even
if I'm not), then it's completely circular and you're never held to
what you say (just me held to what you claim I said). Like I said, you
can't be reasoned with.

I posted with a genuine intent of helping the OP with their question. I
didn't come in here trolling or trying to cause problems. If someone
didn't agree or wanted to correct me or ask for clarification, I'd be
happy to do so. I'm not immune to being wrong or misunderstanding a
question.

I mean, what can someone say about this sort of reaction? I thought I
might have been confused with someone else at first, or who knows what.
This honestly doesn't make any sense. If I felt I was wrong, I'd have
no problem admitting it. I think it's just a matter of
miscommunication, in association with how aggressive you two have been
about the topic. I don't have a problem with you. Let's just move on.
 
T

Thomas 'PointedEars' Lahn

Tim said:
Thomas said:
Tim said:
Yonih wrote:
I need some help the following scrip below is used to write the
date however its client side so its pulling the date from the
visitors computer. Does anyone know a way to make it server
side so it will get its date from the server and I don't have
to worry about people's computer date being wrong or
manipulating it since it has to do with prices we will be
paying for that date.
JavaScript is browser, rather than server-side, unless you're
using it in a framework. [...]
Utter nonsense, STFW.

Hardly nonsense. Are you talking about a specific web server?

I am talking about the restrictions of the programming language(s) that
you are implying, and that simply do not exist.
I'm talking about Apache, the most used web server software.

Although this is but an inept attempt at evasion on your part, there is
a good chance it could even work with Apache as a module or through the
CGI mechanism, whereas the latter is more likely than the former.
You can't use JavaScript intended to interface with the web browser
in a normal HTML page

There are no HTML pages, there are HTML documents.
in Apache to get the local date/time of the server its running on,
unless you do something server side, using JSP, ASP, CGI, PHP, SSI,
or some type of framework (or unless you include/call the function in
a manner which uses browser site JS to grab that data from somewhere
that can obtain that data).

Of course a programming language is required on the server side to do
that; this was not debated at all. HTML is merely a markup language,
and so would not suffice here. Which server would serve HTML documents
is but irrelevant to that fact.

However, again you don't know what you are talking about. There is
hardly *one* programming language which use would be restricted to the
client side, and that language certainly is not JavaScript or another
ECMAScript implementation.


PointedEars
 
T

Tim Greer

Thomas said:
Tim said:
Thomas said:
Tim Greer wrote:
Yonih wrote:
I need some help the following scrip below is used to write the
date however its client side so its pulling the date from the
visitors computer. Does anyone know a way to make it server
side so it will get its date from the server and I don't have
to worry about people's computer date being wrong or
manipulating it since it has to do with prices we will be
paying for that date.
JavaScript is browser, rather than server-side, unless you're
using it in a framework. [...]
Utter nonsense, STFW.

Hardly nonsense. Are you talking about a specific web server?

I am talking about the restrictions of the programming language(s)
that you are implying, and that simply do not exist.

I never said any restrictions exist. I clarified what I had meant.
Most people seemed to understand that I was telling the OP that JS code
intended for a browser was not going to achieve what they wanted.
Although this is but an inept attempt at evasion on your part,

Not at all. I specifically meant that you shouldn't assume the service
used anymore than I should. Therefore, if you want server-side, you
need to run the JS in a manner which will work on the server side, or
be able to use some data generated or obtained from the server side, to
then use it with JS code intended to talk directly to the client
(browser). Your posting history here shows you'll say anything and be
relentless in response, rather than admit you jumped the gun or were
wrong, so I don't expect the above to get through either.
there
is a good chance it could even work with Apache as a module or through
the CGI mechanism, whereas the latter is more likely than the former.

I said just that myself. I quote:
"Try SSI, PHP, or something else for server-side date and time." The
"something else" could be any number of things, from CGI, to RoR, to
shell, to _anything_ at all.
There are no HTML pages, there are HTML documents.

This is exactly the sort of nonsense I'm talking about with you. Did
you not know what I meant? Of course you did, but that wouldn't
benefit your intent on stiring problems with other posters, and FOR
WHAT!? I am honestly at a loss of why you're coming in foaming at the
mouth, in attack mode. It is SERIOUSLY weird! Have you never heard of
a "web page"?
Of course a programming language is required on the server side to do
that;

That that is _exactly_ what I said.
this was not debated at all.

So what _is_ the problem then?
HTML is merely a markup language,
and so would not suffice here.
Exactly.

Which server would serve HTML
documents is but irrelevant to that fact.
Exactly.

However, again you don't know what you are talking about.

Here's an idea, instead of just claiming whatever suits your ego, try
proving it.
There is
hardly *one* programming language which use would be restricted to the
client side,

Show me where I *ever* said that.
and that language certainly is not JavaScript or another
ECMAScript implementation.

And I never said it was. However, *you* said I said it was. It you're
going to base your strange and malicious attitude on what I said, I'd
appreciate it if you'd go by what I actually said, instead of what you
want to accuse me of saying. Your motivation for twisting what I said
or adding to it by saying things I never did, or claiming your negative
assumptions and lack of understanding of what I said are true, then
there's no point to even you going on about it. Don't you think that's
a little bit crazy? Had I come in and actually claimed those things,
all is fair game (even if you're acting like a rabid animal about it),
but I didn't. For whatever reasons you want to assume, to keep you
motivated to argue with someone you don't know, I can't stop you, but I
wish you'd use reason and fact. If nothing else, when someone
clarifies, to just accept what they said. I didn't come here
challenging you, there's no threat to your ego here. I have clarified,
and there's nothing to argue about. Ironic that I should have to
clarify at all, simply because I didn't make an attempt to greatly
elaborate for the sake of someone like you that would be looking for a
fight. Completely weird behavior.
 
T

Thomas 'PointedEars' Lahn

Tim said:
Thomas said:
Tim said:
Thomas 'PointedEars' Lahn wrote:
Tim Greer wrote:
Yonih wrote:
I need some help the following scrip below is used to write
the date however its client side so its pulling the date
from the visitors computer. Does anyone know a way to make
it server side so it will get its date from the server and
I don't have to worry about people's computer date being
wrong or manipulating it since it has to do with prices we
will be paying for that date.
JavaScript is browser, rather than server-side, unless you're
using it in a framework. [...]
Utter nonsense, STFW.
Hardly nonsense. Are you talking about a specific web server?
I am talking about the restrictions of the programming language(s)
that you are implying, and that simply do not exist.

I never said any restrictions exist.

"JavaScript is browser, rather than server-side"

Sounds familiar?
I clarified what I had meant.

Maybe so, but you said it completely wrong first.
Most people seemed to understand that I was telling the OP that JS
code intended for a browser was not going to achieve what they
wanted.

Arguing with the silent majority already? I hope for your sake that you
can do better than that.
Not at all. I specifically meant that you shouldn't assume the
service used anymore than I should.

Nonsense. Only you have been introducing the Apache argument without
an apparent need for it. So far we have only been talking about the
general use of the programming language, and that does not exclude
server-side use at all, period.
[...]
there is a good chance it could even work with Apache as a module
or through the CGI mechanism, whereas the latter is more likely
than the former.

I said just that myself. I quote: "Try SSI, PHP, or something else
for server-side date and time." The "something else" could be any
number of things, from CGI, to RoR, to shell, to _anything_ at all.

Yes, the problem is that you placed it in a context where "anything"
would *not* include JavaScript, when that is obviously nonsense. And
now you are winding around that instead of simply admitting your mistake.
This is exactly the sort of nonsense I'm talking about with you. Did
you not know what I meant?

That's not the point. This is a technical newsgroup, and correct
terminology is of the utmost importance if a discussion is to be a
learning experience for everyone.
That that is _exactly_ what I said.

Yes, but in the wrong context.
So what _is_ the problem then?

I'm tired of explaining to you; learn to read and write in a way
that the chances are low(er) that you misunderstand others and be
misunderstood by them.


PointedEars
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,055
Latest member
SlimSparkKetoACVReview

Latest Threads

Top