Accessing A VBScript Variable From JScript

I have the following code in an ASP page but it does not seem to allow a JScript to access VBScript variables. But if a VBScript accesses a variable in declared in a JScript TAG then it seems to work.

<SCRIPT LANGUAGE ="VBSCRIPT" RUNAT="SERVER"
Dim tes
test = 10
</SCRIPT><SCRIPT LANGUAGE ="JSCRIPT" RUNAT="SERVER"

Response.Write(test)

</SCRIPT>

View Replies


ADVERTISEMENT

Vbscript 2 Jscript

How to convert this from vbscript to jscript?

MBRequest("File1").Save

MBRequest is a script component

View Replies View Related

JScript And VBscript

If I have a .ASP page that runs JScript code - is it possible to include an ASP page that runs VBscript?

View Replies View Related

VBScript And JScript

At the top of my ASP page I declare <%@ Language=VBScript %> what do I have to write to embed some JScript in that page? Do I have to indicate that the code is intended to execute at the client side (if it is the case)?

View Replies View Related

Jscript Or Vbscript

Do most people use vbscript or jscript to control their ASP pages? I'm trying to decide which to learn.

View Replies View Related

Using Vbscript And Jscript

i have a page of asp (jscript) but the CAPTCHA code im using is vbscript. Can i use boths languages on my page? obviosuly i cant use two language tags, is there a way around this?

View Replies View Related

VBscript And JScript

I want to count how many characters there is in a string. In ASP I just use <%=Len(Variabel)%> How do I do this in Jscript? How can I display only a numer of characters from a variabel or a string? In ASP I use <%=Left(Variabel,20)%> How do I do this in Jscript? THe code i use is part vbscript and jscript. translate it to pure JScript.

var dot

if(Len(oEventsList.GetBody()) > 20)
{
dot = "..."
}

Response.Write (Left(oEventsList.GetBody(),20) + dot + "<br><br>");

View Replies View Related

VBscript Vs Jscript

I'm stating out doing some web developing. 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.

I know mainly VBscript. I was wondering should I drop VBscript and learn Jscript then code both the client & server code in Javascript/Jscript. I have a couple "CLASS" files in VBscript and was wondering how does Jscript do this ?

View Replies View Related

Jscript And VBScript

I am quite frustrated. The mai9n reason is because I don't understand how internet works. I know VBScript and I know a little bit of Jscript. I began a program (website) with vbscript (ASP) and after coding some files, i found out that it ain't cross-browser compatible so I decided to switch to JS. Now I have started to use JS in ASP and this is what TimLensen said.

You could convert it to serverside Jscript but I wouldn't recommend it since not much asp apps are written in Jscript these days, it doesn't really have a point either. Learn the basics of asp at w3schools. Don't just look at the code and copy it and change it a bit but try to understand how the internet works.

View Replies View Related

JScript, VBScript Or HTML

I do not know anything about JScript, VBScript or HTML, the only thing i know how to play its the famous frontpage. I was just wondering if there's someone out there that could give some more information on how to start, courses for newbies, begginers, books, anything at all would be very apreciated.

View Replies View Related

Window - Jscript And Vbscript

I am using javascript to open the pop up window. Now the pop up window
will be displayed in a center position and in it the images will be
displays (one image at a time as the next and previous button is
clicked).

The images are retrieved and displayed using asp. Now is there
a way to shrink the size of the image so that it fits the size of the
pop up window and when I click on the image the image will be resized to
its original size. Code:

View Replies View Related

Accessing Form's Field From Vbscript

how to access the form's field in the vbscript written in the same age without submitting the form.

Actually i want to access the ACCESS database to retrieve the records based on the value in the textbox catText.

request.form("catText") is just not working......
vbscript is the default language set up for the pages.

if i create a function in a vbscript then the SERVER objetc is not recognized at all!!!!!!!! How Come?

View Replies View Related

Accessing Javascript Variable In ASP

I have an asp page that is needing to validate data against database but to do so I need to pull in a key value from another web page. I can get the key value in ASP using the following javascript code:

<script>
var main = opener.opener;
var currQuote = main.document.forms[0].quotenum.value;
</script>

My problem is trying to figure out how to use currQuote in the ASP code surrounding the script. There's got to be a way to do it - I'm just burnt out trying to figure it out.

View Replies View Related

Accessing Session Variable

I set a session variable like so in a vb script:
Session("imgvisit") = whatever

Can I then access that within a runat server jscript, and how do I access it? Or in general how can I pass a variable from the vb script to a jscript.

View Replies View Related

Posting A Form In The Background And Accessing The Response As A Variable

I am using a new payment gateway for one of my sites. One of the options they recommend for submitting the credit card info involves submitting a form in "the background" with a post. They then return a comma-delimited string, which I can easily parse and act upon.

How do I submit a form in the background? I'm sure it's simple, I just never had to do it so I never learned how...

View Replies View Related

Accessing/Passing An Object Variable To A Server.Execute Include

I've been browsing this and a few other related newsgroups trying to get my head around this problem, and so far all the trails seem to go cold, without an acceptable solution being reached. I'm posting here because there seems to be a few MVP's knocking around, and if they dont know, then it's a safe bet nobody does.

I'm beginning to think that what I want to do is simply not possible - but i'll put it out there once more.

Here goes: I'm writing a content managaement system - and i'm making use of dynamic includes via the "read a text file" technique, and then substitiuting values into markers in the template. Code:

View Replies View Related

Vbscript Include File In Jscript File

I have an asp page written entirely in jscript with a vbscript used as an include file which one variable on the page must access.

