I am helping someone out with a javascript-based web app (even though I know next to nothing about web development) and we are unsure about the best way to implement a feature we'd like to have.
Basically, the user will be using our tool to view all kinds of boring data in tables, columns, etc. via javascript. We want to implement a fea...
Here is what I have :
var log = function(arg1, arg2){
console.log("inside :" + arg1 + " / " + arg2);
};
var wrap = function(fn){
return function(args){
console.log("before :");
fn(args);
console.log("after :");
}
};
var fn = new wrap(log);
fn(1,2);
It is wrong, because I'd like to get in the console :
b...
Signed Java Applets have the same security clearance as a normal Java application running on the client. For a particular project, I need these permissions, and I need to perform privileged operations as a result of a JavaScript call.
Now, the problem is that, at least for Firefox 3 in Ubuntu (target browser and platform), when an apple...
I would like to use the jquery slideUp effect when the user navigates away from the page just to make the page look cool as it closes.
I assume that I should use the onunload event but how can I delay the page closing long enough for the effect to run to completion.
One of the options that came to mind is effectively hijacking the page...
I have a simple form for shipping options and I am using javascript to auto submit the form when someone selects a new option from the drop down list.
In order to support browsers without javascript there is also a button to submit the form. This button is hidden using javascript.
However, this means my button is visible for a brief pe...
I'm trying Eclipse (with JavaEE and Web Development plugins) as a JavaEE/GoogleAppEngine IDE. In HTML editor if I put a <script ... src="..." /> in <head> I automatically get content assist for javascript in the referenced file. I was wondering if it was possible to obtain content assist for other javascript files (e.g. jQuery or homebre...
I am trying to use doh.Deferred to write a test that will check the following sequence of events:
login with user A (asynchronous)
log out (synchronous)
login with user A (asynchronous)
The return value of the second callback function is another doh.Deferred object. I was under the impression that the callback chain of d will wait f...
I have dropdown on my page, I am changing selected value of dropdown from popup window using javascript. I have some logic in dropdown SelectedIndexChanged event, so I need to fire the SelectedIndexChanged event when dropdown selection changed from javascript.
...
I deployed my ASP.NET application under an existing virtual directory. The new deployment will have some features using JavaScript. The new features are not working.
If I deploy this build under a new virtual directory, the features using JavaScript are working.
I restarted the IIS Admin service. The problem continues.
What could be ...
I was just reading this question and wanted to try the alias method rather than the function-wrapper method, but I couldn't seem to get it to work in either Firefox 3 or 3.5beta4, or Google Chrome, both in their debug windows and in a test web page.
Firebug:
>>> window.myAlias = document.getElementById
function()
>>> myAlias('item1')
>...
I know this is the simplest problem ever, but I can't seem to find the answer and I'm searching in the dark, so a little help is appreciated. I'm trying to get the text in the node where class='song_artist'. I have a reference to the parent node, but just can't get to the text I'm looking for. My html looks like this:
<tr id='0000moe2...
Hi all,
I have the following code in page1.php :
<a href="page2.php" onClick="javascript:callFlash();">Go to page</a>
This calls a function in a Flash movie on page1.php and opens page2.php.
My question is this:
Can I be sure that the flash function will always be called and finish executing before page2.php is called? (The flash f...
Hello everyone
I am trying to parse a xml file that i have (using javascript DOM). and then i want to insert this data in a mysql table (using php).
I know how to parse xml data. But i am unable to figure out how to use php and javascript together and insert data in mysql table.
Kindly help me in this.
Best
Zeeshan
...
I need to match an infinite number of figures in a web page.
I need to be able to match all of the following formats:
100 $
99$
$99
$ 8
$.99
$ .8
$ 99.8
.99$
.99 $
9.2 $
1.2$
And the equivalent using commas:
444,333
22,333
1,222
11,111,111
333,333,333,333.01132
Or spaces:
444 333
22 333
1 222
11 111 111
333 333 333 333.01132
Th...
Hi,
I would like to be able to convert a Java date format string, e.g. dd/MM/yyyy (07/06/2009) to a JavaScript date format string, e.g. dd/mm/yy (07/06/2009).
Has anyone done this before, or got any idea where I might find some code that already does this?
Thanks in advance.
Edit:
Thanks for all the replies but now I realise my mis...
Hi All,
I'm looking for a mechanism in Rails by which to facilitate multiple drag-and-drop items simultaneously. Basically I want to select multiple and drag. Obviously I'd prefer to stick with standard HTML items and javascript, but if this isn't possible I'll consider a straightforward Flash implementation.
Thoughts?
...
Hi everyone,
I need to be able to rotate content inside a placeholder div based on percentage like this. The rotation will occur on page load. So each time a user reloads a page he has these chances of seeing content 1, 2 or 3 in the content placeholder:
Content 1 = show 50% of the time
Content 2 = show 25% of the time
Content 3 = show...
Hello all,
Is there a way to get the function parameter names of a function dynamically?
Lets say my function looks like this:
function doSomething(param1, param2, .... paramN)
{
// fill an array with the parameter name and value
// some other code
}
Now how would I get a list of the parameter names and their values into an a...
We're in the unfortunate position of having to use a JavaScript control intended for a web page inside our Windows desktop application. To accomplish this, we host Internet Explorer inside our application and tell it to navigate to a local web page. We then get the IDispatch interface of the script engine and use it to interact with th...
For the code below, I am having some issues in IE. The second parameter passed to the function should be a reference to the item clicked. This works fine in FF and Safari, but when I tested it in IE7 it errors. IE appears to get the element (as seen in the console) but whenever I try to do anything with it I get the error:
"Object doesn...