I am having a dilemma in the logic of this particular issue. Forgive me if this is quite newbie question but I'd rather have a solid bg on it.
There are a lot of examples of this all around the web where you click on an element to display another element. such case may be a menu that when you hover your mouse on it (or click on it) its ...
$('#images_upload_add').click(function(){
$('.images_upload:last').after($('.images_upload:last').clone().find('input[type=file]').val('').end());
});
using this code to append file input's does not upload the file in firefox.
also
$('#image_server_add input[type=button]').click(function(){
var select = $(this).sibling...
I am currently developing a site and have a need for a javascript-based carousel/slider hybrid on the home page that fades between 3 or 4 different images automatically, giving the user the chance to click on one and go to another page on the site. I also need the different slides to have some sort of navigation, denoted either by names ...
Is it possible to apply / create a YUI Button by using an element's class name and not by id. I have to generate a list of buttons then transform it to a YUI button.
[Update]
By the way, I'm trying to apply the button in an anchor tag. So it will be a link button.
[Update:Code]
Ok so here's the code. I have a loop that generates thi...
I am currently working on a Flot graph, the API which seems pretty powerful overall, although examples of advanced use are not widely documented.
The API suggests there are ways to set hoverable on the graph, not that I am sure what exactly that means I can do with it.
I would like to know if anyone could contribute some examples tha...
When dynamically inserting an iframe into a webpage, the JQuery load event allows me to trigger a callback function when this iframe is loaded (see also this stackoverflow article).
The problem I am struggling with, is that I want to do something when the src request is sent to the server but before the response is received from that se...
Since Flash 10 was introduced, many of the popular 'copy to clipboard' scripts out there have stopped working due to new security restrictions. There is a Flash-only solution here:
http://cfruss.blogspot.com/2009/01/copy-to-clipboard-swf-button-cross.html
...though I'm looking for the ability to trigger the copy function via JS, rathe...
Quick (and hopefully easy) question: I need to trigger a download of a PDF file that's generated by a PHP file. I can do this:
<a href="download.php">Download</a>
but should I be doing this another way? Javascript maybe? The above works but the window shows "Loading..." until the download starts. I'd like to provide some feedback ...
Hi,
I want to submit a with using jquery as below;
$("#formid").submit();
Its working perfect in all browsers except IE6.
How to make it work in IE6 ??
...
How to validate a date time value in javascript to ensure that the value entered for year, month , day , hour, minute and second compose a valid Datetime object?
...
Dear All,
I need to prevent user from selecting text (select all or select a portion of text) in the browser Mozilla Firefox, using java script.
I have done this using Internet Explorer, but it seems doesn't work with Mozilla.
Any hints? URL? Sample?
TIA.
EDIT:
Actually, this ridiculous problem was requested by our client. And yes, ...
How do I cancel an ajax request that I have not yet received the response from using jquery?
...
I have a page where some event listeners are attached to input boxes and select boxes.
Is there a way to find out which event listeners are observing a particular DOM node and for what event?
Events are attached using
1) prototype's Event.observe
2) DOM's addEventListener
3) as element attribute element.onclick
...
I need to add line breaks in the positions that the browser naturally adds a newline in a paragraph of text.
For example:
<p>This is some very long text \n that spans a number of lines in the paragraph.</p>
This is a paragraph that the browser chose to break at the position of the \n
I need to find this position and insert a <br />
...
Hello,
It seems I don't understand javascript callbacks quite as well as I thought.
In the following example, I would think that each copy of function in setTimeout would refer to its own copy of the variable "index". Therefore, running the example should produce the following alerts: "zero" "one" "two".
var array = ["zero", "one", "t...
How can I test if a regex matches a string exactly?
var r = /a/;
r.test("a"); // returns true
r.test("ba"); // returns true
testExact(r, "ba"); // should return false
testExact(r, "a"); // should return true
...
A little bit of context:
I'm using the jQuery Validation plugin to validate a sign-up form. I now want to implement an ajax call to check whether the user name is available in the system, and I want to make this ajax call only if the userName value is a valid one as per the rules set in $(form).validate();
I want something like:
$("#u...
I'm trying to understand why this does not work. (Basic example with no validation yet)
When I test it, firebug states Product.addPage is not found.
var Product = function ()
{
var Page = function ()
{
var IMAGE = '';
return {
image : function ()
{
return IMAGE;
...
I'm using jQuery with the validators plugin. I would like to replace the "required" validator with one of my own. This is easy:
jQuery.validator.addMethod("required", function(value, element, param) {
return myRequired(value, element, param);
}, jQuery.validator.messages.required);
So far, so good. This works just fine. But what I...
I used the function:
document.getElementsByTagName('strong')
to get all the text in a page with that type of formatting. The HTML looks like:
<td align="center" valign="bottom"><H1><font size="+4"><strong>TEXT_HERE</strong></font> <br>
I would like to change "TEXT_HERE" to maybe something else or remove it all together. How might...