|
The file I'm trying to load is in the same folder as the script. Domains shouldn't be an issue (as far as I know).
".45 ACP - because shooting twice is just silly" - JSOP, 2010 ----- You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010 ----- "Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass." - Dale Earnhardt, 1997
|
|
|
|
|
|
Haven't tried it with chrome. I'm okay with using IE (v10) for now. Will check it against chrome later (maybe at home tonight), but FF is the only browser I've seen this mentioned for. I don't like Chrome, mostly I haven't sat down and tried to finger out how to make the search bar visible *all* of the time.
".45 ACP - because shooting twice is just silly" - JSOP, 2010 ----- You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010 ----- "Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass." - Dale Earnhardt, 1997
|
|
|
|
|
John Simmons / outlaw programmer wrote: I don't like Chrome
I kind of feel the same about IE.
I like Chrome for it's development tools which IMO are far superior to IE and much better than what you get with Firefox. I used to use Firefox/Firebug because it was better than what IE gave... go figure.
I am sure in the future my browser preference will change again.
as if the facebook, twitter and message boards weren't enough - blogged
|
|
|
|
|
Go back and try IE again - the dev tools have gotten better!
|
|
|
|
|
Jasmine2501 wrote: Go back and try IE again - the dev tools have gotten better!
I don't have a motivation just yet to leave Chrome. also since Node.js is built on top of V8 I am thinking that for now it makes sense to stay put.
at least until I begin to hate Chrome.
as if the facebook, twitter and message boards weren't enough - blogged
|
|
|
|
|
Yeah I'm just saying use both. Sometimes I can't figure something with Chrome tools and IE tools can let me find it out. Also, IE8 is the company standard, so I at least have to test with it. I feel ya though, I prefer Chrome too, so I ignored the IE tools for a long time - that wasn't wise.
|
|
|
|
|
I can usually stumble around with IE tools and get what I want. I will be happy when I no longer have to stumble around with IE8.
but it's probably like programming languages, the language you are "native" to will always be the one that you program the fastest in.
as if the facebook, twitter and message boards weren't enough - blogged
|
|
|
|
|
You can not catch anonymous functions like that in the debugger. If you want to step through it, you need to extract it into a named function.
function ReadXml(xml) {
var configNodes = $(xml).find('Config');
parseConfigNodes(configNodes);
var imageNodes = $(xml).find('Images');
parseImages(imageNodes);
var dataNodes = $(xml).find('Data');
parseData(dataNodes);
}
$.ajax(
{
type: "GET",
url: _cfgDataFile,
dataType: "xml",
success: ReadXml(xml);
});
|
|
|
|
|
I tried it that way too.
When I switched to IE, it was fine.
".45 ACP - because shooting twice is just silly" - JSOP, 2010 ----- You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010 ----- "Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass." - Dale Earnhardt, 1997
|
|
|
|
|
You mean IE allows you to step into anonymous functions like the original example?
|
|
|
|
|
Yes
".45 ACP - because shooting twice is just silly" - JSOP, 2010 ----- You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010 ----- "Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass." - Dale Earnhardt, 1997
|
|
|
|
|
Hi, i'm having some problems.
I have a parent div, which i want to add elements that raise click event.
i'm running with a for loop on the items.
$ParentObject = $("")
for (var i=0;i<10;i++)
{
$ChildObject = $("");
$ChildObject .click(function(){func(i);})
$ParentObject.append(ChildObject);
}
the problem is that on every child object that i click i get the 10 value,
how can i solve this problem?
thanks, ofer.
|
|
|
|
|
The function you've passed to the .click method has captured a reference to the variable, not the value of the variable. The usual C# approach of creating a copy of the variable within the loop won't work, since JavaScript variables are function-scoped.
Try something like this:
var handlerFactory = function(tmp){ return function() { func(tmp); } };
$ParentObject = $("<div id=\"Parent\"></div>");
for (var i=0; i < 10; i++)
{
$ChildObject = $("<div id=\"child" + i + "\"></div>");
$ChildObject .click(handlerFactory(i));
$ParentObject.append($ChildObject);
}
(Based on this SO answer[^].)
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
|
Can you please delete my membership?
modified 18-May-13 8:57am.
|
|
|
|
|
Shouldn't you ask for it in English.
|
|
|
|
|
Turkish or English what's the difference? Should do a little bit of artistic windows in Java language..
var lucky = [];
var iPlay = 0;
do{
var taken = new Array(49);
for (var j=49; j>0; j--) taken = false;
var rand = Math.round(49 * Math.random());
if(!taken[rand]){
lucky[iPlay] = rand;
taken = true;
iPlay++;
}
}while(iPlay < 6);
}
can picks same number/s inside of column can you please take care of some these codes above..
|
|
|
|
|
Hakan Bulut wrote: Turkish or English what's the difference?
|
|
|
|
|
|
Hi,
My requirement is to show long message in pop up or ALT with scroll bar when I click on read more or mouse over on readmore text.
I was thinking to show in div. When user click or mouse over on readmore text then the hidden div should show up and display the message. Is there any other better way to show?
Second, I want to give speaking type design to div with scroll bar. Does any one have code to do this?
Third, How to show small scroll-bar in div like we have in chat box of facebook.
Thanks in advance,
Inder...
|
|
|
|
|
Hi,
I need to display long message in a pop up on click or mouse over of read more. What are the possible ways to show message without opening in the another window.
I was thinking to show in ALT or open a hide div on mouse over or click of read more. Any other way to do this?
Second, if I use div then I want to show div in speaking design with tinny scroll-bar. please let me know how to do this? or please share code.
Thanks in advance,
Inder...
|
|
|
|
|
I would recommend searching for jquery plugins to do jquery dialogs. There are some nice plugins that will show dialogs for you and already have the code done.
There are only 10 types of people in the world, those who understand binary and those who don't.
|
|
|
|
|
hi to all
i have an asp drop down and i want to access datasource in javascript
how can i do this?
like this code in c#
myDropDown.DataSource=mydatatable;
|
|
|
|
|
there is no concept of the datasource in javascript. your asp dropdown is rendered as an html select which is containing one or more option elements.
example:
<select>
<option value="index1">Some Display Info</option>
<option value="index2">Some More Display Info</option>
</select>
The code that you listed:
mehdi.sabet wrote: myDropDown.DataSource=mydatatable;
is run server side where that HTML gets rendered and sent down to the clients browsers where it will be visually rendered for the user(s) to see. if you want access to all of the items in the dropdown you will have to get the select element and then iterate through its children.
as if the facebook, twitter and message boards weren't enough - blogged
|
|
|
|