Accessing Vars In A Javascript

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


ADVERTISEMENT

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

Url Vars

it's that time again. Time to learn a new language, and I picked ASP. I've got this:

<asp:HyperLinkField DataTextField="BeenPaid" DataNavigateUrlFields="BeenPaid,BillName" HeaderText="BeenPaid" DataNavigateUrlFormatString="Default2.aspx?BeenPaid={0}&BillName={1}" ItemStyle-HorizontalAlign="Center" />

It works fine, it makes links of the stuff that is pulled outa the database. An example url it made is:

Default2.aspx?BeenPaid=False&BillName=Verizon

how do I get those vars out of the url in the Default2.aspx page. In php it was $_GET["BeenPaid"]

View Replies View Related

Application Vars

I have an application that uses SQL extensively. However some of what it
uses SQL for (the results) are fairly static and change in the database very
rarely. Would it be more efficient to store this information in application
variables rather than doing SQL queries each time? Its a pretty heavily
utilized application. Would application variables be able to handle the
traffic?

View Replies View Related

Session Vars

Is possible to terminate all session variable created
without closing the browser
I do not want users to click on BACK button on browser or paste the url link
in the http:// and shows the record displayed after logout. This works fine
if users close the Browser.

View Replies View Related

Session Vars

I'm sure we've all heard the warnings about using cookies instead of session variables to store all of that user data so that our servers don't get bogged down. I'm just wondering how serious is this. I mean, is it just a suggestion or do these variables really take up a large amount of memory per visitor?

"Why would it matter? Just use cookies!" might be your response. Well, say I'm creating a user backend to edit a news section for a company. Now, I realize that the company newsletter is not mission critical information, but my novice-programming gut will not let me sit at ease if I store usernames and passwords in cookie data. What's to prevent someone else from looking at that local machine and fake my cookies, or even directly login with the information contained there-in?

For a recent backend along these lines, I stored a custom class in a session variable (all of you hardcore ASP guys can take a deep breath and stop twitching ). The class basically contained a copy of that user's database record (a user id, the username, the password, the e-mail address, and a few different permission variables).

I did this for two reasons:

1) I filtered all of my content through default.asp (meaning that each url looked something like default.asp?p=events where p was the real page request). Doing this allowed me to simply check the user's credentials in the default.asp script and then server.transfer them to the real page contained in the p querystring variable. I used the session-stored class after the first login (so I didn't have to hit the DB with each page request but could still make sure they had access to the site).

