• 0

setting a cookie on the client side


Question

I'm trying to get this to work in Internet Explorer, but so far no luck. Only seem to be able to get it to work in Mozilla for now. Here is a reference:

http://office.wendellhull.com/matdb/defaul...rade_name_id=35

The dropdown box next to "Unit" is what we are looking at. What should happen, is the user selects what unit they want, and on their side a cookie is set and the page is redrawn. The one that the user selects should still be selected. This works fine in Mozilla, but no luck in Internet Explorer. Any ideas? Does IE not like cookies to be set by the client side and read on the server side?

Here is my java script:

function SetCookie (name,value,expires,domain) {
var Str;
 Str=name + "= " + value + "; expires=" +  expires.toGMTString() + ";domain="+domain;
 document.cookie = Str;
}

function SetUnit (unittype, selSelectObject, theurl) {
	var expdate = new Date ();
  expdate.setTime (expdate.getTime() + (10 * 365 *   24 * 60 * 60 * 1000)); // 10 years from now
	SetCookie(unittype, selSelectObject.options[selSelectObject.selectedIndex].value, expdate, 'office.wendellhull.com');
	location.href = theurl;
}

I'm using ASP to try to read the cookie from the server side. Here is the code that draws the temperature unit drop down box:

Sub draw_temp_dropdown()
	Dim currentcookie
	currentcookie = request.cookies("temperature")
	Response.Write "<select name=""temp_dropdown"" onChange=""SetUnit('temperature', this, 'default.asp?" & set_querystring("none") & "')"">"
	Response.Write "<option"
	If currentcookie = "C" Then
  Response.Write " SELECTED"
	End If
	Response.Write ">C</option>"
	Response.Write "<option"
	If currentcookie = "F" Then
  Response.Write " SELECTED"
	End If
	Response.Write ">F</option>"
	Response.Write "<option"
	If currentcookie = "K" Then
  Response.Write " SELECTED"
	End If
	Response.Write ">K</option>"
	Response.Write "</select>"
End Sub

I'll probably have to rewrite to just do all server side cookie sets, but I'd rather not.

Thanks for any help!

-Nic

Link to comment
https://www.neowin.net/forum/topic/155637-setting-a-cookie-on-the-client-side/
Share on other sites

0 answers to this question

Recommended Posts

