I have been trying forever but it is just not working, how can I check the array of urls I got (document.getElementsByTagName('a').href;) to see if any of the websites are in another array?
...
Hi, I'm training to get the address of all open tabs in firefox with no success. My problem is to open a tab if there's no already open, so I should search an address into tabs, and if there isn't, add one.
Thanks
...
I am attempting to implement an asynchronous method queue in Javascript as seen in this blog post
Here's what I have so far:
function Queue() {
this._methods = [];
this._response = null;
this._flushed = false;
}
(function(Q){
Q.add = function (fn) {
if (this._flushed) fn(this._response);
else this._methods.push(fn);
...
$('#start') executes the function myFunction() and $('#stop') end it. How do I stop myFunction() from executing?
function myFunction() {
$(document).mousemove(function(e) {
$('#field').html(e.pageY)
});
}
$('#start').click(function() {
myFunction();
});
$('#stop').click(function() {
//stop myFunction
})...
Hello,
I have a Dojo SubmitButton with jsId="saveParamButtonWidget". I overrided its onClick method by putting:
saveParamButtonWidget.onClick = editParam
I defined the editParam() function like this:
function editParam(eventObj) {
dojo.stopEvent(eventObj);
// ...
}
dojo.stopEvent() is supposed to stop event bubbling and de...
As you know Firefox remembers the basic authentication info for a user once the user logs in.
How do I remove this programmatically using javascript?
Scenario:
User logs in
An ajax request using basic authentication is sent to the server
If successful, firefox then remembers authentication info
If user logs out, firefox still remembe...
Hi there ,
I am not able to call a functions on onfocus and onblur events, both perfectly working in html but not in php here is code in php:
echo "<input value='Enter Name' onfocus= 'areaOnFocus(text1, 'Enter Name')' onblur='areaOnBlur(text1, 'Enter Name')' type='text' name='text1' id='text1'>";
both functions are called in script t...
Hi, I'm trying to debug a Javascript written in the Mootools framework. Right now I am developing a web application on top of Rails and my webserver is the rails s that boots WEBrick.
When I modify a particular tree.js file thats called with in one a mootools init script,
require: {
css: [MUI.path.plugins + 'tree/css/style...
I'm using JavaScript and Prototype and catching the key presses from the user. I successfully catch return, space and arrows with code like this:
Event.observe(window, "keyup", function(e) {
switch (e.keyCode) {
case Event.KEY_RETURN:
case Event.KEY_RIGHT:
case 32: // space
// do something
break;
}
});
My ...
If I used the api to post, I would like to return back the Tumblr permalink for that site I sent it to.
...
Hi!
I am new to web design. Please correct me if my understanding is wrong. I am seeking advices that can avoid the round trip between browsers and server in the following scenarios.
Imagine javascript first downloads all 30 ~ 50 images from server. These images are then used to build the thumbnail images, each in 60px by 60px or so si...
I want to print a short receipt in receipt printer, however, i print a whole long web page size.
I refer to the method searched in google and make a dll and register. However, get a automation error can not create object.
THen i regsvr32 scrrun.dll and set allow intialize not safe activex control in internet explorer
it still get the...
In order to implement a tiny compiler that emits ECMAScript I need to know how strong a function object expression binds, i.e. what is the precedence of the "operator"
function(a1, a2, ...) { ... }?
For example, how is
function(a1, a2, ...) { ... } (b1, b2, ...)
supposed to be parsed? To get the wished for result, namely the application...
How to display other sites content in our sites with out using iframe?
Is it possible to load one sites file details in our site with out using the iframe. any body knows the solution please help me with a sample code?
...
Can you make a confirm function show it's message RTL and right aligned?
...
How can I change the dimensions (width, height) of the body element after the content has been loaded?
Restrictions:
Only targeting WebKit browsers
Can't use frameworks like JQuery
Can't make changes to the original HTML file; only execute JavaScript after the content has been loaded.
...
I'd like a way of being able to calculate journey time WITH and without traffic, so I can work out the difference so I know how much the traffic is delaying you by.
Also, is there a way of doing it based on a selected date and time? As I know google has this feature, just not sure if their API has made it available. Is it possible witho...
I have a line of code in JavaScript, using prototype, that is run several times per second. This line of code, depending on the state of some variables, would ensure that certain element has or has not a class.
My question is, should I blindly add or remove the class or should I check for it first? Should I have this code:
if (!element...
Hi to all Dear Coders,
i have opened this new question because i would like to make a simple script in Jquery or Javascript that read from very simple images the figures.
This is an example of image:
And this is an easy tutorial how to make: TUT Math Image
And then i have see this script that read all phrases: Megaupload auto-fill ...
Hello. when i use embedded javascript functions i can get client id of elements with this code
for example : document.getElementById('<%=buttonXXX.ClientID%>' )
but now i am using external javascript file for caching and faster rendering
but this code does not work any more for getting client id's of elements
it gives error
how can ...