I am having two scripts; A.asp and B.asp.
in page A.asp it has a link that pops up window B.asp.
my question is: when page B.asp pops up, i want it to show me where it came from.
here's the script in page A.asp
Response.Write("<a href=""B.asp?ID="&conn("id")&""" onClick= ""return popupwin(this,'b')"">Printable version</a>")
i know ServerVariables(HTTP_referer) works but it doesn't work with popup windows.
any ideas?
<a href="javascript: Search(<%=chr(65)%>)"><%Response.write(chr(65))%></a> <% For i = 66 to 90 %> <a href="javascript: Search(<%=chr(i)%>)"><%Response.write(chr(i))%></a> <% Next %>
This returns a list of letters The problem is when I pass them to the function I get a not defined error. I have to convert them somehow so the javascript then can use them.
I am using ASP to open a text file on the server and I want to pass variables to Javascript. Any suggestions?
For example - I have a text file on the server defining a set of pictures. I open the text file to retrieve the list of files. I want to pass the list of files to the Javascript which will then display the data on the client machine.
I have a web site completely developed with .html pages.
My affiliate and ecommerce system are written in asp, as is the only registration page (register.asp).
If an affiliate sends a visitors to our registration page and the user decides to browse the site before registering we lose track of the affiliate id variable..
..Is there a way to pass a (one) variable between the html pages as the visitor browses the html based site and then have it passed to the registration page (register.asp)?
Also is there a method to set a cookie that retains this variable, and have it set to a one week expiration so that when the visitor returns to the site the most recently refering affiliate gets credit.
If passing of the variable is possible with javascript, can the javascript automatically check for the existence of the aforementioned cookie?
I have a wierd problem. I have a multi-dimensional array. When a user selects a certain item in a drop down box, I need to manipulate certain data in the page. So essentially to find the correct information in the array, I have to know the selectedIndex in my select statement. I error checked the javascript function using an alert, so it works. I just need to know how I can pass the selected index to the array, and then pass the array to the javascript "updatePreviewPane"
I know that is wrong, but how do i do it? I am using hidden for fields in other places
The reason I want to place this one in a session is that what the code is doing is creating a form for the user and if it creates a hidden field it creates it outside the form. so i therefore have to use a session variable. Is this possible?
Our ASP code uses an ADO connection string, which refers to a System DSN. The DSN is set to "Windows NT auth. using network login ID". The code connects to SQL Server and reads data OK. Anonymous browsing is enabled in IIS and uses the IUSR account. We have never added the IUSR account to SQL Server.
I ran SQL Profiler and saw that the ASP was connecting as the local Administrator (I was browsing locally). Is this "integrated" security at work? What would happen if I browsed from another machine?
Now the confusing part. I change the passwords for IUSR and IWAM (correctly for Win, IIS, and MTS). Now the ASP page gets a database access error! SQL Profiler shows it connecting as the IUSR account. Obviously there's no ref to the IUSR account in SQL Server so it fails. Why did it change from Administrator to IUSR? All I did was set the password.
I've created a procedure/query in an Access 2000 database using the following code: <% strAppend = "ProcName" strSQL = "Create Procedure [qry" & strAppend & "] AS Select * From Stories ORDER BY StoryID DESC;" cn.execute(strSQL) %>
I know I have successfully created the procedure/query, because when I run the code again, it gives me the following error: Microsoft JET Database Engine (0x80040E14) Object 'qryProcName' already exists. I look in the Access database and can't find qryProcName as a query, macro or any other object.How do I access it?
I have a website in asp that uses an Access 2000 DB. Everything works fine but now we need to have a secure server for transaction and the host that we have has a secure server which is seperate to where the rest of our pages are kept.Now they say that I have to put the database on the secure site but how do I then access the information from the other server?
I have all my recordset etc pointing to the database on the same server - how do I change the DNS so it uses the DB on the other server?
I'm having a customer submit an order. When they submit it, it posts to a page that processes the order and inserts into our database, while displaying a summary of their order. I have a javascript function that will cause a "confirm" box to show up if an order seems like it might be a duplicate. However, I can't seem to get the code to "wait" for the response from that box, which I guess makes some sense. Am I stuck with having an interim page or doing something with posts or is there an easy way to get the record to not insert until the user responds to the confirm box?
Im sure it exists but i am having some difficulty finding it. I need come code to take out any SPACES in a textbox when text is entered OR submitted. Example
i have a text box where people can enter there car registration.
To keep consistency thoughout my site, i want L736 VAF to be entered into the database as L736VAF.
so that when it is recalled via a search form, L736VAF wont be returned as "no record found" because some one has put a space init!
update some long commOn first page I display all the records from database (working well). Then first column has href which opens a popup (i am passing rownum from database to popup). I was hoping to run ASP code on load of the page so the comments which is already there for that row in the databse automatically comes in a textarea. And then you can edit and hit update. And this will update the database. Also I was thinking of using session variables for the rownum. But bcos I have href which opens a popup, I am not sure how i can set the session variable. I dont want to pass the "comments" itself to the next page bcos it can be really long comment and QueryString has some limitations.
I am making a dynmanic form that goes to a question depended on the answer. Is there a way that I can make it remember what the person selected (radio button) in the question so that I don't have to write something like,
"<input type = 'radio' name='Question3' value='Yes' checked <% if Question3 = "Yes" then response.write "SELECTED" end if%>>Yes<BR>" + ????
i have an asp page which shows a list of articles which are pulled from the database. I have a variable as below which defines number of records to show on each page
<%
numRows = 5 %>
Now i also have a drop down list from which you can choose 'display 5 records per page', display 10 records per page' and so on.What i want is when a new value is chosen from the list, the page refreshes and the ASP variable numRows is set to this new value.
I'd like to put some SQL values in my Javascript which is defined in de Head section If I put it in there like <%objrs=("field")%>, the script does not seem to run ?
I have a page that opens a javascript modal window and passes a variable. I then have that variable in Javascript. Is there anyway for me to get the value of that variable in asp. I am passing an id and want to check what the id is and open my recordset accordingly.
Is there a way that I can refresh a combo box using javascript after I select data from a another combo box? I can't seem to find the answer to this question. I'm guessing after I select the item in the first combo I could requery the database and display the correct informtion based off of it. I just don't know where to start. I've searched all over the internet.
Will JavaScript function in ASP? or are there specific functions in ASP which replace JavaScript?
I'm running JavaScript to compress down a menu and want to use an #include statement to port the menu to multiple pages. If I have to sacrifice the JavaScript I'd need a way to compress the menu in ASP.
basically I call a javascript refresh function, but I need to pass a url to it too to indicate what this should refresh to. The problem is the function I call, then calls another function and I need to pass the url info down, as it is this second function that needs it.
It seems to work from passing it from the link to the first function, but I think it must loose it passing it from the first function to the second.. Code:
I have searched for some examples, but to no real avail, for a JS function that displays a user Yes/No dialog box.
Basically, i have an ASP application that displays a SQL table on an ASP page.
I have created a "Remove" hyperlink (in a loop) by each record and i need to use an OnClick event so when the user clicks this hyperlink it displays this Yes/No dialog.
At the moment the hyperlink simply removes the relevant record.
I need an OnClick event that displays a Yes/No box that when the user clicks Yes - it goes to remove.asp, and when No is clicked it does nothing.
User Clicks Remove next to record > Yes/No dialog> Yes = remove.asp No = End. Code:
I'm putting together a site to allow someone to add content to a DB through a text area form, and then display it on the web. Pretty basic.
The problem I'm having is that they need to add snippets of javascript, but by the time its displayed on the page, there have been extra linebreaks added, breaking the javascript code.
Replace(string, vbCrLf,"") won't work because that removes all linebreaks. Is there a way to preserve the original linebreaks as submitted to the DB in the first place
i am trying to call a javascript function in asp code.But i need the return value of javascript function to use in asp code. how can i do this?
the name of the javascript function is get_textvalue() and it returns a text value. i have a variable which is named volume in asp code.actually the thing that i want is volume = get_textvalue() but in asp code how can i do this ?
The code JavaScript is not executed in the pages ASP in a server IIS 6.0 in Windows 2003 but if makes it in a IIS 5.1 in Windows XP, like I can configure it so that it is executed.
I have news heading to be posted on the website the main news would be shown in one line and when the user clicks on it the rest of the news will be shown in a pop up window or a small window below the news headline i dont want to use javascript the reason is if someone has disabled javascript they wont see the news so i am trying to do it with stylesheet or with ASP can someone give me an idea how to proceed with it.