Re: FAQ Topic - How do I run a server side script?
- From: Randy Webb <HikksNotAtHome@xxxxxxx>
- Date: Mon, 12 Nov 2007 00:01:25 -0500
Dr J R Stockton said the following on 11/11/2007 3:43 PM:
In comp.lang.javascript message <47364622$0$90264$14726298@xxxxxxxxxxxxx
dk>, Sun, 11 Nov 2007 00:00:02, FAQ server <javascript@xxxxxxxxxxxxxx>
posted:
FAQ Topic - How do I run a server side script?
You trigger a server-side script by setting any object's URL. For
example a frame, window, or an Image. An image will also
"swallow" the data sent back by the server, so that they will
not be visible anywhere.
I'd rewrite that paragraph in English if I could tell what it meant.
Then write an answer to the question that you do understand.
The present answer is insufficient, as it has no reference to providing
and positioning the script itself (note : ISPs do not always provide
general server-side scripting).
The answer is incomplete. If you qualify that as "insufficient" then it is. As far as "positioning the script", not sure what you mean by that. The fact that some ISP's do not allow server side scripts is irrelevant though.
var dummyImage = new Image();dummyImage.src = "scriptURL.asp?param=" +
varName;
That's a case where with could be with advantage be used, since
AFAICS there's no need to retail the Image object (check that)
with (new Image()) src = "scriptURL.asp?param=" + varName
Using a manifestly generic name part (scriptURL) (which of course isn't
a URL) with a recognisable specific extension suggests that the given
extension is required. Better : "filename.ext?param?" or "file?param".
"scriptURL" is in fact a URL. Whether it has the extension or not. It is a relative URL. There are no extensions on the web though. The parameter is just as bad as the extension though as it still implies that it might be "required" when it isn't.
<suggestion for discussion>
FAQ Topic - How do I run a server side script?
You execute a server-side script using client-side script by setting any object's URL that can have an .href or .src property. For example a frame, window, or an Image.
</suggestion>
Not sure that "object's URL" is a good term to use there though.
--
Randy
Chance Favors The Prepared Mind
comp.lang.javascript FAQ - http://jibbering.com/faq/index.html
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
.
- References:
- FAQ Topic - How do I run a server side script?
- From: FAQ server
- Re: FAQ Topic - How do I run a server side script?
- From: Dr J R Stockton
- FAQ Topic - How do I run a server side script?
- Prev by Date: Re: How do I load a new page each day of the year?
- Next by Date: Re: Upload Files Without Page Reload or Form Submission
- Previous by thread: Re: FAQ Topic - How do I run a server side script?
- Next by thread: Safari, innerHTML and XHTML
- Index(es):
Relevant Pages
|