I am trying to learn JavaScript, I am creating a test page like a Learning page for children, where a child selects "Apple" and then selects repeat 3 times or times etc and the it plays what ever the user selected that many times, the user can even select "Apple", "Ant", "America" and select repeat any number of times (say 2 times each) and the media player will play like this "Apple", "Apple", "Ant", "Ant", "America", "America". Now I downloaded all these from different sites in mp3 format. How can I make the program to do what I want to do as said above, simple code. for i IN (all selected)
What I need to do is load wav files into an array and simply have these play from the array onto a page when it loads. I have an image slide show and I want to have a sound effect play over it and then when the image changes another wav will play but first just want to have say 5 wav files play in order from the array.
I have the following
<script language="javascript" type="text/javascript"> var aySound = new Array(); aySound[0] = "1.wav"; aySound[1] = "2.wav";
How can I play midi and/or audio files using JavaScript? I'm hoping there are some calls/APIs I can use that I am unaware of. My JavaScript book from O'Reilly seems rather lacking in this area.
I am new to JavaScript and self taught, so please bear with any terminology I use incorrectly. I have an array defined. I am trying to access this array multiple times (10) in the HTML. It worked on the first drop down, but when I added the next one it errored. Not sure if what I am trying to do is possible or if I am going about this the right way. Below is the code:
Code: var Engagements = []; Engagements[0] = new Option("",""); Engagements[1] = new Option("Asset Management","Asset Management"); Engagements[2] = new Option("Autoclave","Autoclave");
All semester, I have been working on a single web page, modifying it repeatedly to add features (using CSS). This last assignment involves javascript, something we've just barely touched on. I can't seem to figure out where exactly the event handler should be placed. No matter where I move it, it alters the way the page displays. In the right column, there are descriptions of 2 musicians, each includes a header, paragraph, and a thumbnail (that links to a larger image) on the far right side, next to the text.
I need to add this <a href="#" onmouseover= "alert( 'Concerts sell out quickly so act fast!');">Melanie Morris entertains with her melodic folk style.</a> to this <h3>January</h3> <a href="melanie.jpg"><img src="melaniethumb.jpg" alt="Melanie Morris" width="100" height="97" align="right" border="0" hspace="150" /></a> <p class="content">Melanie Morris entertains<br /> with her melodic folk style.<br /> Check out the podcast!<br /> CDs are now available. </p>
The problem is, the book doesn't explain where to add it or have any examples of using onmouseover in this particular way, so I've spent forever trying to figure it out. In some places, it makes the sentence shows up twice. In others, it completely moves the picture out of position and/or extends the "Melanie Morris entertains with her melodic folk style" all the way across the page (thus, pushing the picture down). I initially had a very hard time making this page layout work (specifically, getting the images to show up in the right place).
The best I am getting from this is adding the mouseover immediately after the paragraph class and right before the Check out the podcast! line...removing from the paragraph the text that is repeated. It seems to look OK on IE, both full screen and when I make the screen smaller. Foxfire is displaying it less reliably though. As soon as I make the window smaller, the layout shifts. I know that it's normal for different browsers to display differently.
Any way to work around the rules so that it looks right, but is not, in fact, coded properly. <h3>January</h3> <a href="melanie.jpg"><img src="melaniethumb.jpg" alt="Melanie Morris" width="100" height="97" align="right" border="0" hspace="150" /></a> <p class="content"> <a href="#" onmouseover= "alert( 'Concerts sell out quickly so act fast!');">Melanie Morris entertains with her melodic folk style.</a> Check out the podcast!<br /> CDs are now available. </p>
I am using window.print() for print the web page, its working fine but i want more than one copy each and every time the the window will pob and ask me to select the printer name instead of that i want to pass the printer name through code if possible to print like this.
Anyone know of a good tutorial for making an object move repeatedly while a key is held down (ie move right 1px every second while right arrow key is held?)
I am using the youtube chromeless player and embeding videos with loadVideoById() method problem is that videos with an id that contains an underscore or dash dont play although they play in the normal player. I also tried replacing with a hex value in querystring i.e (%5f) but that did not work I also tried loadVideoByUrl() method with several urls but still they don't load. here is my code
function switchToPlayer(ytid){ var params = { allowScriptAccess: "always"}; var atts = { id: ytid,onmouseover: "this.playVideo()",onmouseout: "this.pauseVideo()"}; swfobject.embedSWF("http://www.youtube.com/apiplayer?border=0&enablejsapi=1&playerapiid="+ytid, 'cell'+ytid, "150", "120", "8", "scripts/expressInstall.swf",null,params,atts); } [Code]....
I have designed a mail service in java.In my compose page,i want to attach some excel files of text files and to send it.After sending i want to store it my database.Then how can i download or open that file after opening that recipient mail inbox.
I have the following JavaScript (see below). The script requests an XML file from the server and displays it on the page.The script works fine when the requested XML file is stored on the same server as the script.The problem is when I try requesting an XML file from an external server such as the National Weather Service. I get an error. If I take the XML file from the National Weather Service and save it to my server it works. Why can't I use my script to request XML files stored on external servers?
Javascript Code
Code:
window.onload = initAll; var xhr = false; function initAll() { document.getElementById("makeTextRequest").onclick = getNewFile;
In my quest to implement ajax for the first time i've hit a brick wall. i've been searching for hours for a solution but with no success. Here is the problem.
[Code]...
why is it not working? my PHP code is outputting the contents of the xml document.
I want to write a javascript to list of all files in a folder including files in the subfolders. This is for the scorm purpose to list all the files. some examples are listing files but not listing the files inside the subdirectories. I want the file's full path like C:Documentsjavascriptwilson.js like this.
I have four folders and each folder has one images, let say ( images-one.jpg, images-two.jpg, images-three.jpg, images-four.jpg). now,in index.php page there are four buttons, each buttons for each images. if i clicked button numer two for images-two.jpg, and then it will show that images name from that folder in index.php page. and then if i reload same index.php page or refreshed same page, i want to show SAME images that I clicked before which is images-two.jpg. how can i write that code to show images from four files, each files are in each folder.
What is the correct way to work with multiple language JavaScript files? So how to use your PHP language variables in your JavaScript files? The way I do it now is create JavaScript files like 'script_js.php' like this:
I have a site [URL] It shows 9 series. Each series has a set of artists and titles. The images are loaded dynamically.
I would like to be able to click on an image of an album and play an mp3 file associated with the image. The <embed> tag doesnt need to show a playlist, in fact, I want the player to be hidden.
I've created an html page where I will present a list of mp3 tracks which user can listen to. When a user clicks on any track, a pop-up will get open which will play that track. The url of this pop-up, which is partly completed is, [URL]
For this I've googled around and found a solution. But this is working fine in IE but not in FF. This solution uses a "m3u" file for the purpose. And I've got this from here: [URL](please scroll down).
In FF, it says to download a plugin but when I click, it searches for the plugin and displayes error message as "No suitable plugins found Unknow plugin(audio/x-mpegurl)"
I want to commit that I do not have quicktime installed on my system but window media player which is getting used when page is viewd in IE.
how to make this work. I've also set the MIME type under HTTP Header in IIS 6.0. The header set are: .m3u; Mime type: audio/x-mpegurl and mp3; Mime type: audio/mpeg
Though, it is an ASP page but nothing is ASP code over there, completely, JS and HTML
Code for sound.asp file
Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML> <HEAD> <script language="JavaScript" type="text/javascript">
I have about 40 images on an educational website. When the user clicks each image, a different one second long mp3 should play without opening a new window. Is it possible to do this with javascript?
I have built an admin area for employees of a business. Once logged-in, if they sit idle for 5 minutes their session will be killed ( the time may vary depending on the employee ). I do all this with php but don't really know much about javascript.
What I would like to do is start playing a small sound repeatedly when the employees session is about 30 seconds from expiring. ( this will give the employee time to click on a link to keep their session alive )
So when the page loads, I would like to pass a length of time in seconds to a javascript. So if the employee can sit idle for 5 minutes, that would be 300 seconds. Minus the 30 seconds that I would like the alarm to be playing for which gives us 270 seconds. ( I'll pass this number to the script with PHP, the script does not have to figure this out... just to be clear. )
So I'm looking for something like this: - On page load, tell javascript to count down a specific number of seconds ( 270 ) - When the countdown reaches 0, start playing sound file repeatedly.
Sounds easy enough but I haven't been able to find anything like this yet. The only ones I've seen actually display the countdown which I don't want. I want this to count down invisibly. Oh and it should hopefully work in both IE and Firefox.
I have been looking for the answer for a long time, but could not reach to any answer. I am a novice web designer, have very little knowledge on web programming. I hope someone here could help me with the following. The problem scenario is this:
I have a webpage where I have listed some classical songs so that page visitors can listen to song online. All files are in Real Audio format either with .rm or .ra extension. These individual audio files are linked with .ram files so that when visitor’s clicks on the song title, this .ram file launches RealPlayer and the clicked song starts playing. Once a song is played it stops. If user wants to hear another song, user needs to click on another song title to play that song. This is annoying for users.
However, I have seen on some websites where user can select the songs by clicking on the “Check Boxes� next to each song titles and play by clicking on the “Play� button. Therefore, user can select lists of their favourite songs by clicking on check box and play these together one after another. There are two other buttons also available for users: “Select All� songs and “Reset�.