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
ADVERTISEMENT
I've got a software package that generates nice roll-over menus. The code generated is javascript. I want to edit the javascript to prevent specific menu buttons from appearing based on security/permissions settings. These permissions are contained in ASP session vairables. So, in the js I want to check for an ASP session("perms")... If I place <% if ... %> in the js file--it errors.
View Replies
View Related
is there any way of passing a javascript variable over to a asp variable so
i can write it to my database.
View Replies
View Related
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
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
View Related
How do I convert an ASP variable to a Javascript variable?
View Replies
View Related
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
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
I have a menu that I use on my Intranet app, and while I did try to replace
it recently, I ended up going back to it. It's built entirely with
javascript, and works great.
However, there are certain pages where I would like to be able to put an
item into a querystring for a link. That is, I might have a link which is
worded "Add to this ticket" and the hyperlink associated with that text is
along the lines of "addtoticket.asp?ticketid=1000"
I am not able to figure out how to have an ASP variable into a link built by
javascript. This is the main question. How can I have the ASP variable in a
javascript?
Because it's Inranet, I don't have the page to show you. However, I have
zipped up the two javascript files and placed them at
www.middletree.net/js.zip
Also, in this case, IE-specific code will not be a problem. 100% of users
are on IE5+
View Replies
View Related
i have this in javascript
letter = String.fromCharCode("A".charCodeAt(0) + <%=x%>)
how do i create a asp variable from letter?
View Replies
View Related
The problem I am having is that I have a js file; I import or refer to that file
<script type="text/javascript" language="JavaScript1.2" src="../JScript/pop_data.js"></script>
within the js file I create all of my menu's. Now I have a session variable set very early in the piece;
I want to see what the value of the seesion variable is in the javascript code to see if certain menu's should be setup or not. I have tried all sorts of variations of coding to see what the coding should be, and none seem to work. Code:
View Replies
View Related
I'm trying to take an ASP session variable and pass it into a javascript function with little success. As the page loads, the session variable is there and the javascript function is called as an include.
I've tried silly ideas like option explicit and using asp to write the javascript declaration of the variable.
View Replies
View Related
How do I display a javascript variable in asp code? Code:
View Replies
View Related
If I assign VBScript server side variable a to javascript variable x, it is fine.
<%
Dim a, b
a = 10
%>
var x = <%= a %>;
alert(x);
But if I do the other way around, then it has 500 error. any ideas??
<% b %> = x;
View Replies
View Related
Is it possible to read any ASP variable from a javascript file (.js) ?
View Replies
View Related
I have a session variable set on my main page which works fine, I also have a popup window called from a text link via javascript.
For some reason the session variable is not available on the popup window. Is this normal?
View Replies
View Related
I have a search function that is reading companies from a database via
ASP and spitting out the results. I have various fields of each company
in variables and I want to be able to create a link that uses
Javascript to copy the address to the clipboard.
I know there is the javascript:window.clipboardData.getData(), but I
can't get to parse the ASP variable through. Does anyone know how I can
do this.
View Replies
View Related
I'm trying to use a javascript function passing a vb variable. I don't understand why it doesn't work. Code:
View Replies
View Related
Is it possible to get an asp session variable within a javascript function?
View Replies
View Related
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
How can i store the JavaScript "screen.width" variable as an ASP variable?
Or is there a VBScript ASP equivalent of:
<script language="JavaScript1.2">
var mywidth = screen.width;
document.write (mywidth);
</script>
?
View Replies
View Related
I'm turning my application into a "DLL". Everything worked fine untill I try to do a "While" in my asp code. Then I recieve an error like this:
"Object variable or With block variable not set"
My vb code look like this.....
View Replies
View Related
Is it possible to open an FTP connection in ASP? I would like to download a file (short one), and display the contents on the page. Previously I used PHP and it was quite simple there, but I didn't find any information on this for ASP. Any suggestions?
View Replies
View Related
how do i access the next record in a database using a next button in a form. Assuming that i have accessed the first record and displayed on a page, now a 'next' button should be able to retrieve the next record in the db.
View Replies
View Related
if it was possible using asp to access a textbox value from the parent page in a popup page.The popup page is asp therefore the statement which tries to access the value from the parent page must be asp code (so no javascript functions can be used to access it).
I have tried several attempts at gaining the value such as:
<%
theTxtValue = request("opener.document.system.txtbox1.value")
%>
But none of my combinations seem to work,can anybody clarify if what I am trying to achieve is actually possible?
View Replies
View Related
i m writing some ASP to access a SQL database and it doesn't seem to be connecting right, i was wondering if someone could see if I have gone wrong anywhere in the connection code below and explain what i put in the DSN?
Dim VARIABLE
Dim CN
Dim RecordSet
Set CN=Server.CreateObject("ADODB.Connection")
CN.Open "Provider=SQLOLEDB; DSN=whats this?; uid=; password=; Initial Catalog=Table"
Set RecordSet = CN.Execute("SELECT * FROM Table where something ='"&VARIABLE&"'")
%>
<%Connection.Close %>
View Replies
View Related
At our company we daily need to access data from a website and use this data on other reports which we run daily...
step 1: we go the wesite
step 2: we authorize ourselves by providing username and login
step3: after successful login..the webpage provides us with links
step 4: we select one the links and then this lists the links to the documents (PDF and EXCEL) formats from where we get the data...
Now... is there a way to write a ASP script...to connect to the website, provide user details and access the desired link and then the desired document. And then we need to parse this document for the desired data.is it better to access the data from the PDF or from the EXCEL
View Replies
View Related
I know that when I send a request for an ASP script to the server, IIS gets the script, interprets the ASP and then basically spews out a load of HTML to my browser (over simplified I know). Hence the reason why when I look at the source code in IE all I see is HTML and no ASP.My question is this: Is it possible to get this source code as a string somehow to then further manipulate with ASP in a second page?
Surely there must be a way?
View Replies
View Related
As luck would have it I've landed a client whose site relies on ASP and what I can only assume is an MS Access database. ASP is definitely not the language of my choice but I'm stuck with having to learn the basics for what I'm required to do.
Basically the database is located in the folder /fpdb/ and is called vsproducts.mdb. It was actually installed by the off-the-shelf shopping cart/catalogue script that is being used by the site's owner. I need to be able to access and display on a page some data found in this database. Is this easy? I have next to no knowledge of ASP so please keep things as simple as possible
View Replies
View Related
Is it possible to access the relationship information from an ASP program? I'd like to be able to traverse the relationship tree of a .mdb file on my server from ASP/javascript code.
View Replies
View Related
Could someone have got samples on how to use ATL web services from an ASP page?.
View Replies
View Related
I am part of a group that has developed an ASP.Net web application.
I'm presently trying to test some code I wrote that checks for IE
browser at session start (and issue warning if not IE), but I can't
seem to "get out the starting blocks" with any non-IE browser: I've
tried Netscape 4.8, Netscape 7.0, and Opera 7.5. I've gotten a few
different errors, but most often I get the following when attemting to
access the startup page:
HTTP 401.2 - Unauthorized: Logon failed due to server configuration
Internet Information Services
Anybody know how to get another browser to work? Only my old Netscape
4.8 pops up a login dialogue, but I can't get that to log in
correctly.
View Replies
View Related
I'm having some problems getting variables to spit out the info I need.
Do While LoopCounter +1 < Session("TeamPop")
LoopCounter=LoopCounter+1
%>
<td><input type="text" name="Reliable<%=TeamMember&LoopCounter%>" maxlenth="40" size="8"> </td>
<%
Loop
Now if this executes three times it should generate three input boxes with names Reliable###### where each box is named Reliable with a five digit number after it which is stored in TeamMember1, TeamMember2, and TeamMember3. Unfortunately I just keep getting Reliable1, Reliable2, and Reliable3. Code:
View Replies
View Related