javascript

Facebook Connect FB.CommentClient.add_onComment Method inexplicably stopped working.

I've been using FB Connect for some time now. The code below has worked fine since I first implemented it. In the last week I did some server configurations to enable mod_deflate and it has stopped working. Comments work, only the callback function has stopped working. Has anyone had a similar experience? Can anyone recommend a ...

Input Data To SharePoint RichText Control By WinForms WebBrowser Control

Hi, I need to edit the value in an SP Rich Text field via the WinForms web browser control. Most other controls (input tags) are easy to get and we can change the value quite simply. However, not so simple with Rich Text. I headed over to: http://blog.drisgill.com/2007_05_01_archive.html and got some ideas. At first, I tried creatign a...

webkit css3 Column text selection

Iam using the column layout model of css3 to view content in a UIWebView (iPhone/iPad), I would like to programmatically select and copy the content of each column and paste it in another view, is there way to achieve this? ...

Rewriting the JS String Constructor: Am I Way Off?

I'm on my way through Object Oriented Javascript, and I can't help but feel I've missed the boat on a given exercise. So what I'm looking for here is pointers on how I can improve my code or understanding of Constructors. Here was the challenge: Imagine the String() constructor didn't exist. Create a constructor function MyString...

Javascript - Set source file and assigning value to a control

I have a tree view control build dynamically. i want to change color of the selected node .one help me to write the script given below. and its work fine. <script type="text/javascript" src="http://www.google.com/jsapi"&gt;&lt;/script&gt; <script type="text/javascript"> google.load("jquery", "1.4.2"); google.setOnLoadCallba...

Simultaneous Clock Ticks

Hi,I'm using jquery clock to demonstrate time in my application. In this application,there are two different browser windows where one of these triggers the other as its pop up window. In these two windows,I'm using jclock instances,but somehow these clocks don't both tick as one. http://plugins.jquery.com/files/jquery.jclock-1.2.0.js.t...

Get values of js generated controls, from server side.

Let me explain the case; On the asp.net page, i have a repeater which generates <tr>s and <td>s. On clientside, i have a js function which adds or deletes rows into that repeater-generated-table. The problem is, in this function, i dont only generate a simple row, a textbox (which i have to get its value on server side) is generated t...

How to increase the width of the image in nextGen (galleryview template) wordpress plugin?

Hi guys. I just wanted to ask you how to change the width/height of the image in nextGen (galleryview template) wordpress plugin? After I set everything up it works like charm but I can't increase the size of the image. This is the code I found inside the template: <script type="text/javascript" defer="defer"> jQuery("document").ready(f...

how to call javascript function in select_tag

<%= select_tag :per_page, options_for_select([10,20,30], @per_page.to_i), :onchange => "get_per_page_url(#{self.value})" this is code for calling javascript function in select_tag.but problem is that get_per_page_url function is calling here?? ...

Converting String to DOM.

My Ajax functions gives me HTML-Elements as String back, and this String I want to append in my Document as DOM Element. Something like parentNode.appendChild(responseText); What will be the best way to do this. ...

jQuery limit sortable to parent table row

So I have a table which has several categories, with several items underneath in each category. Something like: <tr> <td>Category1</td> </tr> <tr> <td>Item1<td> </tr> <tr> <td>Item2</td> </tr> <tr> <td>Item3</td> </tr> <tr> <td>Category2</td> </tr> <tr> <td>item1</td> </tr...

Javascript callback programming?

In javascript it's very popular for libraries/frameworks to let us define a callback function for post-processing of data. eg. load("5", function(element) { alert(element.name); }); I wonder how the load() function looks like to be able to let the user provide a callback? Are there good tutorials for this? ...

HTML5 canvas: Same code outputs different results in different browsers

In a simple canvas test I created for performance and quality measurement purposes, a canvas is painted with randomised colors and images during an unlimited period. A sample is shown here: http://litterific.com/minisite/ Warning: Only open this in Opera or Chrome, the script is pretty heavy can hang up on slow computers, don't le...

The best way to bind event on a cell element

Hello, I've a webpage fullfilled by a JS script that creates a lot of HTML tables. Number of <table> created can vary between 1 and 1000 with 100 cells in each of it. My question is : how to bind efficiently the click on theses tables? Should I bind the click on each cell of the <table> or directly to the <table> itself and retrieve t...

Hooking into browser rotation

I'd like to execute some JavaScript code when the mobile phone is rotated. I'm using jQuery. Is there a custom hook I can use with mobile browsers? One way I can think of is hooking into the change of the viewport size, and checking if the height/width ratio has changed. Is there an API method that I could use instead? ...

How to make a highly uncertain picture vertically aligned relative to the fixed container

if the block is text,that will be easy.but the block is image en…… ...

.load() is not firing for all images

i have created a gallery script, which first loads images to be shown http://bit.ly/9aQdr3 There are 36 images but image.load() is firing only 27 times. here is the code var c = 0; for(var i =1; i <= 36; i++){ var img = '<img width="500" src="images/' + i + '.jpg" />' $('#gallery .images').append(img); } ...

How to get to a child of a parent when multiple exist?

There is problem with the following code. I am trying to Increase the dollar amount for all the numbers independently (by 0.01 per click). But it only seems to work on the first "content" class, not on the other 2. Each of these are identical besides the amount. Layout: <div class="content"> <div class="item"><span class="number">$...

Javascript image preload strategy

Hi, Like many people I've been doing image preload for a long time, but not always very rationally. So I've come up with this short list of thoughts about the right way to preload images with javascript. An image preload script should be executed as soon as possible. It should be placed at the top of the HTML (in the HEAD section), un...

Implementing a horizonatal <div> carousel using prototype.js and scriptaculouas

I need to implement a carousel of 5 divs with 3 that appear and two the are off screen. I want to cycle through the divs with arrows so that they move around like a carousel. I know you can do this with jQuery - but I'm limited to using prototype.js and scriptaculous. What is the simplest way to do this? ...