Is there a way to detect when a page has been loaded in a modal dialog? Such as when you call window.showModalDialog().
A little background: I'm trying to get around the Forms Authentication problem of the login page appearing in the modal dialog, and the subsequently the rest of the site when the user logs in.
Any ideas?
...
I am trying to learn JS. It seems simple but I am not sure how to do this.
having this javascript object based on this good
thread
var people = {
1: { name: 'Joe' },
2: { name: 'Sam' },
3: { name: 'Eve' }
};
How do I add the following value 4: { name: 'John' }
To get name Eve I write
people["1"].name
...
I wanted to give my users a little piece of JavaScript or HTML code that they could put on their site and show information about them. Kind of like StackOverFlows new feature Flair.
I have an idea of how to code it. I was going to give them some JS with a HTML that had a DIV id="MySite_Info". Then the JS would go to my site and pull som...
I've been struggling with this and can't find a single tutorial on what seems to be a very simple idea.
I've written to the settings in the settings.html file using:
System.Gadget.Settings.writeString("Date1", month + "-" + day + "-" + year);
And that seems to have worked. It displays properly in the settings.
Now, in the main file,...
I'm looking for a javascript library (could be based on jQuery) that will implement a client side Form Editor.
The perfect example is something like offered by http://wufoo.com/
You should play with their free version to get the feeling of what I'm trying to find.
Also see this example someone made with jQuery. it is very basic, but a ...
Simple question... How am I going to reproduce Javascript bugs if I don't have a Mac & Safari?
Is it possible to run a legit copy of Mac OS on VMWare, or even better...run Safari in Windows?
...
I would like to do the following in an ASP.NET page, for both Internet Explorer and Firefox:
Display an uploaded HTML document in a window.
Allow the user to highlight an arbitrary section with the standard text cursor, and press a "leave comment here" button.
Save the exact start and end points of the highlight -- not just the highli...
I am building an object/property dump using JavaScript. This code breaks under Internet Explorer 8 (assuming subject = window.external)
// Gather the property names into the keys array.
var keys = Array(); for( var i in subject ){ keys.push(i); }
/* After this I sort the keys, then loop through to get the
property values in subject...
Hello all. I'm wondering if someone could look over my code. I'm trying to pass a dummy variable from javascript to actionscript 3 with the following code:
HTML:
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
id="music_player" width="500" height="375"
codebase="http://download.macromedia.com/pub/shock...
I've built jQuery function that takes a text string and a width as inputs, then shrinks that piece of text until it's no larger than the width, like so:
function constrain(text, ideal_width){
var temp = $('.temp_item');
temp.html(text);
var item_width = temp.width();
var ideal = parseInt(ideal_width);
var smaller_text = text;
var ...
I was looking at an answer to an SO question today where the variable names are ua, rv, etc. And I thought, "Man, when will people learn to use full-size variable names, memory is not a problem any more" but then, it is Javascript so it has to come across the wire and perhaps long variable names even slow down interpretation.
Is using ...
I have about 20 check boxes. When the user selects these and then uses an alternate submit button, I need to change the name of the name/value pair, for the selected inputs.
Why does this function only change the name of every other selected input?
function sub_d()
{
for (i = 0; i < document.checks.OGname.length; i++) //for all ...
In the wikipedia entry Unobtrusive JavaScript there is an example of obtrusive JavaScript:
<input type="text" name="date" onchange="validateDate(this);" />
The solution is the following:
<input type="text" name="date" />
window.onload = function(){ //Wait for the page to load.
var inputs = document.getElementsByTagName('input');...
I've traditionally used JavaScript as "UI Glue", and have (regrettably) been one of those that looked at JS as a "toy". However, I've changed course and am finding some real power in its use - especially coupled with JSON/jQuery.
My question involves dynamically creating elements, then appending them to the DOM. It seems that when thi...
I am attempting to edit sections of a site inline with jQuery, everything is working fine so far, expect that some of the editable items are links. When attempting to edit the fields, it's clicking through on the href.
here is the jQuery:
$(".button-edit").click(function(){
$(".edit").each(function() {
$(this).html('<input t...
Hi All,
I have a page that does the following:
The browser loads a very simple page with a valid head and body, with only a script/noscript pair as content.
In the body, it has a script (script a) that runs a function onLoad. This function dynamically includes a second script (script b), and runs a function in it when it becomes avai...
How can i concatenate var names to declare new vars in javascript?:
var foo = 'var';
var bar = 'Name';
How can i declare variable varName?
...
I'm using text boxes to let users change the quantity in a ecommerce website, e.g., http://nordschleife.metaforix.net/118/118/index.php/sony.html
There are two problems that I hope to solve:
On the catalog view (such as the one from the previous URL), the up and down arrows only work for the 1st text box. All subsequent entries don't ...
I have an HTML list that can be sorted (using jQuery's sortable API). I am storing the list items inside a database; each row stores the item's order, and text. How can I store the order of the list items so I do not need to update multiple rows when an item's order changes? List items can be added and removed.
Here's an example of what...
Possible Duplicate:
Elements order - for (... in ...) loop in javascript
Assume you have code like this:
var a = {}
a.a = 1;
a.c = 2;
a.b = 3;
for (var i in a) {
console.log(a[i]);
}
Are 1, 2, and 3 guaranteed to be printed in that order? I've tested and this has been the case so far, but I don't know if it'll always be ...