I was reading http://google-styleguide.googlecode.com/svn/trunk/javascriptguide.xml when I noticed in the Constant section with the annotated comments:
/**
* The number of seconds in each of the given units.
* @type {Object.<number>}
* @const
*/
and then the guide goes on with "This allows the compiler to enforce constant-ness."
...
I have a form that is broken into several screens. Although it is a single form, because of its size I am using jQuery to visually break it into several smaller sections.
There is a simple link to navigate to the "next section" which triggers a div show/hide.
I would like to validate each section as the user proceeds, rather than on su...
Ok I've looked everywhere for this. I'm cutting out a couple of the variable declarations, as I can ensure that my XMLHttpRequest is working.
function submit_edit_form()
{
// id and title are already declared
var x = ajax_edit_form_save(id, 'title', title);
alert(x);
}
function ajax_edit_form_save(id, property, new_value)
{
...
I have a drop down menu that looks like this:
It works fine, but I need to replace the text "Choose an Action" with whatever link the user selects from the box. What is the best way to handle this?
Here is the code for the drop down:
$("#dd_open a").click(function(event) {
event.preventDefault();
$("#dd_open a").removeClass('selecte...
I have the following structure, the #tabs div is a static positioned div. I would like to show the loading inner div during an ajax request and have it centered on the #tabs div (which is actually a jquery tab). But it's not getting centered with the css I have at the moment.
<div class="span-18 last" id="top_tab_container">
<div id=...
Hi Guys,
I feel like i've done this scenario plenty of times, and it usually works, so im obviously missing something.
Here's my server-side ASP.NET Button:
<asp:Button ID="btnFoo" runat="server" Text="Foo" CssClass="button foo" OnClientClick="foo_Click();" />
Which get's rendered on the client as:
<input type="submit" name="really...
Hi,
I would like to request help from experts here but I would like to explain my requirements first.
I am building an Ajax Based application that will run on our local intranet network.
Now upon every return of request from my Ajax, I need to play a sound in my client browser.
I want to put a sound file (mp3/wav) in my web server (To...
I need to apply a class to the <li> tag that encloses an anchor tag when a user clicks on the link. Like this:
<ul>
<li><a href="#">Just an Example</a></li>
</ul>
So when the user clicks on <a href="#">Just an Example</a>, I need to apply a class to the <li> enclosing it. How would I target this? I am using jquery.
...
iam using simple blow up trick in my page . first the div is set as hidden and then when we click the image ,a blow up opens with a overlay image in the background. The javascript function simply seta innerhtml. This all runs fine in mozilla but it gives unknown runtime error when i try to see it in IE6 and thats why image blow up doesnt...
Hi Guys,
I'm doing some simple client side validation with jQuery.
var passedValidation = new Boolean(true);
// Required Field Validators.
if ($('#fbsignup input.firstName').val().trim() == '') {
$('#fbsignup tr.firstName em').show();
passedValidation = false;
}
if ($('#fbsignup input.lastName').val().trim() == '') {
$('#f...
Hi,
How do I make this SimpleModal script to load when the page loaded instead of clicking the button? Thank You =)
< div id='basic-modal' >
<a href='#' class='basic'>Demo</a>
</div>
Basic Modal Dialog
For this demo, SimpleModal is using this "hidden" data for its content. You can also populate the m...
i want to create functionality in which to-do list will be on left side and one calender will be on right side.what ever due date i select in to-do list,it should be highlighted in calender,how can i do that?
...
Is there a way to run linux commands from javascript that uses a standalone interpreter (something similar with SpiderMonkey, JavaScript shell)?
...
I have a Google chrome plugin that has to sustain a connection(BOSH) with a outside server. That forces plugin to fire Connect() everytime browser opened. Stumbling through the API can;t really find event that would do this once and only once when browser is opened. Is there any or should I go in a freaky way ?
...
I could not understand what this javascript line does.
chkBox.setAttribute("CheckList", range);
What is the "CheckList" attribute is used for?
...
how to set the focus to a text field of an application employed in i-pad after getting sending request to the server?
is it possible by using javascript?
(this thing is working in normal browsers like safari ,firefox, I.E etc.,)
i dont know how to do this possible in i-pad?
thanks in advance!!!
...
Hi,
I'm new to Jquery and even Javascript. Found and implemented this script that in a timely matter replaces images. Script works well when I wrap the images in an tag. I want the images to be links. As soon as I wrap the tags in an tag the script sill refreshes every so many seconds but it doesn't load the next image.
What should...
Hi All,
I am looking for a javascript function which can copy contents from TextArea into clipboard. On microsoft platform the function works fine, but it fails when I switch to non-microsoft platform such as, FireFox or Safari.
I referred this link for the function.
If anyone knows the solution for this, please help me out.
Thanks ...
Hello,
I'm looking at creating a project that has a touch screen panel on a com port and a front facing website.
I want the touch screen panel to interface with the web page, it will have two buttons (left & right) and I want those actions to "do something" on the web page.
I'm trying to work out which programming/scripting language w...
Is there any other way to find out if were was a match in String.replace method then searching in it's result?
Or there is another method which give me that informations?
I need behavior similar to PHP's preg_replace, where i can add optional argument which will be filled with the number of replacements done.
...