javascript

what is the best software script that clones fiverr.com?

Anyone know of a paid/free script thats reliaable and exactly mimics http://www.fiver.com Thanks, ...

Cannot access object's methods from within event handler using `this`

Below is my code for FF Extension monitoring browsing behaviour. I can't access trim method from processClick method handling click event. Console shows this.trim is not a function. I know that it maybe something with this scope. I will be really grateful for any help. function bbm(doc) { this.doc = doc; this.registerListene...

Saving more than one tickbox to one DB column

Hi guys, I have a bunch of tick boxes that need to be inserted into one database column on submit, but I have no idea on how to accomplish this, I was thinking maybe jQuery or Javascript, any ideas? Here is a snippit of code: <input type="checkbox" name="vehicle" value="Bike" /> <input type="checkbox" name="vehicle" value="Car" /> s...

2D pattern search algorithms

I need to learn about 2D pattern searching algorithms. Tips and links greatly appreciated. More to the point: Given a matrix of M[m,n] with values in K example 000000000000 000001000000 010100010010 = M, K = {0, 1} 010100010001 101111010111 and a matrix L[i, j] with values in K + {X} representing a "shape" example, the shape of...

How can I get mouse position with JavaScript?

I want to get mouse x and y co-ordinates through JavaScript. I have tried pageX, pageY, clientX, clientY, but nothing is displayed. I have tested this on both IE and Firefox. Is there something I'm doing wrong in the following event? var x=0; var y=0; function mouseDown(){ alert("This is displayed"); evt=event||window.event; ...

HTML/Javascript trick needed to set <td> width

I have the following problem: I have to list several items each with several properties on a web page. The listing is done in two HTML tables. One table for the headers and one table for the items. This separation is needed in order to have possibility to scroll only through the list. (It would be odd to have a scrollbar in the header s...

What is the best open source JavaScript open id selector?

What is the best open source javascript open id selector? ...

How can I enable the user to enter reserved characters into the database with a combination of PHP, MySQL and AJAX?

Hi, I've set up a website that allows the user to add places to a database. However, I am unfamiliar with regex and so I'm not sure how to allow characters like apostrophes and dollar signs without them affecting the database INSERT. I have a form, which is read by AJAX and processed with PHP/MySQL so there's thee languages which have t...

facebook ignore javascript events

hi, I have a fbml app with a contact form and inputs like this one: <input type="text" tabindex="1" value="Name" name="name" id="name" onfocus="if(this.value=='Name')this.value='';" onblur="if(this.value=='')this.value='Name';" /><br /> Does anybody know why facebook ignore this javascript: onfocus="if(this.value=='Name')this.value=...

how do i set the correct height when using javascript google bar chart

i am using google bar chart and in the options there is a height property. depending on my dataset i need to set a different height as things either get squeezed together or there is tons of whitespace above and below the bar chart. is there anyway to have the chart know how much height it needs based on the number of items in the data...

Enter fires the form submit

I have a div (nice gif dislayed as-if it's a button), on that div is a piece of javascript that handles the ENTER as-if it's a click ($(this).click()). The click does its own thing. In FireFox, it all works perfectly: the user presses the enter on the button and the click is fired. In IE, the form is submitted not the click() HELP!! ...

How to put a default value into an 'input' and when user press enter it will disappear?

How to put default value to input and when user press enter it will disappear? My code that is not working: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt; <html> <body> <input value="default-value" type="text"/> </body> </html> ...

HTML5 Canvas layer issue

I have similar issue with layers as described here http://stackoverflow.com/questions/3008635/html5-canvas-element-multiple-layers But, accepted answer doesn't work for me, as for layer1 I have rendered image (drawImage) And second layer - layer2 (gradient) always under layer1. Sample code: canvas = document.getElementById("layer...

gBrowser.addEventListener: "load" event fired three times

Hi, I have installed the "hello world" dev example for Firefox extensions as described here: http://blog.mozilla.com/addons/2009/01/28/how-to-develop-a-firefox-extension/ I have modified the anonymous function that gets passed to gBrowser.addEventListener: gBrowser.addEventListener("load", function (event) { var t = event.target;...

Using jQuery to add tick box values to a hidden field

Hi guys, I am trying to collect tick box values and assign the ticked boxes values to a hidden field so that I can save all of the ticked boxes values into one column in a comma delimited format, instead of many. How could I go about doing that? Thanx in advance! ...

Pause after first keypress

There is a slight pause after any first keypress. Here's the log: [00.000ms] keypress -- first keypress [496.00ms] keypress -- second keypress after 496 ms [39.000ms] keypress -- every other keypress after about 20-40 ms. [41.000ms] keypress [21.000ms] keypress [39.000ms] keypress ... So there's a pause of half a second after a...

How to display 3 previous posts in article page?

Hi all. Does anyone know how to display 3 previous posts on article page? Let's say I'm in article post page and would like to display previous 3 posts images (basing on the post I'm currently reading) below it's content, but not next posts images. I was trying to do this with setting up the offset in the db query but with no luck. Can s...

Disable label using Javascript

Using Javascript, how do you make a label invisible on a button click? ...

Post an update(message) twitter

How can I post a message to twitter using only javascript (no serverside authentification). For example I have a form with username, password, and a text field and a submit button. I want to use it on the backend of a website. I have read this, http://dev.twitter.com/doc/post/statuses/update but I do not know how to handle the authent...

ExtJS, display script tag in text area from json obj

I want to display a script tag in plain text that is returned in a json obj. A user enters some text in a text area, the text contains <Script>. I want the user to be able to do this. The form is submitted using json back to the server for some processing, the json returned contains the <Script> tag for the text area. I want to display ...