I know javascript can't do this natively but with flash or java it should be possible right? I'm thinking of doing something along the lines of a tuner ( [URL] , but a bit different). Any framework for reading notes from the mic with javascript? Preferably something which takes care of all the flash/java integration.
I am creating a web interface where a user can click on a series of pictures and then click a 'play' button to play the sound (wav) files which are behind each picture in sequence.
So I have an onclick event attached to each image which loads the name of the wav file into an array. The play button loops through these sounds and plays them one at a time....or so it is meant to!
I have found that all the sounds play one on top of the other and I have been searching for hours to find a way to make them play one after the other.
I don't want to use a flash interface as I can't convert them all to flash. Does anyone know of a way to do this using javascript? I would be very very grateful if so.
I'm trying to get sounds to play on image mouseovers using dreamweaver 8, and I found out that the code it generates to do this only works for IE. Is there a way to do this so that it will work with most of the popular browsers? I don't care if it can be done with dreamweaver or if I have to hand code or copy code from somewhere, I just want it to work.
Here is what DW creates:
function MM_controlSound(x, _sndObj, sndFile) { //v3.0 var i, method = "", sndObj = eval(_sndObj); if (sndObj != null) { if (navigator.appName == 'Netscape') method = "play"; else { if (window.MM_WMP == null) { window.MM_WMP = false; for(i in sndObj) if (i == "ActiveMovie") { window.MM_WMP = true; break; } } if (window.MM_WMP) method = "play"; else if (sndObj.FileName) method = "run"; } } if (method) eval(_sndObj+"."+method+"()"); else window.location = sndFile; }
I want the code for a button effect. The button is for a graphic button, on clicking it it changes its graphic to an ('on' image), plays a sound effect, then changes graphic to the first image('off' image), then it goes to a link.
Files would be Images/offbutton.jpg Images/onbutton.jpg sound/buttonclick.wav
I've heard a lot of talk out there about how HTML5 will replace Flash and Silverlight. And the iPad is already dumping Flash. So, for those of us who use Flash for more than just video, how are we supposed to attach sounds to events with JavaScript? Is there a JS API for accessing the audio in HTML5 that allows event based sound effects? (SoundManager embeds a flash sound player)
I run a website and we have an ad agency who despite our repeated requests, does not filter run of network ads to make sure no popups are served or ads with sound are run. However, we can't afford to drop them and no other agency is going to give us the fill rate/CPM we are currently getting. So we need to take matters into our own hands, and I hope it's possible. We need to put a script on our site which overrides any javascript/flash served via ads and prevents popup windows from opening (or auto-closes them). We also need a way to disable sound within the current tab. Is that possible at all?
I need to play sounds with javascript. When the user clicks the button it will run the function and play a sound either from the source or embedded into the website (which ever way works).
I have this div and I AJAX html into it, the problem is that the AJAXed html does not interact correctly with the rest of the page. I think i need to re parse the div, but not sure... Does anyone know how to have it parse the div? or a better way to fix this?
This is the div that the html is AJAXed into: <div id="insert_searchs" class="update"> </div>
I am using the infamous hidden IFRAME trick to manage some image uploading. My server-side ASP page passes back XML to indicate success or failure. It was a snap to grab this in FireFox and parse it using the standard JQuery methods. Then I spent most of an afternoon trying to do the same in IE, I finally found this page and this comment: [url]
JavaScript, IE, XML, IE uses MSXML and an XSL stylesheet to transform the XML to some HTML document that pretty-prints the structure of the XML. That way when you access the iframe document you indeed access an HTML document that IE renders. However IE stores the original XML document in an XMLDocument property of the HTML document object so to access the XML data (and not the HTML document) you can do e.g. var xmlDoc = window.frames.frameName.document.XMLDocument; [...]
The solution thus ended up as follows:
From there I can use all of the normal JQuery code to traverse the XML. Anyway I am not sure if this is an IE bug, a JQuery bug and/or presumably specific to this wacky IFRAME scenario versus a normal document.
I am trying to get two values from a web service response.
The web service was called using jquery $ajax:
$.ajax({ url : "http://localhost:3032/ufs/integration/copymoveTerm", type : "POST", dataType : "xml",
[Code]....
All I want to do is to get the values of UNDO_COUNT and MSG into separate variables.
Here is the jquery I am trying to use:
function undoSuccess(xmlData, status, xmlResponse) { $(xmlResponse).find('res:OUTPUT').each(function () { var undoCount = $(this).attr('res:UNDO_COUNT).text(); var msg = $(this).attr('res:MSG).text(); }); }
I have tried it with and without the name space "res:". I have tried it with xmlData and with xmlResponse I have tried changing the web service so that UNDO_COUNT and MSG were elements in their own right or were attributes of OUTPUT all without success it just bypasses the initial find on OUTPUT.
I am trying to parse a value into a plugin, but it does not work. an alert(myborderimage); shows that I am getting the value, but I cannot parse it to jQuery $(document).ready(function(){ var myborderimage = $("#myborderimage").val(); $('#myborder').borderImage('url("borders/+myborderimage +") 30% 35% 40% 30%'); });
New to this, worked through the w3c tutorials and am really fascinated by some of the concepts. I'm only familiar with html, css, js (basics), so am trying to keep things as simple as I can for this.
For simplicity I'll use books.xml with a listing of books. Each book has a <title><author><year><price> and <image> element. The images are stored in a folder called "images" a path is listed in the xml document.
Using js and an array I can loop through the xml file and have it extract each node into a table, if I mouseOver a ROW in the table, it displays that listing in a DIV above and I would like it to display the image/thumbnail for that particular listing within another div called thumbnail which is in the same location regardless of which listing you mouseOver.
if (window.XMLHttpRequest) {// code for IE7+, Firefox, Chrome, Opera, Safari xmlhttp=new XMLHttpRequest(); }
[Code]....
So the way this looks is there's a grey div. At the top it says listing, and when the body loads it lists the [0] first entry from the array. To the right of this is a small div called thumbnail that is empty and I would like it to load the relevant image from the path in the <image> tag in the xml file.
Below the listing is a table with 4 columns (title, genre, price, image) and an equal number of rows to the number of listings in the xml file. Under the "image" column it just shows the path to the image.
So how do I tie the empty thumbnail div to the listing so it'll just add the path from the xml <image> tag into a <img src="pathnamefromxmldocument">
I'm playing a bit with the goo.gl API and Javascript using the jsonlib like this:
function googl(url, cb) { jsonlib.fetch({ url: 'https:www.googleapis.com/urlshortener/v1/url?key=<my-api-key>', header: 'Content-Type: application/json',
[Code]....
PS: I've removed my API Key from the code to make it public, on my test the API Key is there and it is correct, since I can see the valid JSON if I click on the fetch:1 on the Safari Debugger
I have a variable which contains a string of html that I wish to output into a content div on the click of a button.I can toggle the content of the div with the string above, but I wish to include the ability to parse that string before output, so I can translate its language before its output.I can easily do this once the html is output into the content div using the JS HTML DOM, but due to this conversion not being instant I'm looking into ways of translating this text before it is output, so changing the string stored in the variable html.
I have the need to grab the HREF value from a link to an image, parse it, append it with "-144x127" and reassemble it for use as the src for a dynamic thumbnail. I have the following worked out, but... surely there's a better way?
[Code].....
Of course it would be a lot easier to split on the file extension, but I won't necessarily know whether the file is a GIF, PNG, JPEG... so...?
I have a string that contains n items. Each item start with a '@' and the item itself does not contains the '@a'.
For example the string looks like: "@one@two@three@four"
I have to output this string as "one, two, three and four". So in fact the first '@' can be removed, the next except the last replaces by ", " and the last one by the word "and ". Is there a simple way doing this?
The XML my PHP app is returning to my JavaScript function has elements in it that contain special characters... specifically the ampersand & which hoses up the data. ex: Company Name = "K & B Construction".
Can anyone give me some idea of how I make the data coming out of my database translate as literal characters in the XML output?
I am looking for a javascript function that will parse a query string. Parameters are passed in the url: url?a=3&c=5&etc An array is returned that uses the variable name as the index.
I am having difficulty displaying a specific key from a json file. I am trying to parse the following json file using query:
[URL]
I am using this type of function to parse the data:
$.each(json.route,function(i,route){ <!--add a paragraph tag to the results div and enter the speficied key--> $("#results").append('<p>Result: '+ route +'</p>');
Using this I am able to print all the keys from the route but I am not able to print a specific key.
What I want to do is just get the results for the key "fuelUsed" using this method: