Can I use ExternalInterface to call a namespaced JavaScript function?
//JavaScript
foo.bar = function(baz) {}
// AS3
import flash.external.ExternalInterface;
ExternalInterface.call('foo.bar', baz);
...
I have code like below:
<div id="container">
<div class="item" id="1">blah blah</div>
<div class="item" id="2">blah blah 2</div>
</div>
But actually there are lots and lots of with class='item'.
Basically as the user scrolls this great long list of items I want to change the style of the current top visible one (like google reader...
Hi I just wondered if this is possible. I have quite a few images on my website and I have made them as small file size as possible. Some of the images are used as a slideshow but there are all loaded in one go. Is there a way using javascript to make the slideshow images load last so that the background images etc load up first and the ...
Hi Everyone,
I am using the sarissa javascript library to create xml on the client in a web application. My question is how can I add attributes to the root node? I am really trying to pass a small xml string to the server like basically a 1 liner of XML. I tried this and it doesn't work. oDomDoc does not support the "setAttributeNode" ...
is this possible?
My thinking: Prototypes are essentially attributes of the Constructor function (whether native Constructor such as Function, String or Object, or your own custom Constructor) and only the 'new' keyword is able to leverage the Constructor and its prototype for object creation
Am I missing something?
...
Are there any issues in having a large number (say 50) of script tags in an html file. Does it cause any performance issues in page rendering times?
I have a section on my page that's pulling a geolocation point and putting this into an array for use on a google map. I could create a separate query for just the geolocation points but ...
Hello,
I am writing a destop script on windows 2003 and I need to open a file and seek to the end of it and read the last line.
I looked for a "seek" but couldn't find. I saw the openTextFile for option but didn't have.
I implement it by openning the file with the red flag and then reading line after line.
With big file it takes a ti...
I am sticking values into a script, and I am using the function below to 'implode' the array
function implode() { var str='';
for(item in globvars)
str +='\n'+globvars[item]+';';
return str+'\n';
}
Sample usage:
globvars = ['Tom', 'Dick', 'Harry'];
output = '<script type = "text/javascript">\n'+implode(globvars)+'</scr...
Hi
I'm having problems using the updateprogress control in ASP.NET. I've successfully created a small project using this control successfully, but when I created a simple .aspx page in my solution using the same code then it doesn't work. There is a mismatch in the rendered HTML code, where it doesn't work it is missing sections, e.g.
...
could one use overflow:hidden for both sides?
cause i want the row to be centered.
EDIT: ive got a row of link elements. i want it to be like: http://jqueryfordesigners.com/coda-popup-bubbles/
the row will stick out both to the left and right. not just on the right side. with other words: i want to center a very long row within a div ...
Hi,
I'm working on a realtime syntax highlighter in javascript using contenteditable. When parsing content I extract the text of the div and use regex patterns to style it properly. Then I set the innerHtml of the div to the parsed content. However, this makes the cursor disappear from the screen.
I have created this function to reset ...
I'm having a lot of trouble finding specific information and examples on this. I've got a number of jQuery UI dialogs in my application attached to divs that are loaded with .ajax() calls. They all use the same setup call:
$(".mydialog").dialog({
autoOpen: false,
resizable: false,
modal: true
});
I just wa...
When a user requests to edit an entry in our CMS we 'lock' it so that nobody else can edit it simultaneously, we release the lock when they submit their changes. However we need to handle the case where the user leaves the page through other links... my first attempt is to use jQuery to fire a synchronous $.ajax() call on $(window).unlo...
I have ad tags (i.e. JavaScript) from several popular ad networks (AdSense, AdBrite, etc.) and I like to test them (basically make sure they render correctly) before adding them to my websites. I add the tag to a page, and end up loading the page several times on my dev box.
I noticed that after several refreshes on my dev box, the ads ...
I load html & JS code dynamically from webservice. I use prototype update method:
placeholder.update(result.Static.html); // which also include javascript code
Immediately after i loaded code, everything works fine:
ProRegResetForm();
alert('reset done');
however, from control declared as
<a href="javascript://" onclick="javascri...
I'm using jQuery.ajax to extract form data from a page, and send it to my database (via another PHP page).
The form information is collected by:
var X=$('#div1').val();
var Y=$('#div2').val();
This is used to build the POST string, i.e.
var data='varx='+X+'&vary='+Y;
Obviously this is problematic if an ampersand character is used....
I've a simple page in which in the head I load several remote JavaScript files (I need them and can't have a local copy).
The scripts I load are similar to these:
<script type="text/javascript" src="http://mymachine/donald/script1.js"></script>
<script type="text/javascript" src="http://mymachine/donald/script2.js"></scr...
What's a good way to determine the following.
You have a table of game players, in an array of size N. Each round, each player takes a turn.
You know the index of the player that should go first, and each player will take a turn ascending the array, and looping back to 0 when it hits the last index. For example, if player at index 3 we...
Hello friends
www.ftse.com
if you see this link you wil find one map on the map.. onmouseover they were dispalying some table data? can an one tell me how they did I hope they used Flash ajax,javascript,or (java with flex) can anyone tel me?
Thanks
...
I want to hook paste event for <input type="text"> and force this text to be pasted into hidden textarea (then I want to parse textarea's text and perform 'paste data from excel to gridview' action). Something like:
$('#input1').bind('paste', function(e) {
// code do paste text to textarea instead of originally targeted input
});
...