Duplicate question - see: How do you dynamically load a javascript file? (Think C’s #include)
Is there a javascript equivalent of @import? Because using the following way of including another javascript file from within a javascript file doesn't seem very nice and clean.
document.write("<script type='text/javascript' src='something....
Hi,
I can't get the ASP.NET Rating control's selected value(Current Value) in javascript. I am using Rating control in datagrid and do you know how I can get the CurrentValue of ASP.NET Rating in javascript?
...
Situation: you've got a .swf embedded in an html page, and when you click on something in the .swf, it needs to popup a chromeless window. Normally this would be fairly easy - but consider Safari, which completely disables all 'window.open' functionality while its popup-blocker is enabled (it makes an exception if the function is trigger...
On a more abstract level then a previous question, in my experience there are 3 ways to call a javascript function on an html page from an embedded .swf using AS3: ExternalInterface, fscommand, and navigateToURL.
Let's compare and contrast these methods (and maybe others I haven't listed) and talk about the pros and cons of each - right...
I want to add some Ajax-niceness to my Django-coded website.
In my Django code, I use the @login_required decorator from django.contrib.auth.decorators to mark which view requires authentication. The default behavior when a not authenticated user clicks it is to redirect him/her to login page, and then pass the target page.
What I sa...
This fails with 'X.m is not a function'...
var Y = function () {
this.m = function () {
alert('this is m');
};
};
var X = new function () { };
X.prototype = new Y();
X.m();
It would certainly work if I skipped the new keyword in the X definition and then instantiated X before calling m() on it. Why can't I do it this...
This one is a case of not doing your homework.:-)
Apart from dynamic loading advantage, does it make sense to include a JavaScript library(jQuery in my case ) from a Google server when I can load it from my server as a single file comprised of the 19kb jQuery zip file + the additional JavaScript code I have written – all compressed wi...
Try clicking on the "Print" button on the following page:
(link removed - consensus is that everything was working fine and the problem was my setup)
For debugging purposes, I've replaced a chunk of javascript with a simple alert("test"), and even that isn't showing up in IE7 for me. It works totally fine in Safari, FF (Mac and PC) and ...
What's the best way to get a regular anchor (<a href="...">) to submit the form it is embedded in when clicked?
<form>
<ul>
<li>
<p>
The link could be <span>embedded <a href="" onclick="?">at any level</a></span>
in the form, so "this.parentNode.parentNode..." is no good. :(
...
Thanks to everyone here, got the Xampp server running!!! and can run my html in subdirectories now, as well. (can't have spaces in the subdirectory names)
NEXT UP - SSI Includes or PHP Includes
Xampp says SSI is deactivated. Tried uncommenting the lines for includes, but it doesn't change the deactivation.
How do I activate SSI?
Then...
I am trying to integrate the function into a map where you can enter an address and it puts a marker on the map. But with Google Maps getLatLng if there is a slight error in the name of the address it doesn't work anymore is there a did you mean function?
...
I need to get time in milliseconds. Please advise.
...
I am using the google ajax api loader and want to get all the information in german
so I am loading the maps api like this
google.load("maps", "2", {language : "de"});
I have tried deu, ger, de, de_DE and even en and ja_JPbut no success.
For those who don't understand my problem:
http://dl.getdropbox.com/u/5910/Jing/2008-11-24...
I am creating a large table dynamically using Javascript.
I have realised the time taken to add a new row grows exponentially as the number of rows increase.
I suspect the Page is getting refreshed in each loop per row (I am also adding input elements of type text on each cell)
Is there a way to stop the page "refreshing" until I am don...
I've tried disabling cookies in Internet Explorer 7, I've changed the settings under Internet Options->Privacy and this did nothing, when I reloaded the page.
I read somewhere that you need to restart IE7, than physically delete the Internet cache and cookie files first, and finally reload your page to disable cookies. (I also had no l...
Is it possible to intercept every request made from a page using javascript? i.e. Clicking on a link, loading an image, ajax request...
...
What is the most recommended/best way to stop multiple instances of a setTimeout function from being created (in javascript)?
An example (psuedo code):
function mouseClick()
{
moveDiv("div_0001", mouseX, mouseY);
}
function moveDiv(objID, destX, destY)
{
//some code that moves the div closer to destination
...
...
...
...
I'm relatively new to Javascript and was wondering if there's a quick way to shuffle content that is contained in multiple <div> tags. For example
<div id='d1'>
<span>alpha</span>
<img src='alpha.jpg'>
</div>
<div id='d2'>
<span>beta</span>
<img src='beta.jpg'>
</div>
<div id='d3'>
<span>gamma</span>
<img src='gamma.jpg'>
<...
We are developing large ASP.NET applications with lot of dynmically created pages containing ASCX controls. We use a lot of JQuery everywhere.
I have been reading that it would make sense to move the inline Javascript code to the bottom of the page as it could delay the loading of the page when its included "too early".
My question is ...
Is it advisable to use arrays in Javascript using tens of thousands of indexes?
I have a database which contains a table of static data, meaning that it will never change. In this case would it be advisable to convert this table to a javascript array and look the info up in there when needed? Is this bad practice?
The table in question...