473,378 Members | 1,623 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 software developers and data experts.

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

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

var dummyImage = new Image();dummyImage.src = "scriptURL.asp?param=" + varName;

Mozilla (NN6.2+, Firefox, Ice Weasle etc), Opera 7.6+, Safari1.2+, the
Windows version of IE versions 5+, and some other browsers
provide the XML HTTP Request object. This allows JavaScript to
send HTTP requests directly to the server, and interact with
the responses returned.

http://jibbering.com/2002/4/httprequest.html
--
Postings such as this are automatically sent once a day. Their
goal is to answer repeated questions, and to offer the content to
the community for continuous evaluation/improvement. The complete
comp.lang.javascript FAQ is at http://jibbering.com/faq/index.html.
The FAQ workers are a group of volunteers. The sendings of these
daily posts are proficiently hosted by http://www.pair.com.

Nov 11 '07 #1
2 2665
In comp.lang.javascript message <47***********************@news.sunsite.
dk>, Sun, 11 Nov 2007 00:00:02, FAQ server <ja********@dotinternet.be>
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.

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).
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".

--
(c) John Stockton, Surrey, UK. ?@merlyn.demon.co.uk Delphi 3? Turnpike 6.05
<URL:http://www.merlyn.demon.co.uk/TP/BP/Delphi/&c., FAQqy topics & links;
<URL:http://www.bancoems.com/CompLangPascalDelphiMisc-MiniFAQ.htmclpdmFAQ;
<URL:http://www.borland.com/newsgroups/guide.htmlnews:borland.* Guidelines
Nov 11 '07 #2
Dr J R Stockton said the following on 11/11/2007 3:43 PM:
In comp.lang.javascript message <47***********************@news.sunsite.
dk>, Sun, 11 Nov 2007 00:00:02, FAQ server <ja********@dotinternet.be>
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/
Nov 12 '07 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: FAQ server | last post by:
----------------------------------------------------------------------- FAQ Topic - What online resources are available? ----------------------------------------------------------------------- ...
20
by: FAQ server | last post by:
----------------------------------------------------------------------- FAQ Topic - How do I get a perl/asp/php variable into client-side js?...
1
by: FAQ server | last post by:
----------------------------------------------------------------------- FAQ Topic - How do I run a server side script? ----------------------------------------------------------------------- You...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.