javascript

How do I use javascript to change the font colour on my webpage?

I can't use JQuery sadly I need to use good old Javascript. I have a forum and a black theme and when people use black text on it you can't see it. So I want to use javascript to change all the black text on the page to white when the page loads. ...

Using web technologies to create desktop applications

Recently, the pace at which web browsers improved and implemented new technologies (e.g. HTML5) seemed to have accellerated considerably. At the same time, the tools for developing web applications, like e.g. jQuery, or the myriads of web frameworks have also made web development much easier. Are we now at a point were it makes sense t...

YUI Rich text editor, image centering ?

Apparently YUI RTE seems to have text flow settings for images, left, right, inline, block... Im wondering how I can get 1 option for centering the image, if there is a way to add it with custom code, can any one guide me to the right direction to achieve this ? I know that to center the image, i will need to add a style of margin-left:...

Adding a new value into img tag to check if it was clicked with Javascript?

I'm trying to make a map with repeated images, and I also want tiles on map to be clickable. Here I wrote a script but I have problem about unchecking checked images. http://jsbin.com/aruge/edit Please help. ...

3D perspective text on a webpage

How can I achieve 3D text transformations in perspective using Javascript/CSS. Solutions using external libraries of Javascript/CSS are also possible ...

Drag and drop a file then POST to a URL using HTML5

I have figured out the drag and drop part but how would I then upload and POST the file to a URL with set parameters? If I had a form I would just <form enctype="multipart/form-data" method="post" action="url"> <input type="?" name="?"/> <input type="?" name ="?" value="?"/> </form> How would I do above using the HTML5 ...

How can I display a text value for radio buttons using javascript

I am building an online store where the customer can select custom parts. I'm quite new to javascript, but I've managed to create a radio button list, where the price is added from each section. I would like a box to show all of the options selected, not just the sum total. I've included the text with value and used parseInt. Is there ...

How can I add an array to an array of arrays using jQuery?

I have an array, as below: var cString = [ ['1','Techdirt','www.techdirt.com'], ['2','Slashdot','slashdot.org'], ['3','Wired','wired.com'] ]; to this array I want to add another in the same format: var test = ['4','Stackoverflow','stackoverflow.com'] I've tried using: var newArray ...

Javascript Libraries for Annotating Text?

Hi there, I have googled and come up dry. I am looking for a way to annotate text selections (with overlaps) and i was wondering if anyone knows of something like this available already? My goal/use case is that a number of users will be presented the same blob of text and should all be able to independently annotate various selecti...

HTTPrequest is not working!

Hi! I'm trying to use an ajax request to connect, and gather data from, a PHP file. THe AJAX JS is on a different website than the PHP, just an FYI. Here is the JS: var quer; try { quer = new XMLHttpRequest();//I'm running in safari, so this gets called. } catch (e) { try { quer = new ActiveXObject("Msxml2.XMLHttp"); }...

the thin line between web apps and desktop apps

I've been working a lot lately with web apps, mostly with javascript and json-rich web UIs. I have to say I get impressed all the time with what I can achieve through these technologies. More and more, I ask myself whether I would have preferred to go with a classic GUI to start with (whether it was C#/VB.Net + WinForms, or C/C++ + GTK/...

Is there a better way to do this ajax call

$('#request_song').autocomplete({ serviceUrl: '<%= ajax_path("trackName") %>', minChars:1, width: 300, delimiter: /(,|;)\s*/, deferRequestBy: 0, //miliseconds params: { artists: 'Yes' }, onSelect: function(value, data){ artist = $('#request_artist').val(); //this will return "The Killers" //make an ajax request to "...

How can you tell in FireBug what JavaScript is being sent back from the server after an Ajax request?

In my HTML I'm sending a dollar amount back to the server to have its currency changed in the app. How can I tell in FireBug what JavaScript is being sent back from the server after this Ajax request? ...

Getting mouse co-ordinates using jQuery

I am building a breakout game using jQuery and the <canvas> element. To control the paddle, it will follow the mouse. So I need to get the mouse co-ordinates in my drawPaddle() method. Looking on the jQuery site it has examples like this: $(document).mousemove(function(e){ $('#status').html(e.pageX +', '+ e.pageY); }); Which does...

disable paste (control V) in IE for an input text box

Is there a way to disable the paste (control V) into a text box using javascript/jquery for IE? I do not have access to the markup unfortunately or I would use onPaste="return false". Can it be attached with Jquery? If it cannot be disabled at least is there a way to detect it so that when the paste event occurs just remove the text ...

I have a json object now how do I make a div with the elements

I am using getJson to pull in some info onto the page $('#request_song').autocomplete({ serviceUrl: '<%= ajax_path("trackName") %>', minChars:1, width: 300, delimiter: /(,|;)\s*/, deferRequestBy: 0, //miliseconds params: { artists: 'Yes' }, onSelect: function(value, data){ // alert('You selected: ' + value + ', ' + $('#...

Elegantly passing an "click event" through multiple callbacks

When a non-logined user clicks on a given button, I want to stop the event, collect his oauth, collect his email if i do not have it, and then execute the event. I want to do everything in javascript because that would keep things much more simple. This is how I am executing it, and I have 2 questions: Is there a more elegant way o...

HTML sliding bars?

Hi, how does one create a sliding bar using HTML? I cannot seem to find anything in the official documentation. ...

Detect :first-child support

How to detect, does browser support the CSS :first-child selector? ...

HTML Select, embed object with text?

Is it possible to have a HTML Select containing elements, not just text values but say an object (specifically i'd like to add a JQuery slider with the text) but if someone could advice me generally how to do this, i could investigate. ...