I'm using cookies to maintain a shopping cart. I can find plenty of tutorials and articles on deleting a cookie, but only deleteing a single key within a cookie is harder to find...
Surely there is a more efficient way to remove a cart item from my cookie than setting it equal to "", isn't there?
I mean, technically the cookie will still hold the text cartitem1 = "", right? Which takes up unnecessary space...
If I have a cookie with 'key/value' pairs, how would I delete a specific 'key/value' pair while preserving the remaining pairs? I tried to do something like:
cookie(key)=""
but it didn't seem to work. I do not want to expire the cookie, just to delete the specified key. I'm working in javascript.
I am designing Admin pages for my web site.I am using HTML frames, VBscript, Javascript, ASP , Microsoft Access as database etc.
I want when any Administrator put focus on any perticular frame and press some shortcut keys (like CTRL+A) then in the same frame one link called 'Admin' should be visible and active which then drive Administrator in Admin area to make necessary changes.For the rest user this Admin section would not be visible at all.
I would like to implement user authentication and session management for my applications. I've been using solution 1 (below) for most of my applications in the past since the target audience is mostly intranet based.
Now that I'm creating a more global application, I want to use a method that does not require cookies, yet maintain a farily high level of security and fault tolerance.
Is there a better way to handle this problem? What method does the big Internet shopping companies use?
Scenario:
A user is authenticated and is given a session key. The session key is passed to the user in an HTML page and returned to the server using a query string. The user then copies the URL and gives it to his friend to see. Since the URL now contains the session key, how does the server distinguish between the authenticated user and his friend?
Solution 1:
Use an ASP session variable to store the session key between page requests. This solution requires that the client have session cookies enabled. If the session is not encrypted (i.e. SSL), the ASP session id is still passed via. clear text, and is vulnerable.
Solution 2:
Use a session key that identifies the location (IP address) of the user. If the submitted session key doesn't match the user's location, then the session key is invalid. The session key can be passed as part of the URL and does not require cookies. This method is vulnerable to IP spoofing, and breaks if the user is behind a NAT server, or web caching server that masks the true IP address.
Solution 3:
Have the session key returned to the server via an HTTP POST request. This method does not require cookies, but is clear text and vulnerable if the session is not encrypted. The session key is lost if the user navigates to a page manually issuing an HTTP GET request.
I want to do something that should be simple, it is in php, but i can't seem to find any array functions in asp to do this. I have an array with x number of items (the x may change, could be 10/50/etc.) that will start with 1 and end with x.
For example (excuse my poor syntax): myArray[0] = 1 myArray[1] = 2 myArray[2] = 3 myArray[3] = 4 etc.
What I want is to call a function and randomize the array as a new array, so for example: randArray[0] = 3 randArray[1] = 1 randArray[2] = 4 randArray[3] = 2
Is it possible to get a key from the registry if a remote machine?We have three print servers (tin) serving an ERP application for different areas of the business.Currently someone has to logon and check to see if the servers are still running each morning.
However while they are running they increment a key in the registry once every second each time they poll. If I can get ASP to read this value, I should be able to setup a webpage to monitor the situation.I've found RegObj.dll on the Microsoft site, but this doesn't seem to work in ASP.
creating a script that will create a primary key base on the date today and a number ( ex. 1124204-1, 112404-2) with the last number increasing by one. the script should automatically increase the number if the key has already been used.
When I set a cookie in global.asa in the sub session_onstart, even if I have "privacy" in IE 6.X set to "block all cookies" the cookie is still set, and I can get it on other pages.
I can't find an article that addresses this as a specific issue. Why does the browser get the cookie when it is set in the session_onstart event even when I have "block all cookies" set?
I'm trying to insert into a table with foreign keys. The statement works in query analyzer but not when I do it in asp to insert the data from a form. Code:
I have disabled the function keys (F1-F12). I would like each funtion key to submit a form. I'm not quite sure how to tell each function key to submit (post) for me.
Microsoft OLE DB Provider for ODBC Drivers (0x80040E14) [Sybase][ODBC Driver]Integrity constraint violation: no primary key value for foreign key 'MemberCode' in table 'PersonMember' /admin/Member_New-Sybase.asp, line 39
What i am doing is first i have added a record to my persons table the next step is i need to add this person id to the PersonMember table with a new MemberCode and then finally add more information to a membership table. Code:
if it is 50. i want to remove the (dot) at the end. can someone tell me how to use the instr function to see if there is a dot at end and if it is there then remove it.
i have problem in removing the gap between two images, pls see the attached image. coz my item name is quite long, i dun wnat it display in horizontal, i want it display as vertical. so i create the images for the character and use ascii to recognized it.
my code is as below:
<td align="left" class="BorderLeft" width="1%"> <%dim word, pic, word1 word = "AAAAABABABBA" pic = "" for i = 0 to len(word)-1 word1 = cstr(right(left(word,len(word)-i),1)) pic = asc(word1) & ".gif"%> <img src="../images/<%=pic%>" border=1 vspace=0 hspace=0> <%next%>
The main idea goes like this: I have a textarea, on the right I have a listbox whose elements are loaded from an Oracle Database, I want to have an "Add" Button which when pushed will insert in the textarea the value selected on the listbox between "{ }" (ej, The {white} cat), you can add as many values as you wish and also manually edit the text, and a Submit button which open another ASP page that will check the sintax of the textarea and insert it on the Database. So far I already have the part which checks the sintax and inserts it on the db, and the listbox with the elements you can insert on the textarea, but my boss really wants the "Add-Remove" feature and I need to finish this for Tuesday
I have image icons that are clickable. I want to remove the hyperlink from around the image. I tried the STYLE="TEXT-DECORATION: NONE" tag but thats not working. How should I remove the underline from the hypelink. Code:
I am wanting to create a large dynamic web site with an accessible Text Only version.Instead of creating additional pages for the text only version, is it possible to implement some regular expressions, which remove all the IMG tags from page.
I have found a useful tool at http://tantek.com/favelets/ which removes the CSS from the page but I also need to remove the images.Are regular expressions the best means of doing this?
arrColour = split("blue,blue,green,red,purple,blue,green,yellow",",") What I need to be able to do is to remove all items of the value "blue" from the array. I can just run a dictionary function to delete all duplicate values, because some of them need to be retained. I just need to delete all of them of a particular value. how this can be done?
I have a basket which people add stuff to that they want to buy. i want a code that allows them to delete the item too. how the basket works is. thy choose a item from stock page and then it adds to a basket table.
I have declared a multidimensional array as follows. dim parray(100,5). Now this array contains some duplicate values. So how to remove duplicate values in this multidimensional array.
I have a page which takes data in an HTML table, and exports it to an Excel file. It works fine, but I want several things about the spreadsheet to look different from the HTML version. Things like fonts and colors. I think I can use a style sheet for the latter, but I haven't figured out how to remove hyperlinks from some of the items. On the HTML page, the hyperlinks are useful, but I don't want the spreadsheet to have them.
So on my ASP page which builds the Excel file, I have this: ...