Search Results

Search found 36725 results on 1469 pages for 'javascript library'.

Page 4/1469 | < Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • How to use html and JavaScript in Content Editor web part in SharePoint2010

    - by ybbest
    Here are the steps you need to take to use html and JavaScript in content editor web part. 1. Edit a site page and add a content editor web part on the page. 2. After the content editor is added to the page, it will display on the page like shown below 3. Next, upload your html and JavaScript content as a text file to a document library inside your SharePoint site. Here is the content in the document <script type="text/javascript"> alert("Hello World"); </script> 4. Edit the content editor web part and reference the file you just uploaded. 5. Save the page and you will see the hello world prompt. References: http://stackoverflow.com/questions/5020573/sharepoint-2010-content-editor-web-part-duplicating-entries http://sharepointadam.com/2010/08/31/insert-javascript-into-a-content-editor-web-part-cewp/

    Read the article

  • data handling with javascript

    - by Vincent Warmerdam
    Python has a very neat package called pandas which allows for quick data transformation; tables, aggregation, that sort of thing. A lot of these types of functionality can also be found in the python itertools module. The plyR package in R is also very similar. Usually one woud use this functionality to produce a table which is later visualized with a plot. I am personally very fond of d3, and I would like to allow the user to first indicate what type of data aggregation he wants on the dataset before it is visualized. The visualisation in question involves making a heatmap where the user gets to select the size of the bins of the heatmap beforehand (I want d3 to project this through leaflet). I want to visually select the ideal size of the bins for the heatmap. The way I work now is that I take the dataset, aggregate it with python and then manually load it in d3. This is a process that takes a lot of human effort and I was wondering if the data aggregation can be done through the javascript of the browser. I couldn't find a package for javascript specifically built for data, suggesting (to me) that this is a bad idea and that one should not use javascript for the data handling. Is there a good module/package for javascript to handle data aggregation? Is it a good/bad idea to do the data aggregation in javascript (performance wise)?

    Read the article

  • JavaScript evolution -- weeding out the confusion [closed]

    - by good_computer
    There was JavaScript v1.3 (I guess) that we all started with. Then there was JavaScript 2.0 that Adobe implemented (ActionScript) but was abandoned later. Then came E4X. Then ES5. There is also ES harmony. I am really confused about which version is the latest and where is the standards body going. Can someone describe the whole chronology of JavaScript / ECMAScript evolution and the important differences between those versions?

    Read the article

  • Interactive map using javascript [on hold]

    - by Denis
    Im trying to learn HTML and javascript. But i cant find any information about how to create interactive map/picture using javascript. Ex. I take a map where is a part of my town and write some information about like few buildings there, so after i put my mouse over those buildings the information will be displayed. It should look similar to this http://davidlynch.org/projects/maphilight/docs/demo_usa.html I need to use the javascript to make it done.

    Read the article

  • javascript normalize whitespace and other plain-text formatting routines

    - by dreftymac
    Background: The language is JavaScript. The goal is to find a library or pre-existing code to do low-level plain-text formatting. I can write it myself, but why re-invent the wheel. The issue is: it is tough to determine if a "wheel" is out there, since any search for JavaScript libraries pulls up an ocean of HTML-centric stuff. I am not interested in HTML necessarily, just text. Example: I need a JavaScript function that changes this: BEFORE: nisi ut aliquip | ex ea commodo consequat duis |aute irure dolor in esse cillum dolore | eu fugiat nulla pariatur |excepteur sint occa in culpa qui | officia deserunt mollit anim id |est laborum ... into this ... AFTER: nisi ut aliquip | ex ea commodo consequat duis | aute irure dolor in esse cillum dolore | eu fugiat nulla pariatur | excepteur sint occa in culpa qui | officia deserunt mollit anim id | est laborum Question: Does it exist, a JavaScript library that is non-html-web-development-centric that has functions for normalizing spaces in delimited plain text, justifying and spacing plain text? Rationale: Investigating JavaScript for use in a programmer's text editor.

    Read the article

  • Lexer written in Javascript?

    - by Phobis
    I have a project where a user needs to define a set of instructions for a ui that is completely written in javascript. I need to have the ability to parse a string of instructions and then translate them into instructions. Is there any libraries out there for parsing that are 100% javascript? Or a generator that will generate in javascript? Thanks!

    Read the article

  • Long Press in JavaScript?

    - by Randy Mayer
    Hi, Is it possible to implement "long press" in JavaScript (or jQuery)? How? HTML <a href="" title="">Long press</a> JavaScript $("a").mouseup(function(){ // Clear timeout return false; }).mousedown(function(){ // Set timeout return false; }); Thank you!

    Read the article

  • JSINQ (Linq for JavaScript library) sub-queries (how-to)

    - by Tom Tresansky
    I'm using this library: jsinq. I want to create a new object using subqueries. For example, in .NET LINQ, I could do something like this: from a in Attendances where a.SomeProperty = SomeValue select new { .Property1 = a.Property1, .Property2 = a.Property2, .Property3 = (from p in People where p.SomeProperty = a.Property3 select p) } such that I get a list of ALL people where Property3 value matches the attendance's Property3 value in EACH object returned in the list. I didn't see any sample of this in the docs or on the playground. Made a couple tries of it and didn't have any luck. Anybody know if this is possible and how to?

    Read the article

  • Prototype Library use of !! operator

    - by Rajat
    Here is a snippet from Prototype Javascript Library : Browser: (function(){ var ua = navigator.userAgent; var isOpera = Object.prototype.toString.call(window.opera) == '[object Opera]'; return { IE: !!window.attachEvent && !isOpera, Opera: isOpera, WebKit: ua.indexOf('AppleWebKit/') > -1, Gecko: ua.indexOf('Gecko') > -1 && ua.indexOf('KHTML') === -1, MobileSafari: /Apple.*Mobile/.test(ua) } })(), This is all good and i understand the objective of creating a browser object. One thing that caught my eye and I haven't been able to figure out is the use of double not operator !! in the IE property. If you read through the code you will find it at many other places. I dont understand whats the difference between !!window.attachEvent and using just window.attachEvent. Is it just a convention or is there more to it that's not obvious?

    Read the article

  • JAVASCRIPT changing on click

    - by Webby
    Hello, Id like some help changing this javascript onclick event to just load the data on page the page load... Preferably not using the body on load tag... So obviously I'd pre set the var for term inside the script term rather than the excisting on click event.. Hope that made sense <p><a id="keywordlink" href="?term=wombats">Get keywords for wombats</a></p> <script type="text/javascript" src="keywords.js"></script> <script type="text/javascript"> var x = document.getElementById('keywordlink'); if(x){ x.onclick = function(){ var term = this.href.split('=')[1]; this.innerHTML += ' (loading...)'; KEYWORDS.get(term,seed); return false; } } function seed(o){ var div = document.createElement('div'); var head = document.createElement('h2'); head.innerHTML = 'Keywords for '+o.term; div.appendChild(head); var p = document.createElement('p'); p.innerHTML = o.toplist; div.appendChild(p); var head = document.createElement('h3'); head.innerHTML = 'Details:'; div.appendChild(head); var list = document.createElement('ol'); for(var i=0,j=o.keywords.length;i<j;i++){ var li = document.createElement('li'); li.innerHTML = o.keywords[i].term + '('+o.keywords[i].amount+')'; list.appendChild(li); } div.appendChild(list); x.parentNode.replaceChild(div,x); } </script>

    Read the article

  • How often do you find javascript disabled on browsers?

    - by Mark Redman
    I have started using ajax/jQuery in our websites / application. There are many plugins that support degrading the javascript to browsers that dont have javascript enabled and techniques to support this. What are peoples thoughts on javascript support, we build applications rather than just websites and are looking to just support javascript enabled browsers as a pre-requisite assuming that most people or companies have javascript enabled. Do you find most people have javascript? do you monitor the percentage of javascript/non-javascript browsers (I guess this can be done with website stats) and what are the numbers regarding this?

    Read the article

  • Javascript doesnt update

    - by Trikam
    Hi all, I have a function that passes a parameter which is a function call and then i use setTimeout to call this passed function call. now i tried two methods with setTimout to raise the event and i used function.call(). When this passed parameter function call was raised none of the javascript was being updated, below is the javascript which im using to raise the event and the javascript which is supposed to be updated: The function being passed is [context] - function() { ErrorMessageFileSelect('diverrortextchoosechannal','The file chosen is to big, you must choose a file less than 1MB'); } function FileSizeOnLoad(contentLength,context) { if (context != null) { // context.call(); setTimeout(context,0); // or context.call(); } else { $('#inputHiddenFileSizeField').val(contentLength); DisplayChoseFileInformation(contentLength); } } //this is where the update should happen function ErrorMessageFileSelect(className, errorMessage) { $('div.' + className).text(errorMessage); alert($('div.' + className).text()); } Is there somthing im missing, can someone help me with this issue please. Thanks

    Read the article

  • Scope of This JavaScript Variable

    - by dkris
    I have a question and an issue wrt the code below: My question is what is the scope of the variable loaded here. The reason why i ask this is the onload="if(loaded==1)inittextarea() code is working fine on Firefox and not IE8. Why is this happening? Is there something specific i need to do here? Or is it not a valid practice? <html> <head> <title>Some Page</title> <link rel="stylesheet" href="../css/default.css" type="text/css"> <script type="text/javascript"> var loaded = 0; /*Point of interest*/ function jsLoaded() { loaded =1; } </script> <script type="text/javascript"> function inittextarea() { alert("test") tinyMCE.init({ elements : "content", theme : "advanced", readonly : true, mode : "exact", theme : "advanced", readonly : true, setup : function(ed) { ed.onInit.add(function() { tinyMCE.activeEditor.execCommand("mceToggleVisualAid"); }); } }); } </script> <script src="../js/tiny_mce/tiny_mce.js" onload="jsLoaded()" type="text/javascript"></script> </head> <body onload="if(loaded==1)inittextarea()"><!--Works on Firefox only--> *Usual stuff* </body></html> Any pointers please?

    Read the article

  • Help finding good players that would display music library as folder structure

    - by cipricus
    I have a big music library. Nothing special here. But I very much dislike the way usually music library is displayed in most recommended players, according to Artist/Album/Year/Genre tags, ignoring my folder structure or making it hardly accessible. The problem is that not all my music is tagged according to genre etc, but all is perfectly ordered by folder structure which takes into account all characteristics handled by tags, as well as many others, which I can change and specify at any time. (I can decide ordering my music by country, inside a sub-category like "baroque music", for example). The advantage of using folder structure in displaying media library is that all the logical structure is displayed, with all sub-categories, which can vary and be changed, visible at the same time. Some Players, like Clementine and Quod Libet, can display folders, but when comes to displaying only the library, they still display it only by tags. I am looking for some plugins to good players that would provide a solution to this, and I am looking for different solutions to this. Therefore I'll display as my own answer some solutions that I have already found and welcome other answers with new and better ways to achieve the same purpose. (Most welcome are of course players that, beside having the capability discussed here, would include other elementary features like playlists in tabs, search, and so forth.)

    Read the article

  • How to load a library that depends on another library, all from a jar file

    - by Philip
    I would like to ship my application as a self-contained jar file. The jar file should contain all the class files, as well as two shared libraries. One of these shared libraries is written for the JNI and is essentially an indirection to the other one (which is 100% C). I have first tried running my jar file without the libraries, but having them accessible through the LD_LIBRARY_PATH environment variable. That worked fine. I then put the JNI library into the jar file. I have read about loading libraries from jar files by copying them first to some temporary directory, and that worked well for me (note that the 100% C library was, I suppose, loaded as before). Now I want to put both libraries into the jar, but I don't understand how I can make sure that they will both be loaded. Sure I can copy them both to a temporary directory, but when I load the "indirection" one, it always gives me: java.lang.UnsatisfiedLinkError: /tmp/.../libindirect.so: /libpure.so: cannot open shared object file: No such file or directory I've tried to force the JVM to load the "100% C" library first by explicitely calling System.load(...) on its temporary file, but that didn't work better. I suspect the system is looking for it when resolving the links in libindirect.so but doesn't care about what the JVM loaded. Can anyone help me on that one? Thanks

    Read the article

  • JavaScript: Very strange behavior with assigning methods in a loop

    - by Andrey
    Consider this code below: <a href="javascript:void(-1)" id="a1">a1</a> <a href="javascript:void(-1)" id="a2">a2</a> <script type="text/javascript"> var buttons = [] buttons.push("a1") buttons.push("a2") var actions = [] for (var i in buttons) { actions[buttons[i]] = function() { alert(i) } } var elements = document.getElementsByTagName("a") for (var k = 0; k < elements.length; k++) { elements[k].onclick = actions[elements[k].id] } </script> Basically, it shows two anchors, a1 and a2, and I expect to see "1" and "2" popping up in an alert when clicking on corresponding anchor. It doesn't happen, I get "2" when clicking on either. After spending an hour meditating on the code, I decided that it probably happens because dynamic onclick methods for both anchors keep the last value of "i". So I change that loop to for (var i in buttons) { var local_i = i.toString() actions[buttons[i]] = function() { alert(local_i) } } hoping that each dynamic function will get its own copy of "i" with immediate value. But after this change I get "1" popping up when I click on either link. What am I doing wrong? It's a huge show stopper for me.

    Read the article

  • passing the parent form on the onclick event to javascript function

    - by user1051505
    Hi I am trying to pass variables on the onclick event to a javascript function. I am trying the following way, I can't get the input value in the javascript function.(I am expecting an alert of 1.) Is it the right way of doing this? Please help. <head> <script> function submit_value(form) { alert(form.ip.value); } </script> </head> <table> <tr> <form> <td> <input id="ip" type="text" value="1"> </td> <td> <a href="javascript:;" onClick="submit_value(this)">Button</a> </td> </form> </tr> </table>

    Read the article

  • Soapi.CS : A fully relational fluent .NET Stack Exchange API client library

    - by Sky Sanders
    Soapi.CS for .Net / Silverlight / Windows Phone 7 / Mono as easy as breathing...: var context = new ApiContext(apiKey).Initialize(false); Question thisPost = context.Official .StackApps .Questions.ById(386) .WithComments(true) .First(); Console.WriteLine(thisPost.Title); thisPost .Owner .Questions .PageSize(5) .Sort(PostSort.Votes) .ToList() .ForEach(q=> { Console.WriteLine("\t" + q.Score + "\t" + q.Title); q.Timeline.ToList().ForEach(t=> Console.WriteLine("\t\t" + t.TimelineType + "\t" + t.Owner.DisplayName)); Console.WriteLine(); }); // if you can think it, you can get it. Output Soapi.CS : A fully relational fluent .NET Stack Exchange API client library 21 Soapi.CS : A fully relational fluent .NET Stack Exchange API client library Revision code poet Revision code poet Votes code poet Votes code poet Revision code poet Revision code poet Revision code poet Votes code poet Votes code poet Votes code poet Revision code poet Revision code poet Revision code poet Revision code poet Revision code poet Revision code poet Revision code poet Revision code poet Revision code poet Revision code poet Votes code poet Comment code poet Revision code poet Votes code poet Revision code poet Revision code poet Revision code poet Answer code poet Revision code poet Revision code poet 14 SOAPI-WATCH: A realtime service that notifies subscribers via twitter when the API changes in any way. Votes code poet Revision code poet Votes code poet Comment code poet Comment code poet Comment code poet Votes lfoust Votes code poet Comment code poet Comment code poet Comment code poet Comment code poet Revision code poet Comment lfoust Votes code poet Revision code poet Votes code poet Votes lfoust Votes code poet Revision code poet Comment Dave DeLong Revision code poet Revision code poet Votes code poet Comment lfoust Comment Dave DeLong Comment lfoust Comment lfoust Comment Dave DeLong Revision code poet 11 SOAPI-EXPLORE: Self-updating single page JavaSript API test harness Votes code poet Votes code poet Votes code poet Votes code poet Votes code poet Comment code poet Revision code poet Votes code poet Revision code poet Revision code poet Revision code poet Comment code poet Revision code poet Votes code poet Comment code poet Question code poet Votes code poet 11 Soapi.JS V1.0: fluent JavaScript wrapper for the StackOverflow API Comment George Edison Comment George Edison Comment George Edison Comment George Edison Comment George Edison Comment George Edison Answer George Edison Votes code poet Votes code poet Votes code poet Votes code poet Revision code poet Revision code poet Answer code poet Comment code poet Revision code poet Comment code poet Comment code poet Comment code poet Revision code poet Revision code poet Votes code poet Votes code poet Votes code poet Votes code poet Comment code poet Comment code poet Comment code poet Comment code poet Comment code poet 9 SOAPI-DIFF: Your app broke? Check SOAPI-DIFF to find out what changed in the API Votes code poet Revision code poet Comment Dennis Williamson Answer Dennis Williamson Votes code poet Votes Dennis Williamson Comment code poet Question code poet Votes code poet About A robust, fully relational, easy to use, strongly typed, end-to-end StackOverflow API Client Library. Out of the box, Soapi provides you with a robust client library that abstracts away most all of the messy details of consuming the API and lets you concentrate on implementing your ideas. A few features include: A fully relational model of the API data set exposed via a fully 'dot navigable' IEnumerable (LINQ) implementation. Simply tell Soapi what you want and it will get it for you. e.g. "On my first question, from the author of the first comment, get the first page of comments by that person on any post" my.Questions.First().Comments.First().Owner.Comments.ToList(); (yes this is a real expression that returns the data as expressed!) Full coverage of the API, all routes and all parameters with an intuitive syntax. Strongly typed Domain Data Objects for all API data structures. Eager and Lazy Loading of 'stub' objects. Eager\Lazy loading may be disabled. When finer grained control of requests is desired, the core RouteMap objects may be leveraged to request data from any of the API paths using all available parameters as documented on the help pages. A rich Asynchronous implementation. A configurable request cache to reduce unnecessary network traffic and to simplify your usage logic. There is no need to go out of your way to be frugal. You may set a distinct cache duration for any particular route. A configurable request throttle to ensure compliance with the api terms of usage and to simplify your code in that you do not have to worry about and respond to 50X errors. The RequestCache and Throttled Queue are thread-safe, so can make as many requests as you like from as many threads as you like as fast as you like and not worry about abusing the api or having to write reams of management/compensation code. Configurable retry threshold that will, by default, make up to 3 attempts to retrieve a request before failing. Every request made by Soapi is properly formed and directed so most any http error will be the result of a timeout or other network infrastructure. A retry buffer provides a level of fault tolerance that you can rely on. An almost identical javascript library, Soapi.JS, and it's full figured big brother, Soapi.JS2, that will enable you to leverage your server cycles and bandwidth for only those tasks that require it and offload things like status updates to the client's browser. License Licensed GPL Version 2 license. Why is Soapi.CS GPL? Can I get an LGPL license for Soapi.CS? (hint: probably) Platforms .NET 3.5 .NET 4.0 Silverlight 3 Silverlight 4 Windows Phone 7 Mono Download Source code lives @ http://soapics.codeplex.com. Binary releases are forthcoming. codeplex is acting up again. get the source and binaries @ http://bitbucket.org/bitpusher/soapi.cs/downloads The source is C# 3.5. and includes projects and solutions for the following IDEs Visual Studio 2008 Visual Studio 2010 ModoDevelop 2.4 Documentation Full documentation is available at http://soapi.info/help/cs/index.aspx Sample Code / Usage Examples Sample code and usage examples will be added as answers to this question. Full API Coverage all API routes are covered Full Parameter Parity If the API exposes it, Soapi giftwraps it for you. Building a simple app with Soapi.CS - a simple app that gathers all traces of a user in the whole stackiverse. Fluent Configuration - Setting up a Soapi.ApiContext could not be easier Bulk Data Import - A tiny app that quickly loads a SQLite data file with all users in the stackiverse. Paged Results - Soapi.CS transparently handles multi-page operations. Asynchronous Requests - Soapi.CS provides a rich asynchronous model that is especially useful when writing api apps in Silverlight or Windows Phone 7. Caching and Throttling - how and why Apps that use Soapi.CS Soapi.FindUser - .net utility for locating a user anywhere in the stackiverse Soapi.Explore - The entire API at your command Soapi.LastSeen - List users by last access time Add your app/site here - I know you are out there ;-) if you are not comfortable editing this post, simply add a comment and I will add it. The CS/SL/WP7/MONO libraries all compile the same code and with the exception of environmental considerations of Silverlight, the code samples are valid for all libraries. You may also find guidance in the test suites. More information on the SOAPI eco-system. Contact This library is currently the effort of me, Sky Sanders (code poet) and can be reached at gmail - sky.sanders Any who are interested in improving this library are welcome. Support Soapi You can help support this project by voting for Soapi's Open Source Ad post For more information about the origins of Soapi.CS and the rest of the Soapi eco-system see What is Soapi and why should I care?

    Read the article

  • Javascript Noob Question. Need Help With Simple Script

    - by three3
    Hi everyone, I am new to JavaScript (only a couple of days of reading a book) and I am stuck on this code snippet. I have looked at it over and over again but cannot seem to figure out why it is not working. I am sure it is something really simple that I have just looked over but I really just need a fresh pair of eyes to look at this. The code is supposed to update a placeholder image on a page without the page having to reload. But when I am clicking on the link of an image, it is taking me to the link where the image is located instead of replacing the placeholder image. Here is my HTML code: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <title>Image Gallery</title> <script type="text/javascript" src="scripts/showPic.js"></script> </head> <body> <h1>Snapshots</h1> <ul> <li> <a href="images/cat.jpg" onclick="showPic(this); return false;" title="A Cat">Cat</a> </li> <li> <a href="images/night.jpg" onclick="showPic(this); return false;" title="Night">Night</a> </li> <li> <a href="images/coke.jpg" onclick="showPic(this); return false;" title="Coke">Coke</a> </li> <li> <a href="images/sport.jpg" onclick="showPic(this); return false;" title="Sports">Sport</a> </li> <li> <a href="images/mnms.png" onclick="showPic(this); return false;" title="MnM's">MnM's</a> </li> <li> <a href="images/kid.jpg" onclick="showPic(this); return false;" title="A Kid">Kid</a> </li> </ul> <br /> <img id="placeholder" src="images/placeholder.jpg" alt="Place Holder Image" /> </body> </html> And here is the JavaScript function I am using to get this done: <script type="text/javascript"> function showPic(whichpic) { var source = whichpic.getAttribute("href"); var placeholder = document.getElementById("placeholder"); placeholder.setAttribute("src",source); } </script> Any help is greatly appreciated and thanks in advance for the help.

    Read the article

  • Need Help With This Simple Script (JavaScript Noob Question)

    - by three3
    Hi everyone, I am new to JavaScript (only a couple of days of reading a book) and I am stuck on this code snippet. I have looked at it over and over again but cannot seem to figure out why it is not working. I am sure it is something really simple that I have just looked over but I really just need a fresh pair of eyes to look at this. The code is supposed to update a placeholder image on a page without the page having to reload. But when I am clicking on the link of an image, it is taking me to the link where the image is located instead of replacing the placeholder image. Here is my HTML code: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <title>Image Gallery</title> <script type="text/javascript" src="scripts/showPic.js"></script> </head> <body> <h1>Snapshots</h1> <ul> <li> <a href="images/cat.jpg" onclick="showPic(this); return false;" title="A Cat">Cat</a> </li> <li> <a href="images/night.jpg" onclick="showPic(this); return false;" title="Night">Night</a> </li> <li> <a href="images/coke.jpg" onclick="showPic(this); return false;" title="Coke">Coke</a> </li> <li> <a href="images/sport.jpg" onclick="showPic(this); return false;" title="Sports">Sport</a> </li> <li> <a href="images/mnms.png" onclick="showPic(this); return false;" title="MnM's">MnM's</a> </li> <li> <a href="images/kid.jpg" onclick="showPic(this); return false;" title="A Kid">Kid</a> </li> </ul> <br /> <img src="images/placeholder.jpg" title="Place Holder Image"> </body> </html> And here is the JavaScript function I am using to get this done: <script type="text/javascript"> function showPic(whichpic) { var source = whichpic.getAttribute("href"); var placeholder = document.getElementById("placeholder"); placeholder.setAttribute("src",source); } </script> Any help is greatly appreciated and thanks in advance for the help.

    Read the article

  • flash blocking javascript events

    - by jedierikb
    this is an edit of the original post now that I better understand the problem. now with source code! In IE, if body (or another html div has focus), then you keypress & click on flash at the same time, then release... a keyup event is never fired. It is not fired in javascript or in flash. Where is this keyup event? This is the order of event firing you get instead: javascriptKeyEvent:bodyDn ** currentFocuedElement: body javascriptKeyEvent:docDn ** currentFocuedElement: body actionScriptEvent::activate ** currentFocuedElement: [object] actionScriptEvent::mouseDown ** currentFocuedElement: [object] actionScriptEvent::mouseUp ** currentFocuedElement: [object] Subsequent keyup and keydown events are captured by flash, but that initial keyUp is never fired.. anywhere. And I need that keyup! Here is the html/javascript: <html> <head> <script type="text/javascript" src="p.js"></script> <script type="text/javascript" src="swfobject.js"></script> <script> function ic( evt ) { Event.observe( $("f1"), 'keyup', onKeyHandler.bindAsEventListener( this, "f1Up" ) ); Event.observe( $("f2"), 'keyup', onKeyHandler.bindAsEventListener( this, "f2Up" ) ); Event.observe( document, 'keyup', onKeyHandler.bindAsEventListener( this, "docUp" ) ); Event.observe( $("body"), 'keyup', onKeyHandler.bindAsEventListener( this, "bodyUp" ) ); Event.observe( window, 'keyup', onKeyHandler.bindAsEventListener( this, "windowUp" ) ); Event.observe( $("f1"), 'keydown', onKeyHandler.bindAsEventListener( this, "f1Dn" ) ); Event.observe( $("f2"), 'keydown', onKeyHandler.bindAsEventListener( this, "f2Dn" ) ); Event.observe( document, 'keydown', onKeyHandler.bindAsEventListener( this, "docDn" ) ); Event.observe( $("body"), 'keydown', onKeyHandler.bindAsEventListener( this, "bodyDn" ) ); Event.observe( window, 'keydown', onKeyHandler.bindAsEventListener( this, "windowDn" ) ); Event.observe( "clr", "mousedown", clearHandler.bindAsEventListener( this ) ); swfobject.embedSWF( "tmp.swf", "f2", "100%", "20px", "9.0.0.0", null, {}, {}, {} ); } function clearHandler( evt ) { clear( ); } function clear( ) { $("log").innerHTML = ""; } function onKeyHandler( evt, dn ) { logIt( "javascriptKeyEvent:"+dn ); } function AS2JS( wha ) { logIt( "actionScriptEvent::" + wha ); } function logIt( k ) { var id = document.activeElement; if (id.identify) { id = id.identify(); } $("log").innerHTML = k + " ** focuedElement: " + id + "<br>" + $("log").innerHTML; } Event.observe( window, 'load', ic.bindAsEventListener(this) ); </script> </head> <body id="body"> <div id="f1"><div id="f2" style="width:100%;height:20px; position:absolute; bottom:0px;"></div></div> <div id="clr" style="color:blue;">clear</div> <div id="log" style="overflow:auto;height:200px;width:500px;"></div> </body> </html> Here is the as3 code: package { import flash.display.Sprite; import flash.display.StageAlign; import flash.display.StageScaleMode; import flash.events.KeyboardEvent; import flash.events.MouseEvent; import flash.events.Event; import flash.external.ExternalInterface; public class tmpa extends Sprite { public function tmpa( ):void { extInt("flashInit"); stage.align = StageAlign.TOP_LEFT; stage.scaleMode = StageScaleMode.NO_SCALE; stage.addEventListener( KeyboardEvent.KEY_DOWN, keyDnCb, false, 0, true ); stage.addEventListener( KeyboardEvent.KEY_UP, keyUpCb, false, 0, true ); stage.addEventListener( MouseEvent.MOUSE_DOWN, mDownCb, false, 0, true ); stage.addEventListener( MouseEvent.MOUSE_UP, mUpCb, false, 0, true ); addEventListener( Event.ACTIVATE, activateCb, false, 0, true ); addEventListener( Event.DEACTIVATE, dectivateCb, false, 0, true ); } private function activateCb( evt:Event ):void { extInt("activate"); } private function dectivateCb( evt:Event ):void { extInt("deactivate"); } private function mDownCb( evt:MouseEvent ):void { extInt("mouseDown"); } private function mUpCb( evt:MouseEvent ):void { extInt("mouseUp"); } private function keyDnCb( evt:KeyboardEvent ):void { extInt( "keyDn" ); } private function keyUpCb( evt:KeyboardEvent ):void { extInt( "keyUp" ); } private function extInt( wha:String ):void { try { ExternalInterface.call( "AS2JS", wha ); } catch (ex:Error) { trace('ex: ' + ex); } } } }

    Read the article

  • Best server-side javascript servers.

    - by fmsf
    Hey, I've been wondering to try out server-side javascript for a while. And I'm finding a good amount of servers, like: Node.js Rhino SpiderMonkey among others. Could anyone with experience on server-side javascript, tell me which are the best engines? and why? I like the Node.js because it's based on Google's V8 engine. And seems easy to use. But some feedback on what you would choose would be great. Edit: Some benchmarks for Node. I'm thinking on going with this one but feedback is still welcome. Thanks

    Read the article

< Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >