Recently I have started playing with jQuery, and have been following a couple of tutorials. Now I feel slightly competent with using it (it's pretty easy), and I thought it would be cool if I were able to make a 'console' on my webpage (as in, you press the ` key like you do in FPS games etc), and then have it ajax itself back to the ser...
I am looking get to grips with functional programming concepts.
I've used Javascript for many years for client side scripting in web applications and apart from using prototypes it was all simple DOM manipulation, input validation etc.
Of late, I have often read that Javascript is one of the languages that supports functional program...
Edit: I have solved this by myself. See my answer below
I have set up a nice sortable table with jQuery and it is quite nice. But now i want to extend it.
Each table row has a text box, and i want i am after is to, every time a row is dropped, the text boxes update to reflect the order of the text boxes. E.g. The text box up the top a...
Checking the HTML source of a question I see for instance:
<a id="comments-link-xxxxx" class="comments-link">add comment</a><noscript> JavaScript is needed to access comments.</noscript>
And then in the javascript source:
// Setup our click events..
$().ready(function() {
$("a[id^='comments-link-']").click(function()...
There is a webpage loaded in the firefox sidebar and another webpage loaded in the main document. Now, how do I ask access the main document object through the Firefox sidebar? An example to do this through Javascript code in the firefox sidebar document to access the main document would be helpful.
Thanks for the answers. I have to ref...
As a passionate JavaScript developer, I'd like to know if there's any quality Podcasts out there, devoted to JavaScript. (Both video and audio).
I am currently subscribing to:
YUI Theater
Audible Ajax
...
I need to randomly fade my background images in and out.
It will be a timed function, like once every 5 seconds.
I need to do it with ASP.NET, Javascript, CSS or all three.
Please help me out here guys. Thank you.
...
I know this would be easy with position:fixed, but unfortanately I'm stuck with supporting IE 6. How can I do this? I would rather use CSS to be clean, but if I have to use Javascript, that's not the end of the world. In my current implementation I have a "floating footer" that floats above the main content area and is positioned with...
I have the following problem:
I have an HTML textbox (<input type="text">) whose contents are modified by a script I cannot touch (it is my page, but i'm using external components).
I want to be notified in my script every time the value of that textbox changes, so I can react to it.
I've tried this:
txtStartDate.observe('change', fu...
Is there a way to hide table rows without affecting the overall table width? I've got some javascript that shows/hides some table rows, but when the rows are set to "display: none;" the table with shringk to fit the contents of the visible rows.
...
I'd like to trigger an event when a link is clicked both by clicking on it normally or by opening it in a new tab (e.g., middle click, ctrl + click, etc)
I've tried the following so far:
$('a').click(myfunc) Doesn't capture middle clicks.
$('a').mousedown(myfunc) works, but it seems to be preventing the link from being followed even ...
In one of my ASP.NET Web Applications, I am using a BulkEditGridView (a GridView which allows all rows to be edited at the same time) to implement an order form. In my grid, I have a column which calculates the total for each item (cost x quantity) and a grand total field at the bottom of the page. Currently, however, these fields are on...
in Javascript, the following:
var test = '"the quick" "brown fox" "jumps over" "the lazy dog"';
var result = test.match(/".*?"/g);
alert(result);
yields "the quick","brown fox","jumps over","the lazy dog"
I want each matched element to be unquoted: the quick,brown fox,jumps over,the lazy dog
what regexp will do this?
...
What is the best way to detect if a user leaves a web page?
The onUnload javascript method doesn't work every time (the HTTP request takes longer than the time required to terminate the browser).
Creating will probably be blocked by current browsers.
I'm also using Silverlight, so Silverlight solutions are welcome.
...
To be more precise, I need to know whether (and if possible, how) I can find whether a given string has double byte characters or not. Basically, I need to open a pop-up to display a given text which can contain double byte characters, like Chinese or Japanese. In this case, we need to adjust the window size than it would be for English ...
Hi,
I have a multi select list box value prompt in Cognos 8.3.
It contains values:
Adelaide North
Adelaide South
Adelaide East
Adelaide East
Sydney North
Sydney South
Sydney East
Sydney West
etc.
I want to able to add a button onto my prompt page that when clicked, selects predetermined options, such as Adelaide North, South Ea...
I definitifely like the one at stackoverflow, because it's clean and simple. Also the live preview with code/syntax hilighting is really helpful (and motivating).
What is your favourite Javascript Editor Framework and why?
...
In Firefox I can get the stack trace of an exception by using exception.stack.
Is there a way to get that in other browsers, too?
Edit: I actually want to save the stack trace automatically (if possible) and not debug it at the time (i.e. I know how to get the stack trace in a debugger).
...
I'm making a simple jquery command:
element.html(" ");
using the attributes/html method: http://docs.jquery.com/Attributes/html
It works on my local app engine server, but it doesn't work once i push to the google server. The element empties, but doesn't fill with spac...
Several frameworks for writing web-based desktop-like applications have recently appeared. E.g. SproutCore and Cappuccino. Do you have any experience using them? What's your impression? Did I miss some other framework?
I've seen related questions on StackOverflow, but they generate mostly standard answers like "use jQuery or MochiKit or...