javascript

Is it possible to mix MooTools with Prototype and JQuery UI?

There are some things accross these which I'd like to use. I hope they've choosen clever naming conventions to prevent collisions with all their functions and classes? Does anyone use all these at once in one site? ...

Is Objective-J essentially JavaScript?

I've been stumbling upon Objective-J. It should be a superset of JavaScript ... but how's that possible without a browser plugin or some addon? How can they drive around the syntax of JavaScript and make it look like Objective-C code? I mean... COOL... but I don't get it ;) Must I compile that Objective-J code before it goes to the brows...

Javascript Login Browser PopUp

If I have a different app on x-number of subdomains, it seems easiest to just have login be through the browser/javascript popup. Is this safe? Is it better to do this than server-side authentication? Do you have a little pastie on how to make the authentication popup and pass the info to say Rails? ...

AspxGridview with checkbox

When i click "chk" checkbox, I want the row values (ID,Name,NameTwo) <script type="text/javascript"> function Response() { } function grid_SelectionChanged(s, e) { s.GetSelectedFieldValues('ID;Name', GetSelectedFieldValuesCallback); } function GetSelectedFieldValuesCallback(values) { var s = ""; ...

The implications of the jquery plugin periodicalupdater

Hi all, In one of my previous questions, I've asked how I would replicate facebook's "new message" alert, that is shown in the head section of their website inline with the "inbox" link. The functionality allows data to be updated live, without the user refreshing their browser, and has since been integrated further into their technolog...

Dropdown currentIndex onchange

there is a dropdown with 5 options. Currently,option 2 is selected.The user selects option 4 now.The onchange event gets fired which is caught in a JS function listening for onchange on the select. In the JS function, I can check easily the index of the option selected by the user using the selectedIndex property.However, I want to also...

A CSS string – select everything up to third comma

I'm writing a custom highlight animation with Scriptaculous that includes a CSS3 glow. I get the box-shadow style and need to split it at the rgba alpha value, then vary that value to get the shadow to fade. $('fresh').style.MozBoxShadow would return 0 0 20px rgba(163, 238, 71, 1.0) 1.0 is the alpha value. I need to split it so tha...

Replace space with dash and make all letters lower case using javascript

I need to reformat a string using jquery or standard javascript Lets say we have Sonic Free Games I want to convert it to sonic-free-games So white spaces replaced with dashes and all letters converted to small letters Any help on this please ? ...

is it possible to convert a radio field to look like a checkbox?

i was wondering if eitehr through css or javascript that if its possible to make a radio field look like a square instead of the circle? it was a request from a customer, kinda weird but they want it. ...

firefox extension. How to catch onload event?

So..got scriptable extention for firefox. it's somelika a webspider, written in javascript. what i want to do: i want it load a page, them do some job, then go to another page (using an url from the loaded page). After the new page is loaded - the spider do the same job. Algoritm is somelike this one: wait till the page is loaded do ...

is javascript multithreading possible with IFRAMEs

Hi All, I'm currently playing with the idea of using IFRAMEs to implement a very simple multithreading engine. However my initial results are showing me that running in threads is slower than just running in a single thread. My test is: Single Thread var start = new Date().getTime(); for (var i = 0; i < 300; i++) { /* Do costly proc...

JavaScript/HTML: Wiring element events

I recently read a blog post. In it, the author told readers to wire up all their "onclick" events not inline, but when the DOM's ready, like this (jQuery example): <script type="text/javascript"> $(document).ready(function() { $("myElement").click(... }); </script> This, for all the elements on the page with events attached to the...

only keep A-Z 0-9 and remove other characters from string using javascript

i am trying to verify strings to make valid urls our of them i need to only keep A-Z 0-9 and remove other characters from string using javascript or jquery for example : Belle’s Restaurant i need to convert it to : Belle-s-Restaurant so characters ’s removed and only A-Z a-z 0-9 are kept thanks ...

lightbox on newly inserted links not working

$(".overlay").lightbox(); $('.overlay').live('click', function(e){ e.preventDefault(); var url = base_url + 'ajax/getcolorboxhotel'; var data = $(this).next('span').text(); $('.hiddencontent').load(url, {id:data}); }); Please help! The code above works with links in the page while new links loade...

JSON, Javascript & Dynamically Created & Populated Tables

I've got the following JSON structure that defines a table and it's data. var arrTable = [{"table": "tblConfig", "def": [{"column": "Property", "type": "TEXT NOT NULL"}, {"column": "Value", "type": "TEXT NOT NULL"}], "data": [{"Property": "VersionNumber", "Value": "1.0"}, {"Property": "ReleaseDate", "Value...

How to display a custom google search result in a new page

Am using Custom Google search in my web page Code: <div id="cse" style="width: 100%;">Loading</div> <script src="http://www.google.com/jsapi" type="text/javascript"></script> <script type="text/javascript"> google.load('search', '1', {language : 'en'}); google.setOnLoadCallback(function(){ var customSearchControl = new google.s...

Object Creation in javascript.

Hi. Just for the kicks i am trying to create a simple data object in javascript. Here is the code. var roverObject = function(){ var newRover = {}; var name; var xCord; var ycord; var direction; newRover.setName = function(newName) { name = newName; }; n...

IE javascript html encoding weirdness

Put this in your location bar in IE javascript:location.href='http://www.google.com/search?q=something&amp;lt=bar' Watch in horror as it helpfully thinks &lt actually means &lt; and makes it a <. WTF is going on here? Other browsers don't do this. How do I prevent IE from doing this? ...

XML for Ajax PUT or POST request

I'm looking to write some Javascript which will make an Ajax PUT or POST request to an HTTP server. I'm assuming that the information which gets passed as the argument to request.send needs to be in XML format. Could somebody shoe me an example of how to create this XML and pass it to request.send([Entity-body]) as the entity-body. Than...

Big text appears for few second on page refresh in IE, How to solve?

Text always appears in big size for a few seconds when one refreshes the page on IE only, which doesn't look very good. pleas look at IE 7 and try to refresh (I've e.g. been pressing ctrl + F5) to see what i'm facing. I'm also using sIFR on this site I check a js error of page and this is the problematic area. <script type="text/java...