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

server-side vbscript call with javascript client-side

Hey folks,

Not an off-topic posting.....since I was shot-down in an earlier
post...this one's legit.

How do I go about calling a server-side vbscript within a client-side
javascript function? What I have is a page heavy on the javascript that has
a number of functions, one of which is to begin a visual countdown with an
onclick and also open an asp page containing the server-side vbscript, which
initiates a wake-on-lan call. I had no idea how to call the vbscript within
the javascript function, so this is why I opted for the vbscript asp page
"pop-up" via window.open.

Here's a sample of the javascript function that gets called with an onclick:

function fnHide1(){
DavidWakeUp_window =
window.open("davidwakeup.asp","mywindow","status=n o,width=0,height=0");
window.focus();
window.setTimeout("fnHide2()",20000);
setTimeout('countDown()');
window.setTimeout('DavidWakeUp_window.close()',500 0);
}

And the asp page, davidwakeup.asp is something like:

<%
set objWOL = CreateObject("UltraWOL.ctlUltraWOL")
objWOL.BroadcastAddr = "192.168.2.255"
objWOL.MACAddr = "00-00-00-00-00-00"
objWOL.WakeUp
%>

Is it possible to just make this vbscript a sub function and then call the
function within the javascript function hence eliminating the window.open
pop-up?

Thanks for any advice,

Dave

Jul 22 '05 #1
3 6757
David Shorthouse wrote:
Hey folks,

Not an off-topic posting.....since I was shot-down in an earlier
post...this one's legit.

How do I go about calling a server-side vbscript within a client-side
javascript function?


Sorry, but client-side questions belong in a client-side newsgroup.
..scripting.jscript should work for you.
In the meantime, look up the XMLHTTP object.

It's also possible by setting an IMG element's src to the asp page that you
wish to run.

Bob Barrows

--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.
Jul 22 '05 #2
Dave,

client-side scripts and server-side scripts actually sit on two distinct
machines, so they cannot "call" each other.

You can however, make an HTTP request using client-side script and the XMLHTTP
Request object to send a request to the server where it will execute the
serve-side script.

Search on this NG or the JScript NG for an example.

Brian

Jul 22 '05 #3
Another option is to use a frameset with a "hidden" frame (width="1") and
have the javascript code load the ASP page into the hidden frame.

--
Mark Schupp
Head of Development
Integrity eLearning
www.ielearning.com
"Brian Staff" <brianstaff@[NoSpam]compuserve.com> wrote in message
news:VA******************@bstaffw2k.jda.corp.local ...
Dave,

client-side scripts and server-side scripts actually sit on two distinct
machines, so they cannot "call" each other.

You can however, make an HTTP request using client-side script and the XMLHTTP Request object to send a request to the server where it will execute the
serve-side script.

Search on this NG or the JScript NG for an example.

Brian

Jul 22 '05 #4

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

Similar topics

2
by: Ken Lindner | last post by:
I have a need to become familiar with SQL Server 2000 for work. Needless to say I am new to SQL Server any version, but not IT in general. My employer has provided me with the SQL Server 2000...
0
by: Philip Trim | last post by:
General Brief: 3 SQL Servers as MS SQL Server 2000 Standard Edition with Service Pack 3 All using FTP for snapshots All Servers are both Publishers and Distributors. Server A has the correct...
5
by: Grim Reaper | last post by:
My work let me put SQL Server 7.0 Enterprise Edition on my laptop. I have never setup a server from the beginning, so I am a little new at creating server groups. Alright, I am trying to create...
2
by: Jay Chan | last post by:
We have just installed a SQL Server 2000 (SP 3A) onto a computer that has Windows-2003 Server on it. Now, we cannot get access to that database server from other computers. Seem like this may be an...
22
by: EP | last post by:
When running my asp.net hosting service (asp.net without IIS), on server 2003 with IIS not installed, I get the following when trying to process a request. "System.DllNotFoundException: Unable to...
4
by: coosa | last post by:
Hi, I was installing SQL Server on my machine and during installation my PC freezed. It happens frequently on my machine. So i tried after restarting to install it again and since then i always...
1
by: Peter | last post by:
I've purchased VS.NET 2005 Standard and have tried to install SQL Server 2005 Express, but get the following error in the error log. Please could someone help me.... Microsoft SQL Server 2005...
14
by: Marcus | last post by:
I have a function that simply returns TRUE if it can connect to a particular Sql Server 2005 express, or FALSE if it cannot. I am getting some strange error codes returned when the computer that...
10
by: sara | last post by:
Hi All, I was able to connect to MS SQL Server 2005 on my computer but after a while I can not. When I want to connect to it using MS SQL Server Management Studio I got this error: An error...
1
by: manish deshpande | last post by:
Hi, When i'm installing MySQL-server-standard-5.0.24a-0.rhel3.i386.rpm by the following command: rpm -i MySQL-server-standard-5.0.24a-0.rhel3.i386.rpm the following error is being shown: ...
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: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
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
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new...

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.