Hi,
I'm trying to turn a <label/> and <input type="radio"/> into a single button that when clicked, adds that specific product to a shopping cart. This example deals with 1 product, with potentially multiple variants, (ie. The Product would be "Denim Jeans", the Variants would be sizes, "26", "27", "28").
The HTML would look something...
I'm a newbie to RegEx, and this particular issue is flummoxing me. This is for use with a JavaScript function.
I need to validate an input so that it matches only this criteria:
Letters A-Z (upper and lowercase)
Numbers 0-9
The following additional characters: space, period (.), comma (,), plus (+), and dash (-)
I can write a patter...
I'm writing a small application framework which other programmers will use. So I'm looking to do some reading on framework design issues. I'm not completely new to framework design, but it's always a bit of a challenge.
Although I'm looking for general design principles, this particular framework is for Javascript applications, so it wi...
I'm a full time Java developer of around 4 years, professionally. I'm a GWT fanatic. I love Java. Here's the problem: In my free time I often fall victim to the verbosity of my favorite tools for doing "heavy" development. I also often fall into the trap of obsessively engineering my software. I'll end up with the most beautiful un...
Using the example below, is it possible to send the result of the callback function to the console, i.e. the value being returned?
rows.sort(function(a, b) {
if(a.sortKey < b.sortKey) return -sortDirection;
if(a.sortKey > b.sortKey) return sortDirection;
return 0;
});
What would I use as the argument: console.log(?)
...
ASP.NET AJAX 4 recently added the ability to track changes to ADO.NET Data Services objects on the client side. That got me wondering what other change tracking JavaScript libraries exist. Has anyone seen any, or are you using any?
EDIT: Just to clarify what I mean by "change tracking": the new version of ASP.NET AJAX allows you to re...
I have a problem making a request to a server
My simple code is:
<html>
<head>
<script type="text/javascript" src="/Users/t/Desktop/App/etc.../jquery-1.3.2.min.js"></script>
<script type="text/javascript" src="/Users/t/Desktop/App/etc.../json_parse.js"></script>
<script type="text/javascript">
$.getJSON("http://127.0.0.1:8000/search/"...
For instance if I select a radio button through jQuery code does this fire the onClick event for that particular input?
...
I have a text field that is disabled based on who the user is. When the page submits, the value of the text field is supposed to be inserted into a SQL table, but SQL seems to see the value as empty because the text field is disabled. Can anyone tell me a way to get this value into SQL, i.e. for SQL to actually see the value? Below is ...
Hi,
I have a aspx page that is inside a frame. I want to redirect to a new page but before that page loads, break out of the frame. I was using this js code
window.onload = TimeOutRedirect;
function TimeOutRedirect()
{
try
{
if (self.parent.frames.length != 0)
self.parent.location=document.location;
}
catch (E...
Hello all,
I have a form and I wish to get the value of a radio button but it always gives me the same value ("floating") even though I select a different radio button and I run this function?!
HTML:
<input type="radio" id="license_floating" name="license" value="floating" class="realtime" />
<input type="radio" id="license_fixed" nam...
I'm writing an Http Request without the use of a library (another script was having conflits...)
But Im having trouble with the scope of my object. Below is the calling script, then the Ajax_Request object follows.
function loadCard(e) {
var element = e.target;
if($('overlay')) {
return false; //something is already over the layout
}
...
i have this code for a dropdown
if (chosen == "Parade") {
selbox.options[selbox.options.length] = new Option("Select Venue","");
selbox.options[selbox.options.length] = new Option("Benavides Park","Benavides Park");
selbox.options[selbox.options.length] = new Option("CME Auditorium","CME Auditorium");
selbox.options[selbox.optio...
Update: If you look at the javascript code that I pasted in the update below, I have single quotes around the variety.name variable. I think I was just following a tutorial in doing that. Turns out that when I switch those to double quotes, everything works fine. Question: Is this a stable solution? Or would it still be better to imp...
What are the pros and cons of each type/approach in writing Object Oriented scripts?
Personally, I have found closures (functional? approach) as a way to encapsulate state more natural and perhaps more elegant. I, however, have heard that this use of closures is slower in JavaScript implementations.
I would at least like to know where ...
I'd like to make a very simple jquery box come up saying "Sorry, that blog post could not be found."
I don't want anything very advanced... How should I go about this?
...
In a web application I've inherited at work which was written about 10 years ago I've noticed the following code snippets repeatedly used:
<script language="JavaScript" for="FG1" event="Mousedown(Button, Shift, x, y)">
{
// some code here that uses the variables Button, Shift, x and y
}
</script>
I've never really seen anything lik...
I have a class called listaDoble, in a Javascript document.
And I have another HTML document with a text field and 4 buttons: Next, Back, New.
When I press the New button I put, onmouseclick="lista= newListaDoble();", but then I lose the reference to the object. Some help?
...
I have a native (windows) application that has an embedded web browser. Currently I'm invoking a javascript function from the backend (c++/c#). However, if javascript is disabled this fails and I'd like to provide a fallback mechanism. Is there a way to determine if javascript is disabled?
...
Hi, when the "preview" link is clicked it is meant to change the video script and video swf using the innerHTML method, however in IE 7+ the flash seems to appear but never loads the video i.e. it just stays white.
<script>
function changeVideo(filename,script) {document.getElementById('video').innerHTML =
'<object classid="clsid:D27CDB...