Using ASP.NET MVC + jQuery:
I need to use some values owned by the server in my client-side JavaScript.
Right now, I've temporarily got a script tag in the actual view like this:
<script>
var savePath = '<%= Url.Action("Save") %>';
</script>
But I want to move it into something cleaner and more maintainable. I'm thinking of somethin...
Is there any limit on how much data can be stored using GM_setValue?
...
Here's my issue - I need to dynamically download several scripts using jQuery.getScript() and execute certain JavaScript code after all the scripts were loaded, so my plan was to do something like this:
function GetScripts(scripts, callback)
{
var len = scripts.length
for (var i in scripts)
{
jQuery.getScript(scripts[i], funct...
I have a page with an iframe. Inside that iframe I have a javascript function like this:
function putme() {}
How can I call this function on the main page?
...
I have a HTML like so:
<table>
<tr>
<th>colA heading</th>
<th>colb heading</th>
</tr>
<tr>
<td>colA content</td>
<td>colb content</td>
</tr>
<tr>
<th>colC heading</th>
<th>colD heading</th>
</tr>
<tr>
<td>colC content</td>
<td>colC content</td>
</tr>
</table>
That products the following output:
colA he...
Hi
In the given code, best.test(password) is returning true but when I am using it in if()
condition in takes it as a false.
Code:
if(best.test(password)) //It takes it as a false .
{
document.write(best.test(password));
tdPwdStrength.innerHTML="best"+best.test(password); //but in actual it is true and returning ...
my code
// do ajax request and get JSON response
for (var i = 0; i < data.results.length; i++) {
result = data.results[i];
// do stuff and create google maps marker
marker = new google.maps.Marker({
position: new google.maps.LatLng(result.lat, result.lng),
map: map,
id: result.id
}...
After searching a lot over the internet I finally decided to post this question.
I am using THICKBOX jquery tabs.When any of the tab is clicked I want to pass the URL.IDNUMBER to the iframe which on tab pages .
I was able to send the IDNUMBER and display it in a text box by simply using jquery on the main page
$("#mytest").val('IDNUMB...
my object has a function that i want to call recurseively.
my problem is how do i use setTimeout to point to the method of that instance of the object?
MyObject.prototype.Play = function() {
// do some stuff
setTimeout(thecurrentmethodnameHERE, 1000);
}
var test = new MyObject();
test.Play();
...
Hey out there in Stackland.
I'm making a very javascript-heavy site, and at a certain point I have to take a whole bunch of objects in an array and then sort them by their distance from a certain point. I don't know the nature of objects in JS, and was wondering if this array sort would take longer with larger objects, or if it is the ...
I'm looking for a good JavaScript Memory profiler, specifically one that targets IE. And any suggestions on how to go about finding javascript memory leaks would also be appreicated.
...
I like to get a dir listing in php
glob("*.jpg");
or
$dir = '.'; //requested directory to read
$notthat = array('.', '..'); //what not to include
$listedfiles = array_diff(scandir($dir), $notthat); // removed what not to include
so i like to send that array to a javascript like that (slides = $listedfiles)
function startSlide...
I am trying to produce a script that will:
comb through all the layers and sublayers in a file
then flatten each layer that DOES NOT have a layer inside of it.
take the flattened layers and gets their POSITION RELATIVE to an
item with a name containing the word "area" that resides in the
flattened layers' parent layer,
combs through al...
I'm trying to see which windows are being opened, but I dont know the window names as they are called.
How can I access them in JAVASCRIPT/DOM/or JQUERY?
Thanks!
...
I'm building a mobile web application that may or may not rely on ajax, depending on whether the user's browser supports javascript. Since I'm using JQuery, I want to make sure the mobile browser supports AJAX through JQuery before enabling my AJAX functionality.
I'm running into a problem with Opera Mini because of the way it renders ...
My goal is to dynamically create an iframe and write ad JavaScript into it using jQuery (e.g. Google AdSense script). My code works on Chrome, but fails intermittently in Firefox i.e. sometimes the ad script runs and renders the ad, and other times it doesn't. When it doesn't work, the script code itself shows up in the iframe.
My guess...
I'm working on a website that currently has the same block of external JavaScript references on each page (added via a master page). I'd like to go through the site and identify which script files are actually necessary for each specific page to improve performance. Problem is there are a lot of pages and I'm not sure how to do it with...
i have the date in a string format like so '11/2/2009' (m/d/yyyy)
I need to test if that is greater than 30 days ago.
Whats the easiest and least error-prone way to do this.
...
Hi all, in my jsp page I have:
<form:select path="index" id="sIndex" onchange="showDetails()">
<form:options items="${smth}" itemLabel="name" itemValue="index"/>
</form:select>
And in my javascript function:
*function showDetails() {
var sIndex=document.getElementById("sIndex");
var index=sIndex[sIndex.selectedIn...
Does anybody know, off the top of your heads, a Javascript solution for calculating the complementary colour of a hex value?
There is a number of colour picking suites and palette generators on the web but I haven't seen any that calculate the colour live using JS.
A detailed hint or a snippet would be very much appreciated.
...