javascript

What is the best ajax tutorial site

Yes i know ajax is a silly term etc... but i need a decent thorough tutorial? ...

Removing Firefox Star Icon and Bookmark Icon

I am building an application which has requirements stating that all browser features must be disabled. (It's a test taking application and they are worried about security/cheating.) I popup a new window so that I can make it fullscreen, disable the menu bar, tool bar etc. However Firefox still has two icons remaining that I can't figur...

Return JavaScript(). 4 good actions - 1 evil action !

The bad 'return JavaScript' goes like this: This is the action link that gets selected. Ajax.ActionLink("Sign Out", "LogOff", "Account", new AjaxOptions { }) This is the action. public ActionResult LogOff() { FormsAuth.SignOut(); return JavaScript("ClearDisplayName()"); } The JavaScript is never called ! ...

jQuery UI Datepicker go to date URL

Does anyone know if it is possible to use the jQuery UI Datepicker, and when clicking on a date, set the document.location to that date, appended to a preset URL? So, if I clicked on one of the dates, it might direct me to: http://www.mysite.com?date=2009-10-25 I need to just use this as a quick way to quickly navigate my website cale...

How to run JavaScript code in sequence?

I'm having a JavaScript issue where I need a function to run and complete before another function is run. Here's the code I need to run and complete first. As you can see, I'm looping through all address input fields in the form and geocoding them through the Google Maps API. $('#form input:text.address').each(function() { var ad...

Replace all references to external files (images, CSS and JavaScript) with flat directory references?

I'm trying to figure out if there is a way (using JavaScript, or jQuery) to go through an entire HTML file replacing all references to external files and replace all the references to files in other directories with the same named file, but without directory information. For instance, in the HTML text: scripts/script.js gets replaced ...

Override javascript Window.opener

I have a pop-up window from an exiting application that I want to trap inside a lightbox using an iframe. This is working well except for one thing. When the pop-up is "done", it calls Window.Opener to reload the parent window. I want to override this so that I can do something else when it attempts to call this function. I'd prefer ...

change html text from link with prototype

Hello, a simple question here Is there a way to change the text "click here" <a id="a_tbnotesverbergen" href="#nothing">click here</a> in this link using prototype? ...

Sorting Divs in jQuery by Custom Sort Order

Greetings Y'all. It's my first time asking a question but having perused the site for about 8 months I think it's an appropriate one. Basically I'm trying to re-sort the child elements of the tag "input" by comparing their category attribute to the category order in the Javascript variable "category_sort_order". Then I need to remove d...

JavaScript for MP3 playback

Is there a JavaScript library available that can playback an MP3 or related music file? The JavaScript would be fed the MP3 from the server and stream it back over the browser. ...

JavaScript identity operator on strings

I'm trying to write a prototype for determining if a string is empty. It's really just playing with JS and prototype, nothing important. Here's my code: String.prototype.IsEmpty = function() { return (this === ""); } Notice I used the === identity comparison instead of == equality. When I run the function with the above definition: ...

how to fix a document.body is null-error

Hi, I'm having a document.body is null error in my javascript because I use: $(window).width() as value to assign to a variable in my $(document).ready(function(){}); I would be very grateful to anyone who could help me with this. Kind regards edit: sorry if this all was unclear. I have a demo at: http://www.wpmonk.com/demo/...

AddThis button will not work inside AJAX, but will work normally.

Basically, this is what I'm doing. User visits site, loads "index.html" Within index.html, it automatically loads, through AJAX, "details.html" into a DIV. I put an ADDTHIS button on "details.html". However, for some reason , the roll-over doesn't work. When I visit details.html in the browser, the roll-over works. I'm guessing it's be...

Submitting form located within another form

Take a look at this html: <head> <title>Test page</title> <script type="text/javascript"> function submitForm() { document.getElementById("form2").submit(); } </script> </head> <body> <form id="form1" name="form1"> <input type="hidden" name="test1" value="test" /> <form id="form2" name="form2" action="http://go...

What is the opposite of escape, in javascript?

Right now, it is displayed as: how %26 why It should be: how & why ...

Modal box + checkbox + cookie

I would like to achieve the following: On homepage load, display modal box Within modal box, display a form with a single mandatory checkbox On checking the checkbox, hit submit and close the modal box, proceed to homepage Remember this checkbox tick preference using a cookie On a users return to the homepage, if they have checked the ...

Tutorial/Example of how to implement "Browse A to Z" for a website

I have found that simply googling this does not return what I am looking for. I am to find something simple and easy. I don't know if this requires javascript or not. I know I can "View Page Source" but I was hoping to find a tutorial. Some examples of what I am talking about can be found here: -IBM -Auburn -About.com ...

Why does prototype's Ajax request take so long to process?

I'm using prototype.js and its Ajax object to implement an interactve graph widget. I generate an XML query for the data the user wants, POST it to the server with an Ajax.request, and it seems to take forever with Firefox. The Firebug console seems to show the POST finishes with 200 OK in about 700 ms, but the onInteractive() handler ...

Need some help synch'ing outer loop counter with dialog.onconfirm()

I am writing a game for Facebook. IN the following code, I have a problem. I have a for loop executing, and in that loop, I call a dialog and implement 'onconfirm' for the dialog. The problem is that I need to access th e loop counter inside of the onconfirm function. But because the onconfirm is called outside of the scope of the for lo...

Running javascript code with html form submit

Hey, I'm using a html form that is used to log people into my website, I am building it so it uses AJAX (jQuery) but I'm having some problems. Here is the JavaScript: function validateLoginDetails() { $('[name=loginUser]').click(function() { $("#mainWrap").css({ width:"600px", height:"200px" }); $("#interfaceScreen"...