How to figure out which option is chosen from a select field
Does anyone know how to retrieve the option chosen from a drop-down select box? I'm using document.getElementById("mySelect").value and it doesn't seem to be working... ...
Does anyone know how to retrieve the option chosen from a drop-down select box? I'm using document.getElementById("mySelect").value and it doesn't seem to be working... ...
so i've been working on a website now for like a couple months and i test it on chrome mainly. but before i release anything big i always check it on firefox 3.something and IE7. Now i've received some complaints that that it doesn't look very good in IE6 and when i do check it... well ya it doesn't look like its supposed to. Is there an...
What I need help with: My page shall take user input text, then show what was entered on the page (no alert) and open a new window on click if a match is found that would be stored in an array or var. Here is the line I am having trouble with below: onclick="insert(this.form.name.value),show();"/> Here is the code thus far: ...
I am currently playing around with the FCKEditor, and I am trying to replicate how stack overflow shows exactly how your post will look in HTML as you type it up. My FCKEditor creates just fine, I just don't know how to go about accessing the editor data once it is created. What I want to do is get the html from the editor and then put...
$('.Schedule .Full input').each(function(i) { var controls = $('.Morning input, .MorningPart input, .Afternoon input, .AfternoonPart input', $(this).parents('.Schedule')); alert(controls.length + " Conflicting Controls\n"+ $(this).parents('.Schedule').attr('id') + " Parent"); }); When I run this code in ...
Attacklab.wmd_env.buttons=Attacklab.wmd_env.buttons||_4; what does the || do in this case? Adds _4 to the array which is Attacklab.wmd_env.buttons? ...
I just found out about ie7-js ; IE7 is a JavaScript library to make Microsoft Internet Explorer behave like a standards-compliant browser. It fixes many HTML and CSS issues and makes transparent PNG work correctly under IE5 and IE6. http://code.google.com/p/ie7-js/ It looks like it's really good, but is it really working...
How to get "GET" variables from request in JavaScript? Does jQuery ou YUI! has this feature built-in? ...
I have to make a delete button for a simple intranet forum. I would like to have a javascript alert box (or equivalent) asking for confirmation when deleting posts. However, I've found it difficult to get the result of the javascript confirmation box to feed into the code-behind. Is this even possible? Or do I have to use another sor...
I have a template that gets screenscraped from an outside vendor and need to include absolute paths in the navigation so the externally hosted content will properly link back to our site. Right now the page/template is driven by a global menu app written by our back end development staff... so anyone who updates our site goes in and cha...
Hi I am having some trouble with this regex: <img(.+)src="_image/([0-9]*)/(.+)/> Global and case insensitive flags is on. The problem is that it also grabs Image n (see string below), but I want it only to match the image tags in the string. <p>Image 1:<img width="199" src="_image/12/label" alt=""/> Image 2: <img width="199" src="...
Hello! I need to implement a certain kind of string truncation where a string splits in the middle and its left part becomes resizable. Here is what it might look like: "Lorem ipsum dolor sit amet. Ut ornare dignissim ligula sed commodo." becomes "Lorem ipsum dolor sit amet ... commodo." I am open to solutions using pure CSS or with...
My page should make notification sounds only when the window is in the background. I can track the window.onfocus and window.onblur events to notice when the focus state changes. However, I don't know whether the window will load focused or not, since it might load in a background tab, for instance. How do I decide whether to play sou...
I write line of business applications. I'd like to build a front-end end using Javascript and am trying to figure out how to deal with, for a business user, are floating point errors (I understand from a computer science perspective they might not be considered errors). I've read plenty on this and seen all kinds of rounding hacks that...
Hello, I have two variables containing some html code, and another variable containing code for a html form. I am trying to expand a string within the second to pass it as a parameter to a function, however this causes some errors. My make popup function is very simple: function popup(htmlcode){ child1 = window.open ("about:blank"); c...
The file should be uploaded in the background via Ajax or Iframes. I should be able to detect via javascript when the upload has completed, so I can hide the loading graphic and redirect the user to a new URL. Using Jquery is fine. ...
I have a project that pops up a window with a message for the user. It is displayed for 10 seconds and then is sent to the background using the javascript "self.blur()" command. I dont want to close it as it has information that the user might need to see agian. This currently works for IE7/IE8/FF2/FF3 on windows XP, but on Vista it doe...
Hello StackOverflow! First of all, I've been researching this "Operation Aborted" error / bug for what seems like weeks, so here are a couple related questions and good articles if you are not familiar with it: Why does ASP.NET cause the “Operation Aborted” Error in IE7? (so question) Detecting cause of IE’s Operation Aborted Issue (so...
Please look at the code at the end to see the method I've been using to wire up events in my jQuery code. I prefer using bind and as you can also see I don't like using Anonymous functions in my event handlers. I'm using named functions because of the following two reasons: Readability Multiple calls to my WireUpGlobalCommandClickEve...
<a onclick ="foo()" href="bar.html" >Link </a> <script> ... function foo(){ //I want to know the href property of whoever called me. //something like this.caller.href ?? } </script> I guess I could just assign all element IDs and then pass my own ID to the JS method I'm calling, but I was looking for a better way. ...