When the page runs, I run into jscript complilation errors when it tries to access the include file (since it is written in vbscript), and I can't figure out how to get the two to work together. How do you get both scripting languages to work on the same page?

View Replies View Related

VBScript Variable

I have an ASP project where I have users select or input values into a criteria page and then once they press "Submit" the ActiveX viewer displays the crystal report. All works fine and the criteria can be somewhat dynamic because the variables are used to build a SQL statement that is passed to the crystal report as the dataset.
What I would like to do is create a variable on the Crystal report that will display the SQL statement or at least an English translation. This variable will be used to display the criteria of the report so end-users can see what criteria was used to generate the output of the report.

View Replies View Related

Make A Variable In Vbscript

I'm dividing two variables and on some instances the results going to be a long decimal. I want the decimal to round up to only one pace tho. How could I do something like that? My coding looks like this.. Code:

readscore=rsgameinfo("readerscore")/rsgameinfo("readervotes")

View Replies View Related

Variable In Flash To Vbscript

I want to pass a variable by way of a querystring (or any way that's possible) from flash (actionscript) to vbscript. From there I want to save the variable into a MySQL database. I understand the vbscript part but how would I transfer a querystring from a flash program to vbscript?

View Replies View Related

Reference VBScript Variable

This is my VBScript function:

<script language="JavaScript" type="text/JavaScript">
Dim UN
Set objNet = CreateObject("WScript.NetWork")
Set objUser = GetObject("WinNT://my domain/" & objNet.UserName )
UN = objNet.UserName & " (" & objUser.FullName & ")"
</script>

How can I reference the VBScript Variable UN in my ASP code? <%=UN%> won't work because VBScript is on the client side and ASP is on the server side. If I have to post it on one page and read it on another, how do I do that?

View Replies View Related

Storing Sql Output Into A Vbscript Asp Variable Aid

I tried the search function but I can't really identify what this kind of issue would be called (Searching store variable comes back with hundreds/thousands of hits).

I am doing an update form which opens 2 SQL connections (its easier for me to do this cause I mess up joins to a significant degree, that and performance is not a big worry, eitherway).

<notes> Both connections are open, one is called rs, the other is called articlers. I have 2 databases (named database1, and database2), and I have two different SQL strings (SQL and articleSQL, the problem comes in the 2nd string and in storing a variable. Code:

View Replies View Related

Change Variable Type In VBScript


<%@ Language=VBScript %>
<%
dim a
dim b
a=11
b="11"
if a=b then
Response.Write "a=b"
end if
%>
But can't shows "a=b".How can changes variable type?

View Replies View Related

Pass A Javascript Variable To Another Page But Vbscript

I have an input box when the user clicks on the button.

var number=prompt("enter journal number");

How is it possible to pass this variable forward but to vbscript? So i could use that variable in an sql procedure?

View Replies View Related

Passing Variable From VBScript To ASP Page Using Form

I have a Function in VB Script that generates a signature. I assign the result to a variable and then need to do a hidden post to an ASP Page for further processing.

Basic functionality is I have a button upon pressing it -- It does the hidden post.

Code looks like this. Please assist with passing this stringToSign variable to the .asp page via hidden post. Code:

View Replies View Related

Launch Sqlcmd In VBScript And Save Results To Variable

I want to use vbscript to run a script multiple times and save its results to a text file. I have practically wrote this script before but only using a sql command wrote in to the script. However, this is a lengthy sql file so can not be directly entered in to the vbs script,s o I would like to run it using sqlcmd.

"SQLCMD -S "&WScript.Arguments(0)&" -i "&WScript.Arguments(1)

I have tried Googling this problem but found very little information about it. Any discussions online that I have found show no code and assume you already know how to do it.

I have found this so far:

Set objShell = CreateObject("WScript.Shell")
Set objScriptExec = objShell.Exec("sqlcmd -S "&WScript.Arguments(0)&" -i "&WScript.Arguments(1))

But how do I get hold of the results in to some kind of variable?

View Replies View Related

Assigning A Boolean Of True Or False To VBScript Variable...

Is there a way I can assign a value of true or false to a VBScript variable? I have a function where I want to initiate a value of false: Would this work? Code:

View Replies View Related

Run JScript In ASP Tag

I have the following code in which the sessionExpire() is function in JScript. To display a msg box. But fails.

<%
If Session.Contents("Access_Key") = "" Then
sessionExpire();
End If
%>

View Replies View Related

JSCRIPT And ASP

need to learn ASP for a work project but don't really want to have to learn VBScript. Going forward, I'll also need to use ASP.NET so a book covering that with JScript would be good too.

View Replies View Related

JScript

By VBScript I can use this code:

Response.Write "ABC"

How can I use JScript show "ABC"?

View Replies View Related

Reg Exp - JScript

Using JScript. is there a better way to write the following reg exp. or am I doing something right for a change ? Code:

View Replies View Related

Jscript.dll On .asp Page?

Would anyone be able to confirm that 'jscript.dll' is a necessary file for an .asp page on IIS 5.0 to use the <script language="JavaScipt" runat="SERVER"code? It looks like the code in this section is not working and being recognized since it keeps giving me:

"Microsoft JScript runtime (0x800A01B0)
File name or class name not found during Automation operation"

and am suspecting that this jscript.dll file is a necessary file that's missing or not installed since my search on the webserver's c drive came up empty.

View Replies View Related

Calling JScript

I'm working on a project and the designer guy uses templates for everything. THis is fine except I have to call a JScript function when the page loads and I have no access to the body tag. Is there a way to call the function as the page loads from a VBScript command?

View Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved