Say I have the following jQuery:
$('#myelement').bind('click', foo);
How can I unbind this event without using jQuery?
The event doesn't show up in any of these methods on a DOM element:
var domElement = document.getElementById('myelement');
domElement.onclick // == null
domElement.click // == undefined
So how can I unbind it with...
I want to check if an event is available or not before binding a function to it.
The problem is that Google Chrome support the event "loadedmetadata" in the Video element while FireFox don't.
I did the following
$('video').bind('loadedmetadata', videoloaded);
videoloaded();
It worked well in Firefox but when I tried in Chrome, the fu...
I'd like to find the longest repeating string within a string, implemented in JavaScript and using a regular-expression based approach.
I have an PHP implementation that, when directly ported to JavaScript, doesn't work.
The PHP implementation is taken from an answer to the question "Find longest repeating strings?":
preg_match_all('/...
Is it possible to make real-time network games using JavaScript? I've seen flash do it, but I'm interested in making a multiplayer browser-based game that doesn't depend on any plugins. I've read that it is impossible to keep Ajax connections open for streaming communication, and it isn't feasible to make several new Ajax connections per...
Hi!
Still have the JQuery keyword xml section for Notepad++? I'm a newer user and it would really help! Thanks!
[email protected]
...
Hi all,
I'm very new to web programming, but I have some data that I would really like to present in a constantly updated time series graph on my website.
So I have been trying to prototype some code that will display the latest integer value that has been added to a database.
The database table I want to reference is being constantly in...
Hi,
I want to write a message in a textarea and be able to refer to a person using the @ symbol.
e.g
Please call @Larry David regarding
something
When submitting the form, I want to extract the persons name ie Larry David.
How do I go about extracting this string with Jquery?
...
Hello!
I am currently using ExternalInterface to call JS functions from Flex.
Is it possible to do the same the other way around: have Flex execute a function when a certain trigger is executed in JS?
I want to have a Flash app with buttons in HTML that when pressed call functions inside the Flex app.
Thank you.
...
I use this to invoke a function when a form on the page is submitted:
$$("form").invoke("observe", "submit", submitForm);
I'm having a problem getting this to work in IE when a text field has focus and the enter key is pressed. Firefox submits the form in this case but not IE.
The form has one submit button:
<input type="submit" va...
Hi there,
I have MediaWiki 1.16.0 installed on a remote sever, with Apache+PHP 5.2.11 running. I have installed several extensions(namely: FCKEditor, Group access control) without a problem. However, I could not get Add Media Wizard and Upload Wizard to work correctly(Try them here). I have tried many things(with details below):
I dow...
For instance adding new categories to a list.
Once a new category has been added, and successfully submitted to the db, should I use JS to directly append this value to the list or should I query the table again and repopulate the list?
...
I am trying this code in Javascript. But its not working....
The postData is json data sent to the server to be saved.
I have checked that JSON data needs to be parsed or stringify... is that the problem..
or I am doing some other silly mistake...
var postData ="_out=json&name=justtryit&def={"layout":[{"id":"sw-156","xy":[168,80]},{"id...
On Mac OS/X in both Firefox and Chrome, the mouse cursor disappears when I type. Is there anyway in javascript to prevent this behavior or to force the cursor to become visible again?
I'm using jquery for the keyboard handling:
// keyboard handlers
$(document).keydown(this.keydown);
$(document).keyup(this.keyup);
...
keydown: ...
ok, so when i do array=array2 then change something in array2 it changes array. how do i prevent this?
...
I'm building the JSON object using JavaScript. How would I inset the following data to the bottom of the stack:
"hello": { "label":"Hello", "url":"#hello" }
in to the following variable:
var ListData = {
"main": {
"label":"Main",
"url":"#main"
},
"project": {
"label":"Project",
"url":"#project"
},
"settings"...
Here LINK it is suggested that it is possible to "Figure out what the JavaScript is doing and emulate it in your Python code: " This is what I would like help doing ie my question. How do I emulate javascript:__doPostBack ?
Code from a website (full page source here LINK:
<a style="color: Black;" href="javascript:__doPostBack('ctl00$Co...
Hey guys long time reader first poster. Well I seem to be having an iFrame resize issue with Google Chrome.
> <script language="javascript" type="text/javascript">
function resizeIframe(obj)
{
obj.style.height = obj.contentWindow.document.body.scrollHeight + 'px';
}
</script>
<
That's in my header.
> <iframe id="conten...
Possible Duplicate:
How does the (function() {})() construct work and why do people use it?
Hi,
Learning javascript I came across with this function.
<script language = "javascript">
(function( window, undefined ) {
})(window);
</script>
Wondering what type of funcion is this one and how I can call it.
Thanks....
Hi all, I am developing one application using PHP, jQuery, Javascript in CodeIgniter.
I included script.js file in view file. The problem is the view file is continuously loading again and again with in the result div called "new".
Please help me.
Below are the files and code.
View file
<?php $this->load->view('header'); ?>
<scrip...
Hi,
I'm building a page to display a bunch of webcam images and update them periodically so that the page can be used for at-a-glance monitoring. However, I'm having issues getting the periodic reload working. My code looks something like:
<div class='cameras'>
<div class='camera'>
<h4>Desk</h4>
<img height='240' src...