Summary
I want to be able to call a JavaScript function from a Flex app using ExternalInterface and pass a reference to a different JavaScript function as an argument.
Base Example
Given the following JavaScript:
function foo(callback)
{
// ... do some stuff
callback();
}
function bar()
{
// do some stuff that should happe...
Is there a way to show the structure of a javascript class declared using Prototype's Class.create function in the Eclipse outline view?
The declarations look like:
var Foo = Class.create({
bar: function() {
...
},
baz: function() {
...
},
});
At the moment all I get is "Foo:".
(A google search turned up http://mar...
Hi, I'm trying to do the following:
I have a set of images and select (dropdown) HTML elements, 30 of each one. I'm trying to use AddEventListener on a loop from 1 to 30 so that when I change the value of the select, the image src is updated (and the image changes).
The AddEventListener function is this one:
function AddEventListener(...
I'm trying to add one to a number inside a p element with jQuery, but it doesn't work.
$(document).ready(function() {
function addOne() {
var number = $('p').html();
return number++;
}
$('p').text(addOne());
});
...
I know this shouldn't be that hard, but I couldn't find the answer on Google.
I want to execute a piece of javascript that will clear the focus from whatever element it is on without knowing ahead of time which element the focus is on. It has to work on firefox 2 as well as more modern browsers.
Is there a good way to do this?
...
i write this in api v2:
map.enableGoogleBar();
i want to using v3,but i can't find enableGoogleBar function,
where is it ?
thanks
...
I'm using JQuery to make an Ajax call. I used a sniffer to catch the response text:
{"error_code":0,"message":"SUCCESS","data":{"session_token":"3efd9dde-a839-4e91-9415-4c2f6cba5b7b"}}
But the response returned on the success callback is null. Anyone got any ideas? (see jquery code below.
Jquery code:
$.ajax({
type: "GET",
u...
Hello,
I am trying to make a jquery menu that when I click on one of the links (without reloading the page), it changes its class to "active" and removes this class when I click on another link.
here is my code :
<script type="text/javascript">
$(document).ready(function() {
$(".buttons").children().("a").click(function() {
$(".b...
Any idea how to find and replace the HTML font-size in style attribute?
eg. <span style="font-size:12px">hello world</span>
I would like to remove all font-size using javascript.
Thank you
...
I'm using the tokenizing autocomplete plugin for jquery ( http://loopj.com/2009/04/25/jquery-plugin-tokenizing-autocomplete-text-entry ). I mostly use Ruby, and I'm really unfamiliar with javascript, though.
My basic setup looks like this, and works fine for a new, blank form:
$(document).ready(function () {
$("#tag_ids_field").token...
Here is something that I find disturbing. I created a small form, and I'm using AJAX to validate for me. I have a javascript function authenticate() that works sometimes.
<form method="post" action="" id="login_form" onsubmit="authenticate()";>
// various inputs
<input type="button" onclick="authenticate()" value="Log In">
</form>
...
How would this code be refactored to use jQuery?
function emleProcessOnLoad(aThis) {
var result = document.evaluate("//span[@class='emleOnLoad']",
aThis.document, null, XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE, null);
for (var jj=0; jj<result.snapshotLength; jj++){
eval("var emleThis=result.snapshotItem(jj);" + result.snapsh...
I get my datepicker control to bind fine to anything with a class of calendarTrigger on any of my pages, however on Popups (Of which use a Master Page and have the script files on it's master page) they don't bind to trigger datepicker UI elements.
Is there something I am missing ?
jQuery Code Held Within the UserInterfaceScripts.js
...
Hello, I am confused about the two terms. What is the difference in browser-side javascript programming? I use dojo as framework. And there is only the concept of domNode. But browser debugger always told me something as htmlelement. Are they just the same thing with different names, or with some subtle differences?
Thanks.
...
I have created a custom text box with property "key"(ASP.NET C#).I want to get the value of this property "key" using java script.How can I do this?
...
Hi
This is my program .when i submit the print button i can print the datas but they are not aligned in the table formatthe format in which i need the print to be...How can i print in the correct format
<html>
<head>
<script type="text/javascript" src="http://jqueryjs.googlecode.com/files/jquery-1.3.1.min.js" > </script>
<script typ...
I have a program in PHP that allows user to pop in a message, for confirmation from user. As seen below is the link i used.
From inbox.php:
echo "<a href='inbox.php' onclick=\"popup('acknowledge.php?id=$id')\"><font size=1px color=maroon>acknowledge</font></a></td>";
From acknowledge.php:
if ($_POST['no']) {
header("location: i...
Hi
How to format a textbox like "0.00" using Jquery or Javascript...If i enter value 59,then it should become 59.00.If i enter value as 59.20,then it should same....How it possible ....
...
Hi,
Is it possible to call ASP.NET codebehind function from Javascript.
Thanks.
...
hi all,
i am new to javascript..
i have two select boxes with multiple selection enabled.When i select an element from first select box it scrolls into view the corrosponding element from the second list.The single selection goes fine in all browsers explorer,firefox,chrome.
now, if i select the first,last element from the first select...