473,388 Members | 1,234 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,388 software developers and data experts.

executing/calling a url

I have a perl script running on my server on a chosen port, and I want
to be able to execute functions that this script provides from inside
Javascript functions.

For example, I need to call

http://localhost:36000/reset?sid=1

I know very little Javascript and haven't had any luck searching here,
so if anyone can help that woudl be great.

Thanks

Nov 14 '06 #1
3 1231
Hi,

jo******@gmail.com wrote:
I have a perl script running on my server on a chosen port, and I want
to be able to execute functions that this script provides from inside
Javascript functions.

For example, I need to call

http://localhost:36000/reset?sid=1

I know very little Javascript and haven't had any luck searching here,
so if anyone can help that woudl be great.

Thanks
Simply call

location = "http://localhost:36000/reset?sid=1";

This will replace the current page with the result of this request.

If you need to do this invisibly, you will have to use AJAX. If needed,
I can give you an example.

HTH,
Laurent
--
Laurent Bugnion, GalaSoft
Software engineering: http://www.galasoft-LB.ch
PhotoAlbum: http://www.galasoft-LB.ch/pictures
Support children in Calcutta: http://www.calcutta-espoir.ch
Nov 14 '06 #2
Laurent Bugnion said the following on 11/14/2006 6:26 AM:
Hi,

jo******@gmail.com wrote:
>I have a perl script running on my server on a chosen port, and I want
to be able to execute functions that this script provides from inside
Javascript functions.

For example, I need to call

http://localhost:36000/reset?sid=1

I know very little Javascript and haven't had any luck searching here,
so if anyone can help that woudl be great.

Thanks

Simply call

location = "http://localhost:36000/reset?sid=1";

This will replace the current page with the result of this request.

If you need to do this invisibly, you will have to use AJAX. If needed,
I can give you an example.
AJAX but only if you need to use the return value. Otherwise, setting
the .src of an image does the trick.

<URL: http://jibbering.com/faq/#FAQ4_34>

--
Randy
Chance Favors The Prepared Mind
comp.lang.javascript FAQ - http://jibbering.com/faq
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
Nov 14 '06 #3
or the source of an iframe, then you can get the return value by
calling the innerHTML of the iframe, thats the way google provides
feedback about uploading a file in gmail while youre still writing. the
return of the perl script must have decent mimetype, and could even be
the word OK! - as in google

Nov 15 '06 #4

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

Similar topics

6
by: vishal | last post by:
hi how can i get the file name from which the current executing file is called. i m making a scrript which will be called from many other scripts. this script performs some calculation and then...
0
by: rvdw | last post by:
Hi All, I've a serious problem with executing stored procedures (SQL2000) from an Access db (version 97). After executing a stored procedure , msaccess hangs. The whole call to the procedure is...
7
by: Brian Burgess | last post by:
Hi all, Anyone know of any special issues with Server.Execute? Specifically for me it simply is not executing ... the server does not transfer to the page specified. The calling ASP just...
0
by: Max Samookha | last post by:
Hi! Does anybody know how to abort a long-running asynchronous call from the calling thread? To do this, one needs a reference to the thread executing the call and there seems to be no easy way to...
4
by: chris.dunigan | last post by:
I'm looking for an example of how to execute an existing DTS­ package from an ASP (VB)script and would appreciate any and all response. ­I don't even know if it's possible Thanks - Chuck...
1
by: rvdw | last post by:
Hi All, I've a serious problem with executing stored procedures (SQL2000) from an Access db (version 97). After executing a stored procedure , msaccess hangs. The whole call to the procedure is...
2
by: Tony Liu | last post by:
Hi, I want to get the name of the calling function of an executing function, I use the StackTrace class to do this and it seems working. However, does anyone think that there any side effect...
10
by: Mike | last post by:
I know this sounds strange but I am at a loss. I am calling a simple funtion that opens a connection to a SQL Server 2000 database and executes an Insert Statement. private void...
7
by: tshad | last post by:
I thought I understood how the SaveViewState is working and was trying to use this (as per some code I found) to detect refreshes. It seemed to be working but I found that the SaveViewState was...
6
by: Eric_Dexter | last post by:
Instead of creating my buttons and waiting for me to press them to execute they are executing when I create them and won't do my callback when I press them.. thanks for any help in advance ...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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...
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...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.