It seems that it would be wise to use def, fn, or fun for function definitions similar to Ruby or other succinct languages.
Now that it's too late to change things due to potential compatibility issues, the whole world is forced to suffer using that wasteful long name 'function' everywhere in JavaScript code.
...
I'm using a Jboss5/Spring/Struts implementation, and I'm not familiar enough with JSP technology to know how to do this. Is this even possible?
...
This is a follow up question to http://stackoverflow.com/questions/2233097/how-can-i-stop-an-iframe-reloading-when-i-change-its-position-in-the-dom if you want the background.
I have an inline div <div id="leaderboard-slot"></div> (with a fixed width and height) and another div ("leaderboard-loader") further down the page with the actua...
I am looking for an equivalent in Chrome to the "break on all errors" functionality of Firebug. In the Scripts tab, Chrome has a "pause on all exceptions", but this is not quite the same as breaking on all errors.
For instance, when loading a page with the following code, I would like Chrome to break on the line foo.bar = 42. Instead, e...
Hey all,
I've been thinking about this project I've taken on, now what I am after is a form that will have a list of questions, simple yes/no questions that when answered and submitted it will dynamically return the relevant data on that same page. So initially all answers will be loaded onto the page then hidden, and the way I plan on ...
One of my co-workers is thinking that it is simpler to just include the document.ready() calls (MULTIPLE) for jquery anywhere in an html document, rather than trying to have them all in the head, foot or in an external js file. Can you give me your thoughts about this?
The document.ready stuff is loaded by modules that are included in a...
<img id="sun" href="logo.jpg"/>
How do I use JQuery to bind it so that when "sun" gets clicked, something happens?
I just want bind onclick to sun.
...
I am trying to write some google map functionlity and playing around with javascript closures with an aim to try organise and structure my code better.
I have the following code:
var gmapFn ={
init : function(){
if (GBrowserIsCompatible()) {
this.mapObj = new GMap2($("#map_canvas"));
this.mapObj.set...
I need a little help understanding something. I am using the colorbox plugin to load an external an external html snippet (which works fine). But none of my jquery selectors see the newly loaded html. Is that right (I think it is)? and if so how do I work around that.
Thanks
...
I'm currently developping a text-to-symbol conversion tool (non-profit), and I'm having this problem:
For the WYSIWYG-editting of the text, I'd like to use a nice small wysiwyg editor (like jHtmlArea). This editor will show floating divs, so I'll have to intercept a lot of keypresses (spaces/arrows/etc)
Currently, my html area is loade...
I need to implement a marquee type effect.
I don't want to use the marquee element - non standard and deprecated and all that.
I have access to jQuery for this site.
I've seen a few plugins, but no reviews of any.
Have you used a marquee jQuery plugin before? What are your recommendations?
...
Hello,
I'm building a CMS for a client (Building on top of wordpress). I'm having an issue with some data I am returning from my database.
Basically I am building Javascript Objects from PHP data so that I can update certain areas of my site upon mouse click.
example (this would work fine):
<script language = "Javascript>
var myOb...
Previously, I am using
<select size="8">
<option>Item 1</option>
<option>Item 2</option>
<option>Item 3</option>
<option>Item 4</option>
<option>Item 5</option>
<option>Item 6</option>
<option>Item 7</option>
<option>Item 8</option>
<option>Item 9</option>
</select>
provide a JList box liked place, to hold a collections of item, to l...
I would like to write a regular expression in javascript to match specific text, only when it is not part of an html link, i.e.
match <a href="/link/page1">match text</a>
would not be matched, but
match text
or
<p>match text</p>
would be matched.
(The "match text" will change each time the search is run - I will use something l...
I have this:
var Test = new function() {
this.init = new function() {
alert("hello");
}
this.run = new function() {
// call init here
}
}
I want to call init within run. How do I do this?
...
I have an ExtJS grid like so:
var grid = new Ext.grid.GridPanel({
...
});
I'd like to be able to re-use this grid so that I can have it multiple instances of it that all act independently. Is the only way to do this is by using Ext.extend, or is there another way? I don't really need to extend it, I just need to be able to create ...
Hello,
I need to show COMPLETELY different content when JavaScript is disabled. I know I can use <noscript> tag... but how can I hide the rest of the page when JavaScript is disabled?
Thanks.
...
I want to implement City and State auto suggest in a form textbox. How do I do this?
Weather.com has a great example on this on their front page.
Questions:
Where can I find a complete USA listing of city and state pairings? And is there an open API for this?
Do any existing scripts/frameworks exists that already perform this auto-s...
I am using an anchor with mailto, and I am finding that the behavior is extremely unrefined.
<a id="Help" href="mailto:[email protected]">Questions</a>
when I do this in IE8, I find that in some locations, the windows asks if it can open outlook, you say yes, and it opens a new email message and sets the To: section. It also leaves...
Hi,
Just wondering if there is a javascript means of getting the Windows XP login/user id logged in from within a browser application, when the user in question, say, clicks on a url within an e-mail.
Basically need to determing who has logged into the Windows XP machine.
Thanks.
...