javascript

How do I bind to a table <tr>

When someone double clicks on the entire row, I want an alert. How do I bind a double click to an entire row? ...

Why am I getting a syntax error after my Json result?

I'm using Json to retrieve data from a database, construct some html, and put it to the page, but I'm getting a syntax error after my tag, which is the last tag in the string from my php file. PHP: if($QString == "") { $query = "SELECT * FROM categories"; $result = mysql_query($query); while($row = mysql_fetch_array($resu...

How to use the lib section of a Design Document in CouchDB 0.11

I want to add some custom javascript functions to my design document, I can't find any examples of how to actually add these functions to the "lib" section of a design document. Can someone show me an example of how to add a function definition to the "lib" section? Follow up: I started using couchapp to manage my design documents and ...

How do I modify this jQuery :submit selector example?

Looking at this jQuery example, how can I modify the code so that it only changes the color of the cell if the value of the submit button in that cell is a certain value. i.e.- var submitEl = $("td :submit") //Only do the below if the submit buttons value is "XYZ" .parent('td') .css({background...

text editor that works direct on a server? (aptana?)

Are there any good free text editors i can use directly on the server if i give it my ftp details? failing that one with a good save-to-ftp shortcut (ie ctrl-shift-s) I work with mainly php and jquery, my primary editor is aptana? ...

Execute javascript from link

Hi, i am just trying to create a link which execute some JavaScript in stead to redirect the user to a particular page I tried the following but it doesn t work <a href="#" onclick="javascript:location.replace('http://http://stackoverflow.com/questions/ask');"&gt;www.google.com&lt;/a&gt;&lt;br /> <a href="javascript:location.replace...

Stop event bubbling in Javascript

I have a html structure like : <div onmouseover="enable_dropdown(1);" onmouseout="disable_dropdown(1);"> My Groups <a href="#">(view all)</a> <ul> <li><strong>Group Name 1</strong></li> <li><strong>Longer Group Name 2</strong></li> <li><strong>Longer Group Name 3<...

How does sourceforge start the javascript based download?

Trying to do something similiar to how sourceforge starts the download on the page, and uses a direct link in case it doesn't work. I can't seem to locate the javascript they use to start the downlaod popup. Exampe link: http://sourceforge.net/projects/htmlparser/files/Integration-Builds/2.0-20060923/HTMLParser-2.0-SNAPSHOT-bin.zip/dow...

Hide list Sharepoint temporarily with Javascript

Back again with a javascript question within sharepoint. I would like to hide a list temporarly while my javascript code is running. So lets say I have a to do list. Hide the list I run my javascript code (doesn't matter what it is, so plz don't ask). Show the list I know how to do it with a calendarview but not listview yet: HIDE C...

Get attribute of JQuery ui.draggable

Hi Everyone, I'm using JqueryUI for drag and drop on one of my pages and for some reason I can't seem to get an attribute of the ui.draggable object being passed into my droppable drop event. ui.draggable.attr("src") and $(ui.draggable).attr("src") both return undefined, however if I type ui.draggable.html() I will get the html back. ...

jQuery selector question

I have a span and an anchor inside a table cell. I have the anchor set up to show a tooltip. I would like the text inside the span to be used for the tooltip. How can I select this text in jQuery? <td class="row-head" colspan="5"><span class="tip-text">Complete Coverage</span><a href="#" class="help"></a></td> JQuery code - the curr...

JavaScript: 'textarea.value' not working in IE?

Hi! A few hours ago, I was instructed how to style a specific textarea with JS. The following piece of code (thanks again, Mario Menger) works like a charm in Firefox but unfortunately nothing happens in Internet Explorer (7 tested only so far). var foo = document.getElementById('HCB_textarea'); var defaultText = 'Your message here'; fo...

JS - information from pop-up window to the window which opened the popup

I have programmed some launcher for a game, so you can actually start the game and make it automaticly do various things with just one click from the browser. To make it easier for people to make their own custom links, I've tried to build something where they can create the links with just a few buttons. It works like this: The protoco...

Problem with javascript onclick function string

Hey all, i have been trying for a few minutes on this problem and i can not seem to figure out how to correct it. I tend to have the hardest time doing stuff like this when it involves more than one varable within the function. Here is the code: var tempString = "thePrompt('Are you sure you wish to delete this?', 'theDel('" + IDnum +...

ExtJs How do I scroll to the bottom of a grid?

I am making a web-based logviewer using extjs. I would like new log-lines to be added to the bottom of my gridview as it saves cpu by not requiring a sort to move it to the top of the grid (plus its how my coworkers prefer it). My problem is that ideally the grid would scroll to the bottom after a new row is added. I have been looking...

iframe/lightbox refresh issues

Hi Please check out: http://gherkin.co.nz/refresh/ and click on the purple box that says 'Membership chest' You should then see some form fields in an iframe in the lightbox. If you click on the "GO" button, the page will change (currently Not found, which is fine for now). If you click the dark area to close the box, then click the ...

Set caret position in contenteditable div layer in Chrome/webkit

Hello, I'm trying to set the caret position in a contenteditable div layer, and after a bit of searching the web and experimenting I got it to work in firefox using this: function set(element,position){ element.focus(); var range= window.getSelection().getRangeAt(0); range.setStart(element.firstChild,position); range.set...

Using Bookmarklet to open and pass values from Parent and Child Window

Hi, Is there a way to open a window from the current page using a javascript bookmarklet, and once the the child window has finished loading, setting the value of one of the elements in its DOM to some value from the current page, say for example the currently selected text. I know that this can be done in plane javascript, and also, ...

passing variables with JQuery

<script type="text/javascript" charset="utf-8"> $(document).ready(function() { $("a").click(function() { $("#myDiv").load( "job_board_data.php", { pageNo: $(this).text()} ); return false; }); }); </script> <a href="job_board_data.php?p=1">1</a> How can I pass variables to my job_board_data.php script???? I wa...

IE GIF/PNG Transparency issue with jQuery

Ok, this is pretty weird... Here's the page in question: http://s289116086.onlinehome.us/lawjournaltv/index.php The main blue callout background was originally a PNG, but when I applied some jQuery trickery to it (click the numbers in the top right to see what I mean), an ugly white border appeared where the transparency should be. Se...