473,722 Members | 2,161 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

JavaScript and VBScript

JWM
Hello: Here is what I am trying to do......

The user clicks on the delete icon, and gets a JavaScript client-side popup
to confirm that he wants to delete. I am passing this client-side function
a contactID.
Then, I want to send the result of this confirm (true|false) to a
server-side VBScript function, along with the contactID.
The VBScript function will then perform a delete in the database for the
specified contactID.

I have seen many examples about sending stuff back and forth between
JavaScript and VBScript, between server and client, but all the examples I
see are just popping up generic alerts and such. I need to execute some JS
on the client side, return a value, and send it to a VBScript function on
the server side.

Someone please help me.

Joe
jw***@sbcglobal .net


Jul 23 '05 #1
3 1891
JWM wrote:
Hello: Here is what I am trying to do......

The user clicks on the delete icon, and gets a JavaScript client-side popup
to confirm that he wants to delete. I am passing this client-side function
a contactID.
Then, I want to send the result of this confirm (true|false) to a
server-side VBScript function, along with the contactID.
The VBScript function will then perform a delete in the database for the
specified contactID.
Why do you want to call the server side script if the user doesn't want
to delete? Seems the only time you want to send the data is when they
want to delete.

I have seen many examples about sending stuff back and forth between
JavaScript and VBScript, between server and client, but all the examples I
see are just popping up generic alerts and such. I need to execute some JS
on the client side, return a value, and send it to a VBScript function on
the server side.

Someone please help me.


The solution will depend on the answer to one more question:

What do you want to happen *after* the user says "Yes, I want to
delete". Do you want the page to refresh? I would assume so. <form
onsubnmit="retu rn confirm('Are you sure you want to delete that record?"
action="myFile. asp"> And have the button be a submit button, and let it
submit the form. myFile.asp would pick up the form values, and then act
on it.

If you don't want the page to refresh/update, you could simply change
the source of an image and have the myFile.asp called on the server, as
the img src.
--
Randy
Chance Favors The Prepared Mind
comp.lang.javas cript FAQ - http://jibbering.com/faq/
Jul 23 '05 #2
Randy Webb wrote:
What do you want to happen *after* the user says "Yes, I want to
delete". Do you want the page to refresh? I would assume so. <form
onsubnmit="retu rn confirm('Are you sure you want to delete that record?"
action="myFile. asp">


That should be:

onsubmit="retur n confirm('Are you sure you want to delete that record?')"


--
Randy
Chance Favors The Prepared Mind
comp.lang.javas cript FAQ - http://jibbering.com/faq/
Jul 23 '05 #3
Randy Webb <hi************ @aol.com> wrote in message news:<s-*************** *****@comcast.c om>...
JWM wrote:
Hello: Here is what I am trying to do......

The user clicks on the delete icon, and gets a JavaScript client-side popup
to confirm that he wants to delete. I am passing this client-side function
a contactID.
Then, I want to send the result of this confirm (true|false) to a
server-side VBScript function, along with the contactID.
The VBScript function will then perform a delete in the database for the
specified contactID.


Why do you want to call the server side script if the user doesn't want
to delete? Seems the only time you want to send the data is when they
want to delete.

I have seen many examples about sending stuff back and forth between
JavaScript and VBScript, between server and client, but all the examples I
see are just popping up generic alerts and such. I need to execute some JS
on the client side, return a value, and send it to a VBScript function on
the server side.

Someone please help me.


The solution will depend on the answer to one more question:

What do you want to happen *after* the user says "Yes, I want to
delete". Do you want the page to refresh? I would assume so. <form
onsubnmit="retu rn confirm('Are you sure you want to delete that record?"
action="myFile. asp"> And have the button be a submit button, and let it
submit the form. myFile.asp would pick up the form values, and then act
on it.

If you don't want the page to refresh/update, you could simply change
the source of an image and have the myFile.asp called on the server, as
the img src.


what do you know about those two? stop pretending you know something.
useless reply.
Jul 23 '05 #4

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

Similar topics

6
11793
by: John Davis | last post by:
Just wonder if <%@ Language="JAVASCRIPT" %> exists?? Since JavaScript is used in client-side scripting, but <% ... %> is used in server-side scripting. It sounds doesn't make sense. But I saw that in a ASP test question before. The question is like this: How can you script your ASP code in JavaScript? The answer is: <%@ Language="JAVASCRIPT" %>
5
6825
by: John Davis | last post by:
When I create new documents in Dreamweaver, there are several choices for ASP creation: ASP JavaScript: run at client side?? ASP VBScript: run at server side?? ASP.NET C# ASP.NET VB I don't understand the differences between ASP JavaScript and ASP VBScript?? Because JavaScript is client-side technology, and ASP is server side technology. I think VBScript is used to implement ASP pages.
1
521
by: Ian Sedwell | last post by:
Hi guys Many thanks to all who replied to my original question. Actually, it's dead easy and the way I was doing it was correct the first time. You do indeed simply call the VBScript routine from the JavaScript routine. It doesn't matter whether the scripts are in external files, or embedded in the HTML document, so long as the VBScript is loaded before it is called from JavaScript - obviously. The VBScript routine can return a result...
13
8477
by: Alex Molochnikov | last post by:
Is there any way to find out programmatically if Javascript is supported/enabled in a browser? By "programmatically" I mean on the Java servlet side. TIA Alex Molochnikov Gestalt Corporation
2
2491
by: duncan | last post by:
why does this work :- <HEAD> ...... <SCRIPT LANGUAGE="javascript"> function test() { alert("test 1") } </SCRIPT>
2
2068
by: shookim | last post by:
I have a problem with my javascript code. The window.onload function doesn't get called when there is vbscript between the two. Here is my code which works: <script type="text/javascript"> window.onload = function () { var oTextbox = new AutoSuggestControl(document.getElementById("txtManagers"), new ManagerSuggestions()); }//adocument.getElementById("txtProfileID"),
11
13401
by: Doug van Vianen | last post by:
Hi, I often like to include some JavaScript coding in my web pages to make them more interesting. Unfortunately, even when this coding is as simple as a check to see what the display width is in pixels so that pictures on the page can be adjusted to better fit the display, Internet Explorer detects the coding and blocks it. Of course the user can click on the message displayed above the web page to allow "the active component" but many...
10
4701
by: Shadow Lynx | last post by:
That subject packs a whallop, so let me explain in better detail what's happening and how it relates to ASPX pages... In a nutshell, if the first <script /on a page is of type "text/vbscript", you cannot use inline JavaScript statements that call setTimeout with functions that start with a double-underscore. This is very relavant to ASPX (ASP Dot Net) pages because it means that AutoPostBacks will fail since they generally call the...
9
8424
by: Erwin Moller | last post by:
Hi, Can anybody comment on this? In comp.lang.php I advised somebody to skip using: <script language="javascript"> and use: <script type="text/javascript"> And mr. Dunlop gave this response:
5
9296
by: Tomislav | last post by:
Hello, I tried to use "javascript:return confirm();" function in following manner ( triggered by form onSubmit event ): ** <form method="post" action="mail.php" onSubmit="javascript:return confirm('Do you really want to send this order ?);">
0
8863
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8739
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9238
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9157
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
4502
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4762
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3207
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2602
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2147
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.