Is it possible to assign javascript variables values to ASP?
e.g. How would I store the following JS variable as an ASP variable in VBScript?
<script type="text/javascript"> var intJavaScriptNumber = 25; </script>
The problem is I've got about 50 of these variables on a page, and they all need to be used in a simple equation which slows the browser down. If I could get them all into ASP then I could process this server side much more comfortably.
If Request.Form("resScreen") = "1024x768" Then screenSize = "big" Else screenSize = "small" End If
this works fine, but when this page is reloaded, it doesn't find this Request.Form("resScreen") (this form is also on another page, which explains why) but can I store this variable "big" the first time it loads somehow?
For Each objitem in Request.Form if request.form(objitem).count > 0 then For intLoop = 1 to Request.Form(objitem).count Objitem = request.form(objitem) End if Next
server error in line of "end if"
I want to collect the values from the form and assign a variable to each value field
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+
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.
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 put in a request recently for a script which would return 9 random numbers between 1 and 30. I got a reply which gave me this script, which writes them out.
It works great, but in the loop that writes them out, instead I would like to assign each value to a variable, such as img1,img2,img3,img4, etc. in the for loop, is this possible, or should I write out 9 statement lines, each assigning a value to a variable. I intend to plug the values into a java applet which rotates images.
Come to think of it, I could just put each value of the array right into the img tag, no? <img src="images/<%=random_number(1)=>.jpg"> Code:
I am using Visual Studio I have created a website using HTML code and the pages look fine I now need to do the following.
I have a picture where if some one clicks on it it then needs to query an SQL database and return on a different page the results. How do I assign a sql database to my website and how do I connect to it ?
I'm retrieving the screen resoltion with javascript code, but i can't assign the correct value to asp. the response.write is displaying zero (0) for screen res., although when i do a document.write in the javascript part, then my screen res. is 1004 ...
I have this simple application that I put together using ASP. It has an html form that submits to an access database through a simple ASP file. It’s a survey form basically. One of the departments here wants to get some feedback from their students and in return for filling out the survey they will be entered into a drawing for a gift certificate. The catch is that the survey is anonymous. What they want to happen is each person is given a unique number at the end of the survey and they will pick one of those numbers randomly to see who the winner is. How can I possibly do this? I am stuck.
I think I may know what I need to do:
Pull a unique number from a database and post it onto the HTML form near the submit button. Notate on the page that the user write the number down and when they hit submit it is inserted into the database along with the record. I have absolutely no idea how to do that.
The HTML form submits into the database using this "add.asp" file:
I'm setting the title attribute of an input box to assign a tooltip. If I assign title the value "Agent does not exist", when hovering over the textbox the tooltip will only display "Agent" it's the same with all my tooltips (only the first word is displayed).
I'm having a bit of a problem and I was hoping someone could help me out. I'm trying to create an interface for manipulating historical stock prices obtained through finance.yahoo.com. I need to make a recordset contain the data of a CSV file that Yahoo returns, but the catch is that I want to pass the data along by pointing the recordset to the URL of the CSV files on the Yahoo server.
Yahoo creates its CSV files dynamically through the querystring of its URL (see below), and I would use inputs to my interface to manipulate the URL for specific ticker symbols, dates, etc. I guess the simplest example is that a user could input a ticker to my interface, the recordset would somehow "call" the URL for the correct data, and then that data would be in the recordset, where I could manipulate it, before returning the information back to the user.
I'm just stumped on how to get the CSV data into the recordset on the fly, just by calling the URL.
The following link is an example of what Yahoo does. Manipulating the querystring changes the ticker, date range, and level of detail. You can also change the table.csv to table.txt and return the actual data in one big text file. Code:
Before there was XML my world was in order, I would once a year write some small ASP script, it would perhaps take me all weekend, but it was doable, now the devil has entered my life, in form of an XML file ... Code:
I am trying to update an integer field in an Access database with a null value (ie, make the field empty). It currently has an integer in it. Here's the code I've tried, which normally works for all other updates: