I am trying to amend the showHint Function from w3schools. I adapted the basic script to allow multiple calls and I don't have a permanent array so I made my php page create one from the table. Have tried to play around with this a bit but I currently get nothing.
I've just found out that a piece of code is not working as expected in certain browsers - but the way in which it goes wrong is not consistent, so maybe it's something wrong with my code.Oddly enough, it works exactly as I was expecting when viewed in IE.Here's the code...
I am using a javascript audio player on a webpage that has an option to download the track by right clicking on a link called 'mp3' at the end of each track in the playlist. When the user right clicks on the track name however all that can be downloaded is an html file.
I am trying to find a way of changing this so that right clicking on the track and choosing the 'save link as' option will download the mp3. I have been led to believe that I can use a script such as this one:
[URL]
to generate a custom content menu for downloading tracks, or somehow downloading the mp3, but I am at a loss at to how to do this.
Here's a screenshot of a track in the playlist:
[URL]
And here is the source:
Code:
{name:"foster manganyi na tintsumi ta tilo - zion (ndzi teke riendzo no. 1) <span style="color:#BDBDA1; font-size:12px;">[from nick]</span>",mp3:"./songs//nick/zion.mp3"}
I have some javascript the works in conjunction with a flash video player. When a user selects a video in the Flash video list and new video is called and begins to play. Also, when that video is selected a function called "doOnMediaLoad()" is called and inside of that function I have put a call to another function that I wrote in the same script.function that is called when user selects flash player video list.
function doOnMediaLoad(e) { vcomments_changed(e.id); //call to my function }
I have some javascript the works in conjunction with a flash video player. When a user selects a video in the Flash video list and new video is called and begins to play. Also, when that video is selected a function called "doOnMediaLoad()" is called and inside of that function I have put a call to another function that I wrote in the same script.
I'm using the Google AJAX APIs, but some reason google.load works when run through normal javascript, but if I call the method from my jquery ready function it doesn't work. Code and output is below
window.loadFirebugConsole is not a function If I comment out line 3 in code.js, the console debug runs okay, so the ready function is running okay. Even though there's a reference to Firebug, the same error occurs in Safari too. Nothing on the page loads.
I'm using jQuery 1.4 to hide a div (#cartPop) when the "close" link inside of it (#cartPop a) is clicked. Since I'm using animate() to fade the div out (opacity), I also have to use hide() to get rid of the div once it has faded out (otherwise the invisible div, which is on a higher z-index, blocks the elements on a lower z-index).
Code:
The problem is that the hide() function calls immediately without waiting for the animate() function to run. Even if I append a delay() function before hide() like so:
I'm wanting a table cell click event to remove and replace the table it was clicked on, however I'm finding that as it's deleting the original table object the actual running event code is being replaced and the function is bailing.how I can call the delete/refresh function from outside the event's function scope?
I have just started learning JQuery and have a doubt in the below code. $.get('myhtmlpage.html', myCallBack);The doubt is should the 1st parameter of the get function be a HTML file or can it be a unction name?
I want to call java function in javascript.In which we pass one parameter to function and its returns String value which I want to display in alert message.
I have a real perplexing issue. In two separate "projects" I had code that displayed checkboxes - when clicked, they would fetch information from a db and display it in the div below. I had code that displayed a jquery date-picker - when clicked, it would fetch information from a db and display it in the div below. My issue comes with this:
I have a function I call to see if people leave form fields empty. I have been asked by a client to check to make sure of the person's date of birth as well. They gave me the script, however, I am unsure how to do implement it. How do I add this to my existing checks? Code:
I am trying to minimize the amount of script that I use on my website. I have sections of each page; each section has the same basic layout. The divs and images that I want to make appear and disappear all have nearly identical ids, the only difference is the number at the end of the id.Is there a way to get one script to automatically detect which id number has been clicked and then show all elements with the same number at the end of the id? I would also like it to hide the elements in the hide function below (basically they are the elements that do not share the same id number).I currently have everything working the way I want it to using multiple functions like the one below but I woul
I have 2 javascript files: 1 containing generic functions for my site used sitewide and another for a particular web page containing just the javascript for that page. The page is also calling the jQuery javascript file.
What I want to do is have a javascript function in my main javascript file which uses features of jQuery such as show, hide etc. and then I want to call this javascript function from the other page specific javascript file.
[Code]...
This does not work and so was wondering if anyone can point me in the right direction as to how to achieve this or something similar.
I am having a strange problem with a javascript function that does not return the value but returns the code inside the function. My best guess is that I am incorrectly calling the function hasLandedOn()and jquery is interpeting it. Why is this happening? I highlighted the parts in red.-Tom ReeseThe following is returned NOT the variable imageName.
function hasLandedOn(){ var selectorLoc = $("#selector").offset(); var imageName = "";
how can i write a function that accepts a callback function?[URL].. i want myFunction to load some data via(an unordored list actually) load method end then somehow to return the wrapped elements for the callback function, exactly like load() does.
I have done some searching on the discussions here and have found info on waiting for fadeins, etc. to finish and then calling another function. However, I am needing something a little different. I am needing for function 1 to process and then call over to function 2 once it's finished. Here is my code:
The javascript function addRowToTable() is called by a button, and replies a set of elements (select, input, checkbox) of the form. In this function, the creation of select calls another function CliK(sel.id)The problem is that this function tells me error "object required" as if the select Id was not "type" or the checkbox id was not "key" here I go wrong?
function addRowToTable() { var tbl = document.getElementById('tblSample');
I'm trying to make a time script for an app I'm making (this is not an HTML document; it's a .js file to be used with Titanium) however I'm having trouble getting the function to display and update.
function updateClock() { setInterval ( 'kiTime()', 1000 ); } function kiTime () { //Get current date and time [Code]...
If I use kiTime() under the text field I will get the current time (or at least the time the app was opened), however if I call updateClock() it's blank.
I try to make something where you add elements, and can delete elements later by calling a simple function. I simplyfied it right here: It works only to add the paragraphs, but the delete function doesn't work. Tried already to debug with an alert message after each rule... but the problem is with this rule I guess:
I have what I think is a strange issue but others may see something I am missing.I am using AJAX functionality to process a php script on a server and then place the output of the script into a div element.Here is the code snippet
Code: function doWork13(typeCode,colorBlockName,objectCategory,imgID){ httpObject = getHTTPObject(); if (httpObject != null) {[code]....
This code shown here works perfectly BUT....I do not want the alert message to be there. When I remove that line of code the script fails to function. There is no error just nothing happens.The function is to replace one image with another and the variable in question is simply the ID tag of the particular image being modified.As I said it works with the alert but does not with out, could it be a timing issue in that the alert gives enough time for the if statement in the setOutput13 function become TRUE
I have a document that can contain any number of iframes which have further copies of the same document (and so on). In practice, we shouldn't ever have frames within frames, but I'd like to make the implementation a general case.
Various of the functions in the parent document need to call themselves in the child documents with the same parameters as they've just been passed.
Now, I can stick a loop in each function that goes throught the window.frames array and calls the function for each frame, but for I'd like to write a function to do this.
It's at this point that my brain explodes. If I limit it to a single parameter we can do: