473,769 Members | 5,757 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

ASP works with VBscript but not with javascript

bob
Hi,

I made a ASP file in order to pass variables from VB or JAVAscript to the
ASP-server. Both ASP script are in VB, but the client-script are in VB and
in JAVAscript. The name are testvb.asp and testjava.asp.
My problem is: it works with testvb.asp but not with testjava.asp (no error
but nothing appears)

1) testvb.asp:
<form name="fo" method="post">
<SELECT name="pck" STYLE="position :absolute;left= 140;width:45">
<option value=1> 1
<option value=2> 2
</SELECT>
<input name="hid" type="hidden" value="" >
<INPUT id=go TYPE="button" value="test"
STYLE="Position :absolute;left: 280;top:200">
</form>

<script language=vbscri pt>
sub go_onclick()
on error resume next
fo.hid.value="b obo"
fo.action="test vb.asp"
fo.submit
end sub
</script>

<%
a=request("pck" )
b=request("hid" )
response.write( a & " " & b)
%>

1) testjava.asp
<form name="fo" method="post">
<SELECT name="pck" STYLE="position :absolute;left= 140;width:45">
<option value=1> 1
<option value=2> 2
</SELECT>
<input name="hid" type="hidden" value="" >
<INPUT id="go" TYPE="button" value="test"
STYLE="Position :absolute;left: 280;top:200">
</form>

<script language=javasc ript>
function goonclick()
{
document.getEle mentById("hid") .value="bibi"
document.getEle mentById("fo"). action="testjav a.asp"
document.getEle mentById("fo"). submit
}
document.getEle mentById("go"). onclick=gooncli ck
</script>

<%
a=request("pck" )
b=request("hid" )
response.write( a & " " & b)
%>

By the way, suppose i want also the asp-script in javascrip: is the code
between <% %> also valid for javascript?

Thanks for any help
bob
Jul 19 '05 #1
3 2712
"bob" wrote in message news:%2******** ********@TK2MSF TNGP11.phx.gbl. ..
: My problem is: it works with testvb.asp but not with testjava.asp (no
error
: but nothing appears)
:
: 1) testjava.asp
: <form name="fo" method="post">

<form name="fo" method="post" onsubmit="retur n goonclick()">

: <SELECT name="pck" STYLE="position :absolute;left= 140;width:45">
: <option value=1> 1
: <option value=2> 2
: </SELECT>
: <input name="hid" type="hidden" value="" >
: <INPUT id="go" TYPE="button" value="test"
STYLE="Position :absolute;left: 280;top:200">

<input id="go" type="submit" value="test" style="position : absolute; left:
280px; top: 200px" />

: </form>
:
: <script language=javasc ript>

<script type="text/javascript">

: function goonclick()
: {
: document.getEle mentById("hid") .value="bibi"
: document.getEle mentById("fo"). action="testjav a.asp"
: document.getEle mentById("fo"). submit

// document.getEle mentById("fo"). submit
return true;

: }
: document.getEle mentById("go"). onclick=gooncli ck

// document.getEle mentById("go"). onclick=gooncli ck

: </script>
:
: <%
: a=request("pck" )
: b=request("hid" )
: response.write( a & " " & b)
: %>
:
: By the way, suppose i want also the asp-script in javascrip: is the code
: between <% %> also valid for javascript?

<%@ Language="JScri pt" %>

or

<%@ Language="Javas cript" %>

--
Roland Hall
/* This information is distributed in the hope that it will be useful, but
without any warranty; without even the implied warranty of merchantability
or fitness for a particular purpose. */
Technet Script Center - http://www.microsoft.com/technet/scriptcenter/
WSH 5.6 Documentation - http://msdn.microsoft.com/downloads/list/webdev.asp
MSDN Library - http://msdn.microsoft.com/library/default.asp
Jul 19 '05 #2
bob
Thanks for replying ... it works

Jul 19 '05 #3
"bob" wrote in message news:ug******** ******@tk2msftn gp13.phx.gbl...
: Thanks for replying ... it works

You're welcome. That's good news. (O:=
Jul 19 '05 #4

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

Similar topics

2
3452
by: Frank | last post by:
When I used IE 6.0 to view the ASP page on Window 2000 server PC, I encountered the error message: "Expected end of statement". The ASP page code is as: ****************************************************** <script language="VBScript"> function vb_Test(ptValue) vb_Test = ptValue end function
29
6026
by: Christopher Brandsdal | last post by:
If I have a .ASP page that runs JScript code - is it possible to include an ..ASP page that runs VBscript???
20
5973
by: Harag | last post by:
Hi All. I'm stating out doing some web developing. I was wondering which of the server side languages should I concentrate on and learn. I Know CSS, HTML, T-SQL I can look at the client javascript code and work out what it does but I can't really write it from scratch.
5
5194
by: gpence | last post by:
!!! Newbie question warning !!! I am somewhat familiar with javascript's ability to "access" the browser's favorites list -- for example, using window.home() will take you to the default URL -- is there any similar code for an ASP page using VBscript? I want my Logout button to take them back to their homepage. I've looked into Response.Redirect, but I can't seem to find a way to take the user out of my program to their home default. ...
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...
1
1497
by: Abby Lee | last post by:
My page runs fine...I just get the yeld sign with a "!" in it. Ok, I asked this question in the VBscript group and they tell me it's a JavaScript issue even though I don't get the error until I introduce the VBscript to the page. Please look at it. I'm getting the following error message on my page. The function function formatCurrency(strValue)
2
2493
by: duncan | last post by:
why does this work :- <HEAD> ...... <SCRIPT LANGUAGE="javascript"> function test() { alert("test 1") } </SCRIPT>
2
2074
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"),
2
2898
by: Beemer Biker | last post by:
I put together a few lines of vbscript so I could dump the contents of a string to my C drive. It worked fine in a small test.htm where I put the vbscript at the top of the file. It failed to work (no error message) in my large program where I needed to dump out the stuff. I did get an error message from FrontPage 2003 but it was not informative. When moved the vbscript to the bottom of the page it worked fine! ========start of...
1
9990
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
8869
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7406
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6668
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5297
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
5445
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3955
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
3560
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2814
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.