I have a section at the bottom of one of my pages that gets data that can be further filtered by weeks. Users can click on any of the weeks to see the data that applies only to that week. This works just fine, but when the function finishes and replaces the html content of the div, the page jumps to the top so that the user has to scroll back down to see the results. I'd like to avoid that. [code]...
It's nothing terribly complicated. The 'weekSelection' links are disabled until a stakeholder is chosen, then they're good to go. The weird bit at the url variable is just some ASP.NET MVC stuff.The StakeholderForecasting div gets its contents replaced and all will be good as soon as I can maintain the page's position.
The code for the pop window is: <a href="#" onClick="MM_openBrWindow('alabaster/pop1.html','alabaster','width=490,height=630')">View large image</a>
The problem I am having is that on the main content page, you scroll down, click on link to pop up (page loads) but the main parent content jumps back to the top of page, meaning you have to scroll back down to where you were.
I'm not much of a javascript developer. This is my second project using collapsing/expanding content.
Code has been simplified for display here.
The code below works, but any time someone clicks the [-] or [+] to expand or collapse rows of the table, the browser flips the user back to the top of the page. This happens in FF and IE.
When my page loads, it automatically jumps down as if it were jumping to a named anchor. It's more apparent on longer pages (doesn't replicate if page fills screen). Happening in Win FF/IE/Chrome Disabling stylish-select.js (from [URL] where he used to allow comments but not anymore) fixes it, but I don't know enough Javascript to debug, Good example at [URL] Script is at [URL]
OK so Ive been using jquery for a little bit now and love it. I am a ColdFusion developer. I have a need where I would like to present the user with a list of categories and the user can drag and drop to sort, but then I need to post this new sort order to the database. So I see there are a ton of cool drag & drop plugins for jquery. I understand how they work and I can get it to work as far as spitting out DIVS or spitting out ULs that can be sorted, but then what? So now they are sorted on my screen and not really part of the form. How do I translate that into something I can do a post to the database with? Do I do an AJAX call every time they drop an item and try to extrapolate the sort order on that item after they drop it? Do I populate a hidden form field with the constantly updating sort order list? MAybe a list of ID's? How does everyone else go about this this task? I'm sure there is more than one way and I'm sure this is a common task.
I am using the excellent jquery.tablesorter successfully for a large number of 40-row tables that live together on one page. So far I'm very happy with the plugin. My users also need the ability to apply any column sort they invoke automatically to *all* tables on the pae. They do not wish to sort the tables individually. As recommended in another thread, I have been looking at sortStart and sortEnd, but have been pulling my hair out trying to get this working. My JS:
<script type="text/javascript" charset="utf-8"> $(document).ready(function() { // extend the default setting to always sort on the first column $.tablesorter.defaults.sortList = [[0,0]];
i am curious if there is a simple solution to this very common problemim sure lots get.i have a div with some children items in it and when i fade one ofthem out the div jumps down to the appropriate height. i would like toknow is there a simple way to animate the div to shrink nicely insteadof just jumping to its new size?
When i click the link to make the content (TABLE) visible, it jumps open then collapse and then slides down. Closing the content is not an issue, it slides up normally.
So I have an HTML page with javascript that takes input values, computes some results, and then puts these results in a table. Works great. Now I realize some users might want to print just the results table. So I add a button that allows the user to request the table in a separate window; clicking the button invokes a script to re-create the table in a separate window. Works fine except:
* In the status bar, the window appears to never finish loading * If you go to File -> Print then nothing seems to happen; however, if you close the generated window _then_ the print dialog appears; the window you want to print, however, is gone.code...
My table columns are sorted by the Tablekit library [URL]. The user can click the columns to toggle the sort order either ascendingly or descendingly. I can save the current sort order (preference) in the server. After the page is refreshed, the web page is sorted by the original sort order. How to make the Tablekit library to sort with the current sort order after page refresh? My web page column is: <th class="sortfirstdesc" id="urgency" onClick="reverseOrder($sortdesc)">ID</th>
I want to have a window pop up with a form. When the form is submitted, it needs to pass along the URL of the original window. If find on th web eight gazillion descriptions of how to pass data from one page to another via hidden fields, but not a word about how to pass that data a second time. Code:
I have an AJAX script which is used for a "live search" type function.When a user begins to type their search, after 3 characters, my AJAX script jumps into action and shows them a list of possible results.I has worked fine for months, and now suddenly I have found that it is causing a javascript error.I have traced the error down to the "open" call... ie: this.xmlHttp.open("GET", url, true);Like I said, this has worked for ages and I haven't changed these files since I got them working.
I'm really struggling to write a bit of JS that displays the amount of time left to when your order will be shipped.For Example: If it's
1:05pm on Sunday, it would say: "Place your order within the next 1 day 2 hours 55 minutes and your order will ship Monday"
Another example: If it's 2:00pm on Saturday, it would say: "Place your order within the next 2 hours and your order will ship today"
I need to be able to change the cut off point from 4pm if needed...It must also ignore bank holiday (Ideally, it would have a section in the code where I could put all 'excluded' dates, e.g. 12/25/2009, 01/01/2010, etc. - This way I could keep it up to date).The code must take into account that we only deliver Monday to Friday (Therefore on a Friday after 4pm, it would not say delivery tomorrow, but Monday).Once the deadline hits (4pm), the countdown jumps back up to accommodate tomorrow's deadline, etc.Amazon does a very similar thing,
I can't find any syntax for how to sort something with JQuery but here's a description of what I'm wanting to do.[code]
1. Start with the list of matches, in order. Introduction comes first. 2. Sort the segments by segmentOrder first, segmentNum second. 3. Insert each segment after match #(segmentOrder), in the same order.
For example when row two is clicked I would like the table to reorder a, b, c, d <table><tr> <td>col 1</td> <td>col 2</td> <td>col 3</td> <td>col 4</td> </tr><tr> <td>b</td> <td>a</td> <td>d</td> <td>c</td> </tr><tr> <td>z</td> <td>x</td> <td>y</td> <td>w</td> </tr></table>
I have a list of records from my database being displayed on this page. I want to be able to sort the columns. Typically, I do this with an HTML table, but was wondering if there is a way I can setup the below code using jQuery to allow for the column headers to be sortable? I have an icon to sort up and an icon to sort down.My goal is to allow the user to sort the data without a page refresh.
<div class="header"> <ul> <li style="width: 20%;">Customer Number <img src="images/iconSort.gif" /></li>
Having a little bit of trouble with a site I'm currently working on I'm using some AJAX for the instant g-mail/facebook style navigation, you know the kind, with no refreshes, etc. Problem is, to allow for back/forward and bookmarks, I currently use a URL that looks like:[URL].. This is fine, not a problem... The issue comes into play when I want to open up the news.html page, from my home.html page, and have it open to news item #6 (for example).
I can't add a #, because one is already being used to reference the anchor for the content div. Has anyone run into a similar problem before? If so, how did you resolve it? Can some jQuery be used to find the location of the news item div in question, on load, and scroll to it like that?
I have a table that sorts in jquery and I have one column that I would like to always remain the same while the other columns sort around it. What I want is for the order of the column to always be Great, Bad, Failure while every other column can be sorted. What is the easiert way for me to do this?
I'm fairly new to Tablesort, but got it working for the most part. The only problem I have is any columns that have a <a href></a> in them. It seems to sort it based on the url and not that actual data in the cell. How do I get it to sort based on the data and not the url?