2) I knew before-hand that this system was only going to be used by 10-15 people max, and only 1 or 2 would be logged on at a time, let alone most of the idle time when no one was logged in (basically, it was a very low-load system so I didn't mind being unconventional). Code:

View Replies View Related

Using Cookies & Session Vars In Asp

I'm involved in quite a large project which has a slightly unusual
form of login (at least I think it's unusual!). I'm creating a site in
ASP (actually Chilisoft ASP) where access to all pages has to be
secured via login. The odd bit is that while the login page will be on
this site, the login process itself will be carried out on a
completely separate domain - this is the client's requirement so I
have no choice.

On login, the user will be assigned a 24 hour cookie by this 2nd
domain and then be passed back to the site I'm involved with. My site
then needs to assign a similar cookie (I'm assming that I won't be
able to read the other domain's cookie) and allow access to the site
for 24 hours.

I'm wondering if it's most efficient to assign a session variable to
indicate the user is logged in once my cookie has been generated
(rather than have every page check for a cookie again) and on
subsequent sessions during the 24 hour period to 1st check for session
var, then the cookie and then, if cookie exists, to assign the session
variable again.

View Replies View Related

Resetting Session Vars

is there a quick way to reset all the used session variables onb a server in one hit rather than using Code:

session("xx")=""

for each one.

View Replies View Related

Server.Execute With Vars...

I'm trying to get a page included into another page, and so far I've been using Server.execute("home.asp") without any problems ['home.asp' is just an example], but now I' m trying to get this to work:

server.execute("home.asp?foo=bar")

but to no avail. Code:

View Replies View Related

Error Passing Vars To Mdb

I have a prob passing some vars from an .swf to an .mdb using a n .asp file. When I use the getURL command instead of loadVariablesnum, I am getting this error:

"Error Type:
Microsoft OLE DB Provider for ODBC Drivers (0x80040E14)
[Microsoft][ODBC Microsoft Access Driver] Number of query values and destination fields are not the same.
/processForm.asp, line 112"

I have counted the query values and destination fields a hundred times, but they are both exactly 100.

View Replies View Related

Getting Vars Form Querystring

how do I get the xmlsource? in php its just this line of code: include($_GET['xmlsource']);

View Replies View Related

Session Vars Collection Inside COM

I was wondering if there was a way to pass the entire collection of ASP
Session variables into a COM function.

Inside COM, I need to have something like

Public Function ProcessVars(ByRef Session as <SomeSessionVarType>)
End Function

Which reference do I need to include in my VB6 project?

View Replies View Related

Vars Passing From One Page Losing There Value?

I guess this is a continuation of my erlier problem which I thought I had solved.
I have several inputs being passed from one page where they are inputed in, to a preview page so the user can chek there info, then it will be passed to a page to submit the info to a data base.

I have a input that is the item description var name of �prodesc�. It pass from the input page to the preview page just fine. Then I use the same method to pass it to the next page to save it to a data base, but when it gets to the submit page the var �prodesc� only has the first word of the description that was shown on the previous page? Any one know why its acting like its been trimmed? Code:

View Replies View Related

Session Vars In ASP App Under IIS6 Not Sticking

Developed a basic ASP web site with MS Access 2k3 as a database
back end. I've developed it on two different Win2k3 servers, and app works
flawlessly on both.

However, we just moved it to a client's Win2k3 Server,
and it's not holding any session variables. It IS, however, holding
Application variables, but not session variables.

I checked all the usual
things (MS KB, ASPFAQ, etc), but none of them provided any solution. The
only difference I can find between the three servers is that one has the
Enhanced IE Security whosiwhatsis loaded, whereas mine don't.

View Replies View Related

Checking POST Vars For SQL INJECTION

I am working on an ecommerce app and want to be able to take my entire POST results as one item (or iterate through them) and check for any malicious SQL INJECTION items. After checking/escaping them i want to save them back into the post results. The reason for this is because I have coded the entire app and just learned about the dangers of SQL Injection and rather than going through every post var and fix it I would rather run a function at the beginning of each page.

View Replies View Related

Write All Defined Vars And Their Values To Page?

for debugging purposes, I am wondering if it is possible to have an ASP script that:

-creates a tabel with two columns
-writes a var name in the first column
-writes its value in the second column

is this possible? Right now, I have manually created this tabel for myself, but everytime a new var is defined, I have to update my 'debug' table. Can this be automated?

View Replies View Related

Easiest Way To Save Form Vars For Later Download

a customer already has a website with ASP pages to request a call from a salesman... and it emails HQ with about 20 form values and also emails the customer.

what we'd like to do in a simple way is store those 20 fields somewhere they can be downloaded as well, instead of messing with the emails. but i don't want to mess with any rdbms (cause we don't have access to the server--- long story) so i'm wondering if some simple commands can just write the data to a physical file somewhere in webroot so it can be downloaded at a later time.

View Replies View Related

Accessing FTP From ASP

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

Accessing

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

Accessing A Value

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

ASP Accessing SQL

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

Accessing Data

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

Accessing Raw HTML

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

Accessing Database In ASP

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

Accessing Relationships

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

Accessing ATL Web Service From ASP

Could someone have got samples on how to use ATL web services from an ASP page?.

View Replies View Related

Accessing ASP.Net Web App With Non-IE Browser

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

Accessing Variables

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

Accessing LDAP With ASP

I am trying to access ldap with standard ASP. The code works on the web server where I am developing but any other PC on network gets the following error:

Providererror '80040e37'

Table does not exist. /training/index.asp, line 41

Does anyone have any experience with this??

View Replies View Related

ASP Accessing Databases

Can ASP Apps read from a mySQL database?

View Replies View Related

Accessing My Database

Accessing my databases in Microsoft Access. I have my page called connOpen.asp and I have my page of code and of course my database which I called phone.mdb. This is my code

for connOpen.asp
<%
strConnect="Provider=Microsoft.Jet.OLEDB.4.0; DataSource=C:Mydatabasesphone.mdb;"
%>

Also I do have my include statement at the top of my code page.

<!--#include file="connOpen.asp"-->

When I click my submit button it just takes me to a blank white page.

View Replies View Related

Error Accessing

I am getting a Error accessing the OLE registry when the system goeshit the following line

set xWd = Server.CreateObject("Word.Application")
in my asp?

Anything I have to set-up in order to remove this error Please advice the steps that I should take.

View Replies View Related

Accessing Email

Is it possible to create a page that will check a POP3 mail box,download any emails (leaving the old mail on the server) thenentering that infomation in to a database.
All this based on the Subject and the email being in a particular format.

View Replies View Related







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