Re: FAQ Topic - How do I run a server side script?



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/
.



Relevant Pages

  • Re: Same Internal Server Error from last two days
    ... I am trying to run a Hello World Perl Script in Apache 2.2. ... But its constantly giving me Internal Server Error.The script ... # have to place corresponding `LoadModule' lines at this location so the ...
    (perl.beginners)
  • Re: Same Internal Server Error from last two days
    ... I am trying to run a Hello World Perl Script in Apache 2.2. ... But its constantly giving me Internal Server Error.The script Runs perfectly fine from the command prompt. ... # This is the main Apache HTTP server configuration file. ... LoadModule actions_module modules/mod_actions.so ...
    (perl.beginners)
  • Same Internal Server Error from last two days
    ... I am trying to run a Hello World Perl Script in Apache 2.2. ... But its constantly giving me Internal Server Error.The script ... # have to place corresponding `LoadModule' lines at this location so the ...
    (perl.beginners)
  • Re: Regarding a selection for mobile code/scripting language
    ... Client Side scripting, so the server can send script commands to the client. ... I decided they should be scripted and mobile code. ...
    (Vuln-Dev)
  • IIS web site debugging problems in ASP
    ... I have a web server running IIS 5.0 in Windows 2k. ... different web sites using the same set of ASP/SQL code. ... script debugging on the second site. ... script that popped up in the debug window is for an entirely different ...
    (microsoft.public.inetserver.iis)