javascript

Best way to Go Previous page in PHP

i m using a button to go back page (let zero.php) so i m using this <input type="button" value="Back" class="button" onClick="javascript:history.go(-1)" /> but it fails when we do some stuff on that page like from one.php we add some data and go to two.php( where database quary runs) and again comes to a.php and then click on that...

How to debug with command line in Chrome

I am recently working on dojo. And sometimes I need the help of chrome debugger help to understand how the function actually works. But right now, I have a problem. I want to add a breakpoint at a specified function. I know the function name already. But since the dojo source file is compressed, I cannot add the breakpoint at the specifi...

patterns/patterns for designer-webdeveloper communication

as the title implies i am searching for a good pattern / schema collection that makes designer <-> webdeveloper communication less ambiguous when it comes to javascript effects and dynamic content loading. google just provided me with the shorthand markup by ryan singer, but this seems to be restricted to page/ui flows. can you recomme...

JavaScript variable to ColdFusion variable

I have a tricky one. By means of a <cfoutput query="…"> I list some records in the page from a SQL Server database. By the end of each line viewing I try to add this in to a record in a MySQL database. As you see is simple, because I can use the exact variables from the output query in to my new INSERT INTO statement. BUT: the rsPick....

Javascript : Jump to next cell in a table

Hi, I have a table wherein the first column is a checkbox and the second one has a text. Whenever, the checkbox is checked, I want to know the corresponding value which is in the next cell. Please tell me how to do. If I use the getelementsbytagname function, it returns from the start of the document. ...

jQuery/Javascript auto tab index lock/select?

I have a simple display project and want to cut out the mouse from the equation, the page only has one field (a search field) and I want the browser to be locked into to the field remove the need for a mouse while keeping it user friend for those who don't know how to maneuver without a mouse. Can it be done with jQuery/Javascript? I do...

YUI Dialogs: Instantiate one and show/hide several times? Or instantiate a new one each time?

If I was using the YUI to show a dialog which I might want to appear, say, five times in the course of a page, would it be better to: A) Instantiate one, and then show and hide it several times? or B) Instantiate a new one each time it's to be displayed, then dispose of it? First option seems like it'd be faster. Second option see...

How to add more options in Javascript dependent options?

Hello everybody! I want to add more dropdown options in this file: http://parseven.com/java_ex.html Now it has two and I want to make three more. Third option must be dependent on second option and so on. Please advise me. Thanks in advance. ...

templates vs DOM creation - highly dynamic interface

Hi, Building a browsergame I came from PHP to JavaScript, which I now also want to use at the server side. As I'm going to require Users to have JavaScript either way, I'm going to take extensive use of it. I want to use in in a object-oriented way though. Considering MVC, Models will be used on both client and server side. Views are on...

Using arrow keys with jQuery scrollTo

Hi, I have successfully implemented the scrollTo jQuery plugin which scrolls to the next div with the class "new" when a link is clicked. However, I would also like to be able to use the arrow keys to scroll up and down to the next/previous divs of the same class. I have looked all over the internet but have been unable to find out how...

calll html button onclick event from asp server side login authenticate event

Need to programmatically click an html button from a login event (code behind? the html button sends variables to Flash using method: no response - with no postback and uses ExternalInterface API via javascript. Going from SWF > ASPX is great, but need to send User.Identity to SWF from ASPX via javascript after authenticate with login e...

Object doesn't support this property or method javascript error in IE6 only

I've searched the internet and this great stackoverflow.com site particularly, but cannot help myself. I am not very experienced programmer and a friend of mine asked me to fix the bug that is on IE6 only. It works on FF, IE7/8, Opera. Here is the PART of the code that gives error message on IE6: (function(d, n, r) { var ie, jscript, ...

Returning data from jQuery ajax request

I'm trying to get a function to perform an ajax query and then return the interpreted JSON as an object. However for whatever reason, once this request is performed, the data is only accessible from within the function. function getCacheImage(direction) { jQuery.ajax({ url: json_request_string, ...

Is there a way to capture x-browser paste events in mootools?

I want to capture when a user pastes data into a text input field using mootools event system. Anyone have experience of this? ...

Will an image with style="display: none" still be downloaded and cached?

I'm trying to figure out a way to cache the next and previous images in my gallery script ... I'm wondering if this is a good way to do it. Also, is there any way to manually specify the cache time for the downloaded image? ...

How to get a selection option in jQuery

I have a question about jQuery. Let's say I have a dropdown list: <select id="Positions" name="PositionType"> <option value="Manager">Manager</option> <option value="Janitor">Janitor</option> <option value="Cook">Cook</option> <option value="Cashier">Cashier</option> <option value="Other">O...

Very Simple Image Gallery

Does anybody have any suggestions as to where I could get a really simple gallery (projected below) that uses the basic html framework of the following snippet? A previous-next gallery <ul> <li><img src="image01.jpg" width="500" height="450"></li> <li><img src="image02.jpg" width="200" height="450"></li> <li><img src="image03.jpg"...

Using jQuery on dynamically added content

Hello, I am newbie to jQuery and javascript. In my application I have a list of users. When a particular user is clicked from the list, a div element is replaced with details about the user dynamically. When another user is clicked, again I replace the same div element with this user details. So at a time only one user details can be see...

Using JavaScript to invalidate the browser's cache

I'm doing a project in Django and using djangos-css (http://github.com/dziegler/django-css) and Sass (http://sass-lang.com/). The Sass files are served in development using django-css. I want to write a JavaScript routine that will every one second retrieve the CSS assets. The purpose of this is so that the designer can edit the Sass ...

GUI items and elements in Javascript

How do i make boxes similar to theses? I would like a X on the top right. Text on the left of it and the text below the image where the black area is. When i click on X it will remove these and the box on the right moves over and takes it place. How might i create this using jquery? is there some kind of GUI and container i could use to ...