From the context of a FireFox extension...
Is there some way to be notified of back/forward/goto/reload/etc. "History Events"? I'm not looking for a way to cancel or change them, just to be made aware of them.
My best solution thus far has been to hook into the UI elements responsible (menuitems and buttons) for triggering history nav...
Hi,
I need to dynamically add a script reference, so I do this:
jQuery('html head').append("<script src='somesource.com/somejs.js'><\/script>")
and it does't work - I don't get any errors but I can't execute any of the methods defined inside that script.
Any ideas what I am doing wrong?
Thanks!
Andrey
...
I have a setup where I get some information, in an ajax call, then I immediately use some of that information for another call, and then I populate some fields.
The problem is that I am not certain how to create the anonymous function so that it can call this.plantName.
Right now the value of this.plantName is undefined.
I know that t...
I was trying to make a javascript gallery script by my own.
When i have done with it i was pretty happy, until i noticed, that it doesn't work in IE6.
In FireFox everything looks fine. So i started debugging.
I noticed, that setAttribute is one of the problems for sure. Maybe even the biggest.
So after viewing an interetsing article abo...
I am trying to insert php variables into javascript.
Here is the broken code:
var tokens = [<?
$result = mysql_query("SELECT * FROM accounts ORDER BY id DESC") or die (mysql_error());
while ($row = mysql_fetch_array($result)) {
$user_name = $row['user'];
$user_id = $row['id'];
echo "['$user_name','$user_id'],";
}
?>]
...
hi
i have a div that shows some content (several images, text, floating elements, etc) and i would like to add the posibility to user do something like "Save this content as image"
how can i do that? i read all the php doc but there's nothing good to do this, even imagegrabwindow sucks because of its high load, browser limitations and ...
I want to position an element in normal css relative to the element before it, and then once it's been initially positioned makes its position independant of the one before it.
For example, when you click on a 'widget' in the sidebar, it collapses, and all of the 'widgets' below it move up. I don't want them to move. Thanks.
...
How can i change the color of a link after it has been selected, so that It will remain the new color, but only until another link is selected, and then it will change back.I'm a beginner.
I found this link http://stackoverflow.com/questions/256093/changing-the-color-of-a-selected-link-that-is-embedded-in-a-table
But It makes my links ...
Most of my development life, I have done a JavaScript generated button like so:
<span>Open/hide</span>
With CSS like
span {
cursor: pointer;
}
This seemed to work for me, and IMO, it looks and seems better than
<a href="(#|javascript:void(0);|javascript:;|return false)">open/hide</a>
However, I'm starting to think people mig...
I am aware that when coding an extension, there is no way we can delay a function call except for using a setTimeout call but here's what I am trying to achieve in a plugin that I am developing for firefox (this is not for javascript embedded into a webpage by the way):
for (var i = 0; i < t.length ; i++) {
//Load a URL from an arra...
I have a function I can't modify:
function addToMe() { doStuff(); }
Can I add to this function? Obviously this syntax is terribly wrong but it's the general idea...
function addToMe() { addToMe() + doOtherStuff(); }
...
Does anyone here know of a Javascript application (something similar to Lightbox, only not for images) for drag-and-drop, preferably running on the Prototype Javascript Framework?
Alternatively, I'm open to using jQuery or something else that's supported by the major browsers.
...
Hello everyone,
I'm trying to figure out the best way to create a timer that is associated with typing within a specified form field.
Whenever someone starts typing the timer starts. When the person stops typing for a restroom break, phone call, etc. the timer pauses and continues where it left off when the person starts to type again...
In my Google web toolkit application, my gwt.xml file includes the following line in the module:
<module rename-to='foo'>
...
<script src="foo.js"></script>
...
My question is: where in my GWT project do I actually place foo.js so that it gets packed into the war when I compile my project?
...
Using a static method in as3, I can get a charCode from a character in a string.
How can I get the keyCode from a character in a string? Do I need to run this function through javascript (if I can do this in Javascript...)
...
Hi,
I know a bit of javascript, and can work fine with jquery. i just don't get why everything is referenced from $(). My understanding is that $ is never needed in javascript (unlike for example php, where every variable is prefixed with $).
ive looked through the source code and it doesnt really make sense. Is is just $ is the functi...
hello..
How can i insert a javascript in database as a record in ASP.net...
with the help of stored procedure...
...
Hi, I am done with validation using javascript for a form in PHP.
When is there any need for PHP validation?
javascript validation in itself ensures that all the fields are filled up. Is there a possibility to check the valid format of the inputs using javascript?
...
Hi Guys,
I am leading a team to build a website for a client. The client is a company producing games, toys and widgets. They have specifically asked for at least 2 design features on the site which are intelligent, interesting and unusual! (I am quoting the specs I got)
Further, they do not want any Flash - loads of JS are OK though.
...
I am encountering an issue where having a ending script tag inside a quoted string in JavaScript, and it is killing the script. I assume this is not expected behaviour. An example of this can be seen here: http://jsbin.com/oqepe/edit
My test case browser for the interested: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.4) Gecko/200...