Im trying to paste with html content (the one in the var) and paste it in <fieldset id="previewDataBlock">
Obviously Im doing something wrong:
function createPreviewBlock(){
var emptyBlock = '<ul class=emptyList id=previewBlock>' +
'<li id=periodLi></li>' +
'<li id=companyLi></li>' +
...
I want to modify this code so that the value is a variable and so that the progress bar refreshes in real time (or the smallest meter of time possible - milliseconds)
I am going to "seed" the current time to drive the updates
<script type="text/javascript">
$(function()
{
$("#container").progressbar({ value: 0 });
});...
I have an embed google map on a webpage not programmed by me, I need to figure out how to remove 2 of the 22 points (blue markers) on the map that when you click on show the address. Is it just a snipit of code somewhere in the HTML or JavaScript? or is it protected by a google account?
<iframe width="666" height="325" frameborder="0" s...
I am trying to get the ID of an element bound with a jQuery delegate() function. I want to pass the element's ID to another function. The ID returned is always "undefined" and I'm not sure why. Here is my code:
$(document).ready(function() {
var timeout = undefined;
$('body').delegate(
'#tab-form input[type="text"]',
'keypre...
I'm working on some script but it have a serious problem with hashes.
I have a list of link-images like:
<a href="#1"><img src="1.jpg" /></a>
<a href="#1"><img src="2.jpg" /></a>
<a href="#1"><img src="3.jpg" /></a>
All I want to do is to load file files/#1.html after clicking the first image, files/#2.html after the second etc.
Her...
I looking at using Javascript server side and took a look at persevere/pintura but for a novice like me, I need more documentation and tutorials and CouchDB seems to have a lot of that but is it used as a server side js tool?
Kind Regards
...
Original Question
Since a recent version of php added anonymous functions, is there a way to extend functions? in Javascript I'd do:
var temp = immaFunction;
immaFunction = function(){
//do some random stuff
temp.apply(this, arguments);
}
Result
As of 5.3, PHP has first class anonymous functions.
A few points to consider however...
Hey all !
I'm building a line chart and I want my points to have an id. How to do that in using push ?
options.series.data.push(data,id); ???
or something like that
Thanks a lot.
...
What is different between asynctreenode and treenode in Extjs? When should I one or another?
Thanks.
...
I looked into previous questions, but they didn't seem to answer what's happening to me.
In my real code i'm creating a form on the fly and adding to it two buttons, one for submission and another for other function. For this I'm setting the "type" attribute of the buttons to "submit" for one and "button" for the other. The problem is th...
I've Datarow Collection Array of strings.I want to pass this array to javascript and do operations on them.How do I do this
...
I have a "Save" button on a FormView with the CommandName="Update" set. This button updates an EntityDataSource that is bound to the FormView.
After the EDS is updated, I want to close this (child, popup) window and refresh my parent window (so it will reflect the changes just made to the data).
For reference, I have a similar "Cancel"...
Hellom
I'm new to JavaScript so please bare with me. I'm working on a custom WYSIWYG editor (no I do not want to use an already made one so please don't suggest it).
I'm having trouble getting it to work in Internet Explorer. It gives me an Invalid Arguement error on lines such as the following:
document.getElementById('editor').conte...
I have a DOM element like this:
<div id='master-value'>Apples</div>
I have many other elements elsewhere on the page that I need to sync with the 'master-value'.
<div class='fruit-value' data-reference='master-value'>Apples</div>
<div class='some-fruit' data-reference='master-value'>Apples</div>
When I change the value of the 'mast...
Hello,
I'm trying to understand how to use the OAuth Javascript library (http://oauth.googlecode.com/svn/code/javascript/) but I can't work it out. Can anyone provide me with an example of how you would use this library to authenticate with Google and retrieve a Gmail inbox feed (https://mail.google.com/mail/feed/atom/)? I know you can ...
So I'm working on a site, and we need to check if jQuery is defined before writing it to the page. I want to convert it to use JS conditional shorthand, but for some reason when I do that the statement does not execute. Here is my code:
Original (this works, tested):
if (typeof jQuery == 'undefined') {
document.write('<script typ...
I have a bunch of inputs and buttons, similar to how Facebook's news feed:
<div class="section_1">
<input name="input-name"/>
<button style="display:none">Save</button>
</div>
I have a bunch of these (section_2, section_3, etc.). I could put id's like this:
<div class="section_1">
<input class="expandableinput" name="inpu...
I've got some pages such as the user-agreement that I want to appear with or without the layout (extends tag) depending on how it is called. I'm using jQuery Fancybox to load up these pages in iframes. If JS is disabled, the links should open in a new window w/ the full layout, otherwise, if they're in an iframe, they don't need the layo...
Can I use the following across all browsers?
<a href="#" onclick="doSomething()">Click here.</a>
Is this "bad practice" in regards to standards?
Will it work on IE, FF, Safari and Chrome?
...
Hi, first a little bit of documentation from the jQuery validation plugin:
"Use submitHandler to process something and then using the default submit. Note that "form" refers to a DOM element, this way the validation isn't triggered again."
submitHandler: function(form) {
$.ajax({
type: 'POST',
url: form.action,
...