I've been digging into jquery to find out how it works and I see it uses a construct i've never seen in JS before. The following code seems to execute when the browser loads, it's almost like a function that invokes itself. I've searched for docs for this feature but not sure what its called. Can someone tell me the principle so I can ...
I recently installed v8 in my system and was trying few javascript programs, but some of the output functions like alert, prompt etc. is not being recognised by it. The same program if i run it in browser is working fine. Am I missing something?
...
I would like to toggle (hide/show) several elements of my web page.
All those elements are in between this tag:
<div class="class_name">to toggle</div>
<div class="class_name">to toggle2</div>
I would like to use javascript to toggle all the elements with class=class_name when the user clicks on a button.
So far all the code I ...
I'm currently writing on some coding and style guidelines regarding JavaScript and CSS parts of projects. Eclipse offers some basic functionality in this area for situations where code is generated but is there also something en-par with CheckStyle for at least marking guideline-violations as warnings/errors?
Or how do you handle coding...
Can you recommend me some jquery or native javascript lib for multiple uploading via ajax ?
...
Hi,
I am evaluating sproutcore and cappuccino for use in my current project. Since I am a rails developer and I like pure javascript I think that sproutcore suits my style better. My problem is that every single sproutcore sample I have tested seems very slugish and slow on its user interface. Scrolling is very slow, clicking on buttons...
Hi There,
I am using a jQuery calendar to display events, which is designed to pull data from the server.
On innit the calendar fires off a AJAX request to get an array of events objects (json encoded).
All good so far.
However, this request includes a JSON encoded date and time (at leats my implimentation does).
The code looks like thi...
I'm trying to have some object oriented design using JS and jQuery.
I have the following construstor:
function A () {
this.url = "some url";
$("rrr").autocomplete({
source: function(req, add){
$.getJSON(this.url, req, function(data) {} ...
}
As you guessed, I can't use this.url, since jQuery redefienes this. I can't u...
Hi, in a GridView (ASP.NET/C#), I have a number of template fields - the 2 ones relevant to the question are 'checkbox1' and 'quantity'. The checkbox starts off as unticked for every row, and the quantity starts off as disabled for every row. But when the user ticks one of the rows checkboxes, I need a piece of JavaScript or something to...
I am currently working on working on a platform where i can insert js code to be used is validated by some compiler and it returns errors for certain cases like
document.write('<IMG ALT="" BORDER="0" NAME="DCSIMG" WIDTH="1" HEIGHT="1" SRC="'+dcsSrc+'">');
error * :314:9:document.write can be a form of eval.
parseInt function throw...
Hi sorry if the name of my question is not correct.
i am trying to create an image rotator, but i would like to be able to re-use it more than once in a page, so i am trying to create it as an object/class.
I have about 5 or 6 images on a page.
i would like to have each image as a rotator, displaying a new image every 2 seconds or so...
Hi, I am having trouble fixing a bug in an existing ASP.NET MVC web site.
One of the views has a series of text boxes where the user enters data. Each text box has some javascript attached to the blur event in order to post back to the server when the text is changed. More specifically the code is using the JQuery $.ajax method to make ...
Hi - I downloaded and setup MS's Stock Trader app. I'm running Vista Ultimate, IIS7, VS 2008 / .NET 3.5. The entire app is about 120 MB so is quite involved but it all seemed to setup fine from the msi. When I run the app and try to login I get a javascript error after clicking the Login link:
WebForm_DoPostBackWithOptions is not define...
Hi
im trying to put all my js in external js file, for the header for my site be more light.
So in my header i have this script, wich work well :
ddaccordion.init({
headerclass: "p7ABtrig", //Shared CSS class name of headers group
contentclass: "p7ABcontent", //Shared CSS class name of contents group
...
I am having trouble getting the following code to render as I expect it to:
var img = Titanium.UI.createImageView({
top: 0,
left: 0,
width: 140,
height: 92,
image: 'http://cdn.monmotors.com/tn_' + imgr,
defaultImage: 'car.png'
});
post_view.add(img);
var lbl = Titanium.UI.createLabel({
text: desc,
left: 160,
width: '...
Hello,
I have a TableView in which I can scroll to view all the rows.
But I can also swipe all of those rows (when I swipe, it display some options for the row).
Currently, I'm adding a swipe event to the table view. When it's triggered, I find the appropriate row with it's index. And I do what I gotta do.
On the SDK it works well.
On...
Here's my JavaScript code:
function BuildObject(container, index, imgFile, left, top, width, height)
{
var newImg = document.createElement('img');
newImg.setAttribute("id","d" + index);
newImg.setAttribute("src", imgFile);
newImg.setAttribute("style", "position:absolute; left:" + left + "px; top:" + top + "px");
newImg.setAttr...
I'm experiencing an issue with XMLHttpRequest. If there is no Internet connection, my request is not timing out and thus freezing the browser. Here is the request code:
var jsonData = new XMLHttpRequest();
jsonData.open('GET', urltest, false);
jsonData.Timeout = 100;
jsonData.send(null);
if(jsonData.status == 200) {
alert(json...
Hey,
Easy question, my brain is empty today..
I have a array with month(1-12) and a given month.
var cMonate = new Array("Januar", "Februar", "März", "April", "Mai", "Juni", "Juli",
"August", "September", "Oktober", "November", "Dezember");
My given month:
var Month = currentMonth.getMonth();
Mont...
Hi!
I've a table that is very large. So I decided to put a horizontal scrollbar that is placed on the bottom of the table.
But I would like this scrollbar to be also on top on the table.
What I have in the template is this:
<div style="overflow:auto; width:100%; height:130%">
<table id="data" style="width:100%">
Is this possible to ...