Javascript To Read Asp Variable
Is it possible to read any ASP variable from a javascript file (.js) ?
View RepliesIs it possible to read any ASP variable from a javascript file (.js) ?
View Repliesis there any way of passing a javascript variable over to a asp variable so
i can write it to my database.
I have created a session in asp .net and transfer to an HTML page.
I want to grant access to that html page depending on the content
of that session object. Is there any way I can read that object using javascript
in an html page?
How do I convert an ASP variable to a Javascript variable?
View Replies View RelatedI have a variable in an INI file (fileLocation) which will point to the location where i can store some temporay files.
This fileLocation variable has a value "%USERPROFILE%Local SettingsTemp" >Now, how do i get the actual expansion of this variable (for ex:i.e : C:Documents and Settings<username>Local SettingsTemp).
How can this be achieved through ASP?
This seem to be a simple question, but I'm having no luck with Google
keywords...
I have an some ASP in which I open a recordset via a connection to a MSSQL
database. I don't want to keep the database connection open while I'm
processing the data from the resulting recordset.
Is there a method that I can use to copy the recordset into an array
(collection, etc), the close my DB connnection and finally process the data
I copied from the recordset?
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+
i have this in javascript
letter = String.fromCharCode("A".charCodeAt(0) + <%=x%>)
how do i create a asp variable from letter?
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:
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.
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.
How do I display a javascript variable in asp code? Code:
View Replies View RelatedIf 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;
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?
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.
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 RelatedIs it possible to get an asp session variable within a javascript function?
View Replies View RelatedI 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?
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>
?
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.....
sql = "SELECT * FROM & console &'news'"
I got that right now but i want the variable, console to be placed along with news so when it selects from the db it selects from gcnnews or whatever variable it's on. How do I do that?
im trying to subtart one quantity from another then stick the answer in to an update statment, but all i get is an error in syntax message
variable math bit=
qty=request.form("oqty")-Request.form("qty")
sql =
sSQL="Update spares SET spares.location='"&request("location")&_
"',spares.machine='"&request("machine")&_
"',spares.part_desc='"&request("part_desc")&_
"',spares.part_number='"&request("part_number")&_
"',spares.qty='(" & qty & ") "&_
"',spares.min_qty='"&request("min_qty")&_
"',spares.updated_by='"&session("name")&"' WHERE(spares.id)=" & form_id
I need to assign a value to a variable, but this variable name is dependant upon another variable!! I am including the code below so you can see it, cos if not I am sure you are thinking whattt?? Code:
View Replies View RelatedI,ve uploaded an MS Access DB to a web host and find that although I have set the DB permissions to Read and Write the actual tranfer changes these permissions and when I try to write to the DB there is an error to the effect that the DB is read only.
I have downloaded the DB I uploaded with full read/write permissions and find that the DB is read only.
Is it possible to use asp to read from a .tsv file?? If so how do you create the connection??
View Replies View RelatedIs it possible to read PDF File using ASP.
when I retrieve data from the my database if I got the name and description. I want only display the first 20/30 letters of the description but I don't know how to do.
View Replies View RelatedI have an ASP web site that I can read an XML file and process it fine. However, now I am asked to read XML data via (I think) a web service url. I looked at the ADO Stream and it looks like it may be a way to do this, but I'm not sure. I need to read 2 different streams, one with data and one with returned images.
I need to process the data like a recordset and load it (and other) information into a web page and return to the browser. Can anyone point me in a direction to read more about how to do this and/or some samples?
I need to use ASP to read a SQL db for dates. If the date falls within "this (current) month", I need to auto-populate a word document with the corresponding information from the tables... Is this possible.
View Replies View RelatedIs there a way that I can read the current url.
I have an asp page currently such as default.asp?x=1&y=2&z=3
Now I want to keep the existing parameters and attach another parameter
to it and resend to default.asp
As the original parameters are dynamic, and may or may not be
generated, the only way is to read the current url and to simply add my
new parameter such as h=5 to the url.
I don't know how to read the current url.
I tried Request.ServerVariables("SCRIPT_NAME") but that didn't include
the parameters. i.e. it just returned the default.asp
Is there a way to read email messages with ASP without installing components?
And will it work with any email server, or just windows IIS?
Something that will work almost like Webmail. But I just need to read the From, Subject and Body of the email.
I got a database with user and email in it. Now I want when a user logs into my page that it automaticly fills in the email into a email form. How can I do that in Asp.
View Replies View Relatedanyone here got an idea on what codes am i going to use? I got a folder full of images (jpg) and I want my asp page to display those images.
View Replies View Related