There have been no answers to this question yet

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Posts

    • I was gonna say something similar but decided there's no point anymore. Some people like nutrek for whatever reason,.let them have it and I'll just rewatch the originals and hopefully in a decade someone new will take over and do a retcon
    • Grab the 2025 MacBook Air with M4 and save 18 percent now by Paul Hill If you’re in the market for a modern MacBook Air, check out the Apple 2025 MacBook Air 15-inch with the M4 chip on Amazon. It packs 16GB of Unified Memory and features a 256GB SSD. It's now discounted by 18%. This brings the price down to $1,178 from its original $1,428, a saving of $250. The deal also includes AppleCare+ for three years, which will help to protect your laptop. If you’re interested in this deal, act fast because it’s only available for a limited time. Powering this MacBook Air is Apple’s latest M4 chip which brings big performance boosts for multitasking, video editing, and graphically demanding games. The laptop boasts excellent battery life with up to 18 hours between charges, making it an exceptional choice for users on the go. This MacBook Air features a 15.3-inch Liquid Retina display which boasts vibrant colors and sharp details and there is a 12MP Center Stage camera, a three-mic array, and six speakers with Spatial Audio for improved video calls and media consumption. As for connectivity, you get two Thunderbolt 4 ports, MagSafe charging, a headphone jack, Wi-Fi 6E, and Bluetooth 5.3, with support for up to two external displays. This deal includes AppleCare+ which extends the standard one-year warranty and 90 days of technical support to three years from the purchase date. This gives you access to unlimited repairs for accidental damage, such as screen cracks or liquid spills, with a service fee ($99 for screen/enclosure damage, $299 for other accidental damage). With AppleCare+, you get 24/7 priority access to Apple experts for technical support and get global repair coverage and convenient service options such as carry-in and mail-in. Covered by AppleCare+ is the MacBook, its battery if the capacity drops below 80%, included accessories, Apple memory, and the Apple USB SuperDrive. Apple 2025 MacBook Air 15-inch: $1,178 (Amazon US) / MSRP $1,428 This Amazon deal is US-specific and not available in other regions unless specified. If you don't like it or want to look at more options, check out the Amazon US deals page here. Get Prime (SNAP), Prime Video, Audible Plus or Kindle / Music Unlimited. Free for 30 days. As an Amazon Associate, we earn from qualifying purchases.
    • Our top 10 stories about Windows 10 from the past decade by Usama Jawad Windows 10 is approaching its 10th anniversary in a couple of days, and to celebrate this occasion, we have been publishing content that reminisces the decade that we have spent with the operating system. So far, we have talked about 10 features in Windows 10 that just never took off, as well as Windows 10 being the primary reason why we are so conscious about privacy now. Now, we are taking a look at our Windows 10 coverage from the past 10 years, highlighting the 10 stories that were read the most by our audience. Please note that this list is sorted in ascending order, which means that out of this collection of 10 stories, we will be moving from least views to most views. Also keep in mind that an additional criterion for the stories in this piece was that while they can contain information about other topics too, the core focus should be around Windows 10. Without further ado, let's begin! 10. Windows 10 May 2021 Update is live - here's what to expect This is a rather interesting piece due to the background surrounding it. While Microsoft only releases one feature update for Windows now, it used to roll out two back in the day; H1 and H2. The H1 update was typically a major update with lots of new features, while H2 was a relatively minor release that was mostly an enablement package to light up certain disabled capabilities. With the Windows 10 May 2021 Update, also know as Windows 10, version 21H1, Microsoft flipped the script a bit, and made this supposed feature update an enablement package too. At that time, this became the operating system's smallest feature update with only three enhancements revolving around Windows Hello, Windows Defender Application Guard, and Windows Management Instrumentation (WMI). Not particularly interesting. Still, a lot of you read this piece, those were exciting times as Microsoft was reportedly working on Windows 10X too. However, the company ended up canceling the OS within a month within a few weeks following the release of the Windows 10 May 2021 Update. 9. Clean installed Windows 10 22H2 vs Windows 11 23H2 benchmarked for performance Our readers are typically quite interested in performance benchmarks and while we regularly cover results from third-party testing in our news stream, we decided to conduct our own testing on this particular occasion. We essentially pitted the latest available versions of both Windows 10 and Windows 11 on "clean" systems. Our findings across various CPU and GPU benchmarking tools revealed that Windows 10 and Windows 11 are pretty close in terms of performance. While one sometimes tops the other in a particular category, the difference is very negligible. This conclusion was important for a couple of reasons. It emphasized that despite Microsoft's attempts to convince you otherwise, Windows 11 doesn't sport a major increase in performance. But more importantly, it also served as proof to our readers that Windows 11 isn't worse off in gaming either, so this shouldn't be a factor when you are considering upgrading. 8. Microsoft's app that promises Windows performance improvements has some shady stuff inside Over a year ago, Microsoft released a PC Manager app in the Microsoft Store as a means to optimize and boost the performance of your Windows 10 and Windows 11. However, an investigation from our readers revealed some rather shady stuff. For one, the Deep Cleaning option in the app was rather aggressive and would end up deleting the Windows Prefetch folder, which is something that even Microsoft doesn't recommend that you do. Secondly, the app contained affiliate links with trackers to some Chinese software websites that were offering utilities. It's rather odd that a first-party official Microsoft app wasn't polished on release, but it once again cemented the belief that "optimizers" aren't ideal. 7. Save your computer from Microsoft's Windows 10 end-of-life planned obsolescence Image via GMUNK This is one of our more recent pieces surrounding the upcoming end-of-support deadline for Windows 10. This editorial penned by our News Editor Paul Hill talks about the impact that this deadline will have on the environment as old PCs are eventually dumped in landfills. Although Paul does highlight the ways in which you can officially or unofficially extend support (ESU, 0patch, Flyby), he believes that the best option right now is to switch to a Linux distribution. Paul lays out several options including GNOME, KDE, Cinnamon, Mint, LXQt, Fedora SilverBlue, Lubuntu, and more. Despite Neowin being a Windows-focused website, this article received a lot of views and fairly positive feedback too. 6. Windows 10 version 20H2 is here - here's what you need to know Remember when I said earlier that the H1 package used to be a major feature update for Windows 10, while H2 was mostly an enablement package? Well, at that time, we were talking about Windows 10 21H1, which turned out to be a minor update with only three new features. This piece was about the preceding update, Windows 10 20H2, which should now give you some reference point of how small the next update was. This roundup piece covered all the new capabilities and enhancements present in the Windows 10 version 20H2 update, including Start menu improvements, theme-aware tiles, All Apps redesign, tablet mode upgrades, the new Chromium-based Edge, and more. At that time, we called this a minor update, because we didn't know that Microsoft would be ditching its established conventions and making Windows 10, version 21H1 even smaller. 5. Windows 10 reaches 70% market share as Windows 11 keeps declining Although Windows 11 is just about to overtake Windows 10 in terms of market share according to the latest reports, this wasn't always the case. In fact, just over a year ago in May 2024, Windows 10 stood strong at 70%, while Windows 11 was limping at 25%. However, with Windows 10's death approaching fast, Windows 11 has finally turned a corner and both operating systems now occupy roughly 48% each of the Windows market. Things can only improve from here. 4. Microsoft admits it can't fix Windows 10 KB5034441 "0x80070643 - ERROR_INSTALL_FAILURE" Windows 10 users are often greeted with error 0x80070643 when dealing with the Windows Recovery Environment (WinRE). Although it can be manually fixed by customers, Microsoft says that it is impossible to resolve it in an automated manner controlled by the company itself. This particular issue has been a major annoyance for Windows customers in the past couple of years and in recent months, Microsoft has been telling customers to just ignore it and is reiterating that it can't ever be truly fixed. You have to wonder what the complexity of the problem is for Microsoft to issue such statements, but at least it doesn't impact anything critical. 3. Microsoft finally lifts two-year old block preventing Windows 10 users from upgrading to 11 Although we recently wrote an article about Microsoft finally lifting a long-standing Windows 11, version 24H2 block, the news story we'll be discussing in this section is slightly older. This piece is from April 2024 when Microsoft finally resolved a two-year-old update block surrounding the Intel Smart Sound Technology Audio Controller driver (Intel SST). It was particularly annoying that a problematic driver version was what was blocking customers from upgrading to Windows 11, and even I can relate since it impacted my daily driver too. That said, it is important to note that this was an external block since the driver in question was manufactured by Intel. Fortunately, Microsoft was able to work with Intel to release driver updates which finally lifted this block. 2. Windows 10 version 1909 is coming - here's what you need to know As you may have observed, our roundup articles do quite well here on Neowin. This particular piece is about the features present in Windows 10 version 1909. This was a rather unfriendly naming scheme that Microsoft dropped later, but just to give you context, it refers to Windows 10, version 19H2, which makes it almost six years old! Since this is an H2 update, this was an enablement package too, with improvements in tow for notifications, lock screen, desktop environment, battery life, accessibility, and more. Even though Microsoft rolled out two feature updates at that time, it seems like the company really put effort into packing as many capabilities as it could into each release. 1. Windows 10 version 2004 is here - here's what you need to know about it The magnum opus of our Windows 10 coverage in the past decade is... another feature roundup! This time, it's about Windows 10, version 2004 (or 20H1), which is the version immediately succeeding the one that we just talked about previously. Since this was an H1 release, it was a massive, massive upgrade. Customers were treated to a new Cortana app, Windows Subsystem for Linux 2 (WSL 2), Notepad enhancements, Windows Search upgrades, Windows Sandbox and virtual desktop improvements, and just so much more. It's almost impossible to recap them all in a way that gives justice to all the capabilities in tow. No wonder our readers flocked to this article, making this our most-viewed Windows 10 story of the past 10 years. This story is a part of our "10 Years of Windows 10" collection, in celebration of the operating system's tenth anniversary, falling on July 29, 2025. Over the next few days and weeks, you'll be able to find more content on this topic in our dedicated section available here.
    • Also on the dedication wall Lt Nog's name was there      Mr. Kim actually got a promotion!
    • Shotcut 25.07 by Razvan Serea Shotcut is a free, open source, cross-platform video editor for Windows, Mac and Linux. Major features include support for a wide range of formats; no import required meaning native timeline editing; Blackmagic Design support for input and preview monitoring; and resolution support to 4k. Editing Features Trimming on source clip player or timeline with ripple option Append, insert, overwrite, lift, and ripple delete editing on the timeline 3-point editing Hide, mute, and lock track controls Multitrack timeline with thumbnails and waveforms Unlimited undo and redo for playlist edits including a history view Create, play, edit, save, load, encode, and stream MLT XML projects (with auto-save) Save and load trimmed clip as MLT XML file Load and play complex MLT XML file as a clip Drag-n-drop files from file manager Scrubbing and transport control Video Effects Video compositing across video tracks HTML5 (sans audio and video) as video source and filters 3-way (shadows, mids, highlights) color wheels for color correction and grading Eye dropper tool to pick neutral color for white balancing Deinterlacing Auto-rotate Fade in/out audio and fade video from and to black with easy-to-use fader controls on timeline Video wipe transitions: bar, barn door, box, clock (radial), diagonal, iris, matrix, and custom gradient image Track compositing/blending modes: Over, Add, Saturate, Multiply, Screen, Overlay, Darken, Dodge, Burn, Hard Light, Soft Light, Difference, Exclusion, HSL Hue, HSL Saturation, HSL Color, HSL Luminosity. Video Filters: Alpha Channel: Adjust, Alpha Channel: View, Blur, Brightness, Chroma Key: Advanced, Chroma Key: Simple, Contrast, Color Grading, Crop, Diffusion, Glow, Invert Colors, Key Spill: Advanced, Key Spill: Simple, Mirror, Old Film: Dust, Old Film: Grain, Old Film: Projector, Old Film: Scratches, Old Film: Technocolor, Opacity, Rotate, Rutt-Etra-Izer, Saturation, Sepia Tone, Sharpen, Size and Position, Stabilize, Text, Vignette, Wave, White Balance Speed effect for audio/video clips Hardware Support Blackmagic Design SDI and HDMI for input and preview monitoring Leap Motion for jog/shuttle control Webcam capture Audio capture to system audio card Capture (record) SDI, HDMI, webcam (V4L2), JACK audio, PulseAudio, IP stream, X11 screen, and Windows DirectShow devices Multi-core parallel image processing (when not using GPU and frame-dropping is disabled) DeckLink SDI keyer output OpenGL GPU-based image processing with 16-bit floating point linear per color component ShotCut 25.07 changelog: Added a Whisper.cpp (GGML) model downloader to the Speech to Text dialog. A model is no longer included in the download and installation reducing their sizes. Improved the System theme to follow the operating system palette on Windows (darker and more contrast), and improved its appearance on macOS dark mode. Added Settings > Theme > System Fusion that combines the operating system palette with the monochrome, symbolic icons of the Fusion themes. Added an Outline video filter that uses the input alpha channel--useful with rich text or assets with a transparent background. This means that, like Drop Shadow, it will not work as expected when used after a text filter on a video or image clip. Rather, you must use a text clip (transparent color generator with text filter) on an upper track. Other New Features Added the ability to drag the waveform peak line to adjust audio gain. Added Settings > Timeline > Adjust Clip Gain/Volume to turn off the above. Added rolling an edit/trim to Timeline: Hold Ctrl (command on macOS) while trimming to simultaneously trim the neighbor clip. Added a Soft Focus filter set. Added Audio/Video duration to the Slideshow Generator dialog, defaults to 4 hours. This facilitates using Slideshow Generator to make transitions between everything when including both video and images. (It still respects the source duration and in & out points; duration here is a maximum.) Surround Sound Mixing Improvements Added fader and surround balance to the Balance audio filter if channels > 2. Added Channels toggle buttons to many audio filters: Band Pass Compressor Delay Downmix Equalizer: 3-Band Equalizer: 15-Band Equalizer: Parametric Expander Gain/Volume High Pass Low Pass Limiter Mute Noise Gate Notch Added support for 4 channels in the Copy Channel audio filter. For example, now you can: Copy stereo music to the rear channels and use the fader in the Balance filter to reduce its volume, Downmix spoken word into the center channel and apply a Band Pass filter to it, and Route music or sound effects to the low-frequency channels and apply a Low Pass filter to it. Other Improvements Changed the default Export > Audio > Rate control to Average Bitrate for AAC, Opus, and MP3. Added the ability to add/use multiple Mask: Apply filters. Added support for Scrub While Dragging to trimming on the timeline. Added hold Shift to ripple-trim when Ripple is turned off. Added French (Canadian) and Lithuanian translations. Fixes Fixed Mask: Apply with multiple Mask: Simple Shape (broke in v25.05) Fixed exporting projects containing only Generator clips on Windows (broke in v25.05). Fixed converting 10-bit full to limited range (broke in v25.01). Fixed dropdown menus using Settings > Theme > System on Windows. Fixed Balance and Pan audio muted channels if audio channels > 2. Fixed Export > Use hardware encoder fails with H.264 on macOS 15. Fixed Properties > Convert or Reverse for iPhone 16 Pro videos with Ambisonic audio. Fixed a single frame fade out filter would either mute or make black. Fixed repairing a project (e.g. broken file links) with proxy turned on. Fixed doing Freeze Frame on the first frame of a clip. Download: ShotCut 25.07 | Portable | ARM64 ~200.0 MB (Open Source) View: Shotcut Home Page | Other Operating Systems | Screenshot Get alerted to all of our Software updates on Twitter at @NeowinSoftware
  • Recent Achievements

    • Week One Done
      Lokmat Rajasthan earned a badge
      Week One Done
    • One Month Later
      TheRingmaster earned a badge
      One Month Later
    • First Post
      smileyhead earned a badge
      First Post
    • One Month Later
      K V earned a badge
      One Month Later
    • Week One Done
      K V earned a badge
      Week One Done
  • Popular Contributors

    1. 1
      +primortal
      641
    2. 2
      ATLien_0
      243
    3. 3
      Xenon
      180
    4. 4
      neufuse
      155
    5. 5
      +FloatingFatMan
      126
  • Tell a friend

    Love Neowin? Tell a friend!