Search Results

Search found 2932 results on 118 pages for 'solled scroll'.

Page 48/118 | < Previous Page | 44 45 46 47 48 49 50 51 52 53 54 55  | Next Page >

  • Correctly calling setGridWidth on a jqGrid inside a jQueryUI Dialog

    - by Dan
    I have a jQueryUI dialog (#locDialog) which has a jqGrid ($grid) inside it. When the Dialog opens (initially, but it gets called whenever it opens), I want the $grid to resize to the size of the $locDialog. When I do this initially, I get scrollbars inside the grid (not inside the dialog). If I debug the code, I see the width of the $grid is 677. So, I call setGridWidth() again and check the width and now I have 659, which is 18px less, which is the size of the scroll area for the jqGrid (Dun-dun-dun..) When I rezie the dialog, I resize the grid as well, and everything is happy - no scrollbars, except where necessary. My dialog init code: $locDialog = $('#location-dialog').dialog({ autoOpen: false, modal: true, position: ['center', 100], width: 700, height:500, resizable: true, buttons: { "Show Selected": function() {alert($('#grid').jqGrid('getGridParam','selarrrow'));}, "OK": function() {$(this).dialog('close');}, "Cancel": function() {$(this).dialog('close');} }, open: function(event, ui) { $grid.setGridHeight($(this).height()-54); // No idea why 54 is the magic number here $grid.setGridWidth($(this).width(), true); }, close: function(event, ui) { }, resizeStop: function(event, ui) { $grid.setGridWidth($locDialog.width(), true); $grid.setGridHeight($locDialog.height()-54); } }); I am curious if anyone has seen this before. Really, it isn't the end of the world if I initially have unnecessary scrollbars at first, but it is just odd that when I call setGridWidth initially, it doesn't take into account the scroll area of 18px. As far as the magical number 54, that is the number I had to subtract from the height of the dialog value to get the grid to render without unnecessary scrollbars.

    Read the article

  • ExtJS GridPanel Scrollbar does not appear in IE7 but it does in Firefox, etc

    - by Snowright
    Setup I have an accordion layout containing a "properties" panel that nests two inner panels. The first inner panel holds a Ext.DataView, while the second panel is the Ext.grid.GridPanel in question. In the screenshot below, the white space containing the folder icon is the dataview, and below that is the gridpanel. Problem In Firefox, Chrome, and Opera, there is a scrollbar that appears when my gridpanel has an overflow of properties. It is only in Internet Explorer that it does not appear. I am, however, able to scroll using my mouse scroll button in all browsers, including IE. I've also tried removing our custom css file in case it was affecting it somehow, but there was no change in doing so. I'm not sure exactly what code I should show as I don't know where the exact problem is coming from but here is the code for the mainpanel and gridpanel. var mainPanel = new Ext.Panel({ id : 'main-property-panel', title : 'Properties', height : 350, autoWidth : true, tbar : [comboPropertyActions], items : [panel1] //panel1 holds the DataView }); var propertiesGrid = new Ext.grid.GridPanel({ stripeRows : true, height : mainPanel.getSize().height-iconDataView.getSize().height-mainPanel.getFrameHeight(), autoWidth : true, store : propertiesStore, cm : propertiesColumnModel }) //Add gridpanel to mainPanel mainPanel.add(propertiesGrid); mainPanel.doLayout(); Any help into the right direction would be greatly appreciated. Thank you.

    Read the article

  • how does scrolling in android listview work?

    - by gartenkralleb
    hi, i have an android-app with a listview in an activity. the listview has, if i call it so, three data states. no data loaded from inet - only one dummy item is visible, saying that data is loading data is loaded and shown in list one listitem is clicked and now shows more information for this listitem (so it is increased in its height) on every state change (1 - 2, 2 - 3) i call notifyDataSetChanged() on this ListAdapater. this causes the listview to scroll down to the last item. this is ugly in the first transition and even more ugly in the second because the clicked list item is now out of focus. as i can see, this happens with a google g1 with android 1.6. a htc touch with the same sdk acts like desired (i try to figure it out with some more devices). to avoid this i tried to read out getScrollY() and set this value back. but this returns 0. the reason for this return value i already found on stackoverflow in other qutestions. does anyone else comes along with my problem so far? why does the listview scrolls to the last item? it was mentioned, that listview does keep track on the scroll position. but it seems that it does not in my case. or may i call the wrong refresh method? is notifyDataSetChanged the correct one?

    Read the article

  • Reset scale/width/zoom of Safari on iPhone using JavaScript/onorientationchange

    - by dwarbi
    I am displaying different content depending on how the user is holding his/her phone using the onorientationchange call in the body tag. This works great - I hide one div while making the other visible. The div in portrait mode looks great on first load. I use this to get the right scale/zoom: <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0;" /> Even if the content in portrait mode run over, the width is correct and the user can scroll down. The display in landscape mode is perfect too. However, if content in landscape mode requires the user the scroll down, then when the user returns to portrait mode, the screen is "zoomed out" so to speak. This happens whether or not the user scrolled down while in landscape mode. I've tried many different things to try to get the scale/zoom/width of the screen right, but no luck. Is there any way to do this? Thanks in advance!

    Read the article

  • jqGrid with JSON data renders table as empty

    - by jgreep
    I'm trying to create a jqgrid, but the table is empty. The table renders, but the data doesn't show. The data I'm getting back from the php call is: { "page":"1", "total":1, "records":"10", "rows":[ {"id":"2:1","cell":["1","image","Chief Scout","Highest Award test","0"]}, {"id":"2:2","cell":["2","image","Link Badge","When you are invested as a Scout, you may be eligible to receive a Link Badge. (See page 45)","0"]}, {"id":"2:3","cell":["3","image","Pioneer Scout","Upon completion of requirements, the youth is invested as a Pioneer Scout","0"]}, {"id":"2:4","cell":["4","image","Voyageur Scout Award","Voyageur Scout Award is the right after Pioneer Scout.","0"]}, {"id":"2:5","cell":["5","image","Voyageur Citizenship","Learning about and caring for your community.","0"]}, {"id":"2:6","cell":["6","image","Fish and Wildlife","Demonstrate your knowledge and involvement in fish and wildlife management.","0"]}, {"id":"2:7","cell":["7","image","Photography","To recognize photography knowledge and skills","0"]}, {"id":"2:8","cell":["8","image","Recycling","Demonstrate your knowledge and involvement in Recycling","0"]}, {"id":"2:10","cell":["10","image","Voyageur Leadership ","Show leadership ability","0"]}, {"id":"2:11","cell":["11","image","World Conservation","World Conservation Badge","0"]} ]} The javascript configuration looks like so: $("#"+tableId).jqGrid ({ url:'getAwards.php?id='+classId, dataType : 'json', mtype:'POST', colNames:['Id','Badge','Name','Description',''], colModel : [ {name:'awardId', width:30, sortable:true, align:'center'}, {name:'badge', width:40, sortable:false, align:'center'}, {name:'name', width:180, sortable:true, align:'left'}, {name:'description', width:380, sortable:true, align:'left'}, {name:'selected', width:0, sortable:false, align:'center'} ], sortname: "awardId", sortorder: "asc", pager: $('#'+tableId+'_pager'), rowNum:15, rowList:[15,30,50], caption: 'Awards', viewrecords:true, imgpath: 'scripts/jqGrid/themes/green/images', jsonReader : { root: "rows", page: "page", total: "total", records: "records", repeatitems: true, cell: "cell", id: "id", userdata: "userdata", subgrid: {root:"rows", repeatitems: true, cell:"cell" } }, width: 700, height: 200 }); The HTML looks like: <table class="awardsList" id="awardsList2" class="scroll" name="awardsList" /> <div id="awardsList2_pager" class="scroll"></div> I'm not sure that I needed to define jsonReader, since I've tried to keep to the default. If the php code will help, I can post it too.

    Read the article

  • UISegmentedControl with UITableVIew NSRangeException

    - by Vivas
    Hi, I am using one UIViewController as shown: @interface RssViewController : UIViewController <UITableViewDataSource,UITableViewDelegate,BlogRssParserDelegate> I am displaying an RSS feed in the UITableView (in RssViewController) depending on the segment selected on the UISegmentedControl. My app crashes when I scroll the tableview then select another segment of the UISegmentedControl. For example I have two RSS feeds by default I am displaying the RSS feed at segment 0. This feed has 36 rows. The RSS feed that I load at segment 1 has only 5 rows. When I scroll the RSS feed at segment 0 THEN before the scrolling stops I switch to the RSS feed at segment 1 I crash the app with the following error: * Terminating app due to uncaught exception 'NSRangeException', reason: '* -[NSCFArray objectAtIndex:]: index (36) beyond bounds (0)' If I wait till the scrolling on the RSS feed at segment 0 stops THEN select segment 1, everything works fine. How can I stop this crashing? I wanted to reuse the same tableview because only the data changes. I can see that it is crashing because of the row count - I went from 36 rows down to 5 rows BUT how can I fix this? Any help / suggestions would be appreciated.

    Read the article

  • iPhone SDK UIScrollView doesn't get touch events after moving it

    - by newbie
    Hi! I'm subclassing UIScrollView and on the start I fill this ShowsScrollView with some items. After filling it, I setup frame and contentSize to this ShowsScrollView. Everything works fine for now, i get touches events, scrolling is working.. But after rotation to landscape, I change x and y coordinates of ShowsScrollView frame, to move it from bottom to top right corner. Then I resize it (change width and height of ShowsScrollView frame) and reorder items in this scroll. At the end I setup new contentSize. Now i get touches event only on first 1/4 of scrollview, scrolling also work only on 1/4 of scrollview, but scroll all items in scrollview. After all actions I write a log: NSLog(@"ViewController: setLandscape finished: size: %f, %f content: %f,%f",scrollView.frame.size.width,scrollView.frame.size.height, scrollView.contentSize.width, scrollView.contentSize.height ); Values are correct: ViewController: setLandscape finished: size: 390.000000, 723.000000 content: 390.000000,950.000000 On rotating back to portrait, I move and resize all thing back and everything works fine.. Please help!

    Read the article

  • ExtJS: Autoscroll vertical FormPanels added to panel

    - by Sarge
    Hi All, I'm writing an app where I have a BorderLayout for the entire page. In the south part I have a Panel to which I add FormPanels. I would like to be able to scroll that Panel so I can scroll through the FormPanels. So far, nothing I've found from searches has helped. I don't quite understand what ExtJS requires in terms of the combination of LayoutManagers, setting the size and setting AutoScroll. Any partial tips will be gratefully followed up. A code snippet: createTrailJunctionPanel = function(trailJunction) { var trailJunctionPanel = new Ext.form.FormPanel({ labelWidth: 75, width: 350, defaultType: 'textfield', items: [{ fieldLabel: 'Junction Name', name: 'junction-name' }], autoScroll:true, //anchor: '100% 100%', height: 100 }); matchedTrailJunctionsPanel.add(trailJunctionPanel); if(trailJunction.publicTrailSegments.length == 0) { matchedTrailJunctionsPanel.add(new Ext.form.Label({text: 'No public trails matched'})); } else { var grid = new Ext.grid.GridPanel({ store: mapMatchObjectStore, columns: [ {id:'publicTrailSegment',header: 'Trail', width: 160, sortable: true, dataIndex: 'publicTrailSegment'} ], stripeRows: true, autoExpandColumn: 'publicTrailSegment', height: 350, width: 600, title: 'Matched Trail Junctions' }); matchedTrailJunctionsPanel.add(grid); } matchedTrailJunctionsPanel.doLayout(); } matchedTrailJunctionsPanel = new Ext.Panel({ title: "Matched Trail Junctions2", id: "matched-trail-junctions", autoScroll:true //layout: 'anchor' });

    Read the article

  • LinearLayout not expanding inside a ScrollView

    - by Felix
    I have a LinearLayout inside a ScrollView that has android:layout_height="fill_parent", but it doesn't expand to the full height of the ScrollView. My layout looks something like: level layout layout_width layout_height 1 LinearLayout fill_parent fill_parent 2 LinearLayout fill_parent wrap_content 3 (some irrelevant stuff) 2 ScrollView fill_parent fill_parent <-- this expands full height 3 LinearLayout fill_parent fill_parent <-- this does not (has orientation=vertical) (following stuff probably are irrelevant, but just to be sure:) 4 TextView fill_parent fill_parent 4 LinearLayout fill_parent wrap_content I can see that the LinearLayout doesn't expand the full height of the ScrollView because in Eclipse in Android Layout Editor, if I select the ScrollView (in the Outline panel) it is highlighted with a red border that fills the screen to the bottom but when I select the LinearLayout its highlight doesn't expand to the bottom of the screen. How can I get it to do so? The effect I'm trying to achieve is to have some text and a button below it (inside the LinearLayout in level 4 there's just a button). The text can be big enough to need a scrollbar, in which case I want the user to have to scroll down in order to see the button. In case the text is not big enough for a scroll bar, I want the LinearLayout containing the button to stick to the bottom of the screen.

    Read the article

  • Custom UITableViewCell won't redraw on setNeedsDisplay

    - by Andrew Portner
    I created a custom UITableViewCell class with a UIButton, a UIImage, and two UILabels. The button and the image are overlayed on top of each other, and only one is displayed at a time. The expected behavior is you touch on the button, the button disappears, and it displays the image. The UITableViewCells are set to be reused. Here's my code: Constructor: - (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier { if (self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]) { unheartButton = [[UIButton buttonWithType:UIButtonTypeCustom] retain]; unheartButton.backgroundColor = [UIColor clearColor]; unheartButton.frame = CGRectMake(10, 13, 20, 18); [unheartButton addTarget:self action:@selector(onButtonClick:) forControlEvents:UIControlEventTouchUpInside]; [unheartButton setBackgroundImage:[UIImage imageNamed:@"redheart.png"] forState:UIControlStateNormal]; imageView = [[UIImageView alloc] init]; imageView.frame = CGRectMake(12, 13, 16, 16); NSMutableArray *array = [[NSMutableArray alloc] init]; for (int ndx = 1; ndx < 13; ndx++) { [array addObject:[UIImage imageNamed:[NSString stringWithFormat:@"icon-loading-%d (dragged).tiff", ndx]]]; } imageView.animationImages = array; imageView.animationDuration = 1; imageView.hidden = YES; [array release]; [self.contentView addSubview:imageView]; [self.contentView addSubview:unheartButton]; return self; } } Button click: - (IBAction) onButtonClick: (id) sender { unheartButton.hidden = YES; imageView.hidden = NO; [imageView startAnimating]; [self setNeedsDisplay]; [self.contentView setNeedsDisplay]; [self.unheartButton setNeedsDisplay]; [self.imageView setNeedsDisplay]; } I'm calling setNeedsDisplay on everything, but nothing seems to happen. If I scroll off the screen and back up, the button is hidden and now the loading icon is shown, but this only happens after a scroll. I'm not sure what I need to do to get the cell to repaint.

    Read the article

  • Flex HTMLLoader component not raising mouseDown events for all mouse clicks

    - by shane
    I have built a Air 2/Flex 4 kiosk application with Flash Builder 4. Currently I am implementing a touch screen browser to enable users to navigate company training videos. In an attempt to improve the usability of the website on the touchscreen I have placed the HTML component in an adaption of Doug McCune's DragScrollingCanvas (updated to use the flex 4 'Scroller' component) to allow users to scroll the webpage by dragging their finger across the screen. The mouseDown event is used to start scrolling the viewport. In addition the webpage was modified to disable text selection with the following css: html { -webkit-user-select: none; cursor: default; } The problem I face is that the HTMLLoader component only fires a mouseDown if a link/input/button on the webpage is clicked, not when the background or any text is clicked. In addition if I remove the custom css the mouseDown event will not fire when text is being selected, but will if previously highlighted text is clicked. As an alternative I also tried adding a group container with the same dimensions as the HTMLLoader to detect the mouseDown events (so that the group container and HTMLLoader have the same Dragable parent container) and was able to capture mouseDown events and scroll the viewport as expected. However as the mouse event is handled by the group container, I am now unable to navigate the webpage. Does anybody know why the HTMLLoader component is not raising mouseDown events for all mouse clicks?

    Read the article

  • c# ListView unable to check a checkbox! Strange problem.

    - by Kurt
    This is a strange problem, I've not added much code as I don't know were to start. I have a listview control in virtual mode, if I filter the listview to show me all people called John, I then see 3 users called John, I then cancel the filter setting all values to null and return all data to the listview, I now have several hundred items in the list but I can only see 30 on screen unless I scroll down the listview. I then use the code below to check a checkbox in each row, all get checked apart from the 3 Johns but if I can see 1 of the 3 Johns in listview without scrolling and then run the code below the visible John is checked. for (int i = 0; i < this._items.Count; i++) { this._items[i].Checked = true; } I have checked the status of the checkbox just before it is checked in the above code and if John is visible then the checkbox believes it is unchecked (false), if it is not visible it belives it is checked (true). So having one visible John on screen the checkbox looks unchecked and running a test proves it is unchecked, for the two Johns I can't see they believe they are checked but if I scroll down so I can see them they aren't. Any ideas? Thanks

    Read the article

  • Eliminate horizontal scrolling in div in favor of horizontal scrolling in browser window

    - by Casey Flynn
    I have a div, set to 800px wide, that will automatically scroll horizontally if the browser window is resized to < 800px. The behavior I would like, is to have the browser window scroll instead of the div. It would seem simple but for some reason I'm getting hung up on it. Any ideas? The page in question: http://www.caseyflynn.com/game/ The div CSS: div#main_container { border: 1px solid #FFF; width:800px; margin-left:auto; margin-right:auto; padding:0px; background-color:#FFF; overflow:hidden; } The BODY CSS: html, body { background-color:#000; border:0px; margin:0px; padding:0px; font-family : Arial, Helvetica, sans-serif; font-size : 62.5%; overflow:auto; } I'm assuming anyone looking at this will have the ability to see the HTML and the CSS. Thanks!

    Read the article

  • Help with inner content box margins/padding

    - by Wolfgang
    I am working on a layout for a new site, and I'm having some trouble achieving what I want with the CSS. First of all, I want everything to always stay within the view of the current browser window, with scroll being in my content and not the browser itself. I have an outermost DIV which acts as my "wrapper" for the site displayed centered, with a set width, and having 100% height of the bowser window. Inside of this I place a header and all of this works as intended in all interested browsers. However, once I place my actual content DIV inside this "wrapper" I am unable to define it to be the size I want. If I simply give it margins or padding to make up for the header I have absolutely positioned, the content will overflow and I can't set scroll. And if I try to set the size directly, there are no values I can put in that will work since the margins/padding will add to the size and it will now be bigger than the current browser window, and overflow. Are there any styles people can think of I can use on the wrapper/content DIV(s) to get the desired look? Here is a diagram illustrating the look I want.

    Read the article

  • Scrollable list items in jQuery

    - by Giles B
    Hi Guys, I have a list of 4 items and the ul has a background image that makes the second item look as though it has an arrow behind it. I want to be able to scroll the items up or down when they are clicked to the second items position so for example when I click the fourth item the whole list scrolls up so the fourth item is then postioned over the top of the background image and all the other items will be sitting in the same order above it. I have tried using jQuery Tools with the circular option selected but it clones the first an last item and i end up with a gap when i get to the bottom and I also cant make each item selectable to scroll the list up or down. Here is the code for the list <div id="priceGuide"> <ul id="priceRegion"> <li><a href="#">North & Midlands</a></li> <li><a href="#">London, north of the river</a></li> <li><a href="#">London, south of the river</a></li> <li><a href="#">South & South East</a></li> </ul><!-- /priceRegion --> </div><!-- /priceGuide --> Any help is most appreciated. Thanks Giles

    Read the article

  • How to determine if "html" or "body" scrolls the window.

    - by David Murdoch
    The code below is used to find the element that can be scrolled (body or html) via javascript. var scrollElement = (function (tags) { var el, $el, init; // iterate through the tags... while (el = tags.pop()) { $el = $(el); // if the scrollTop value is already > 0 then this element will work if ( $el.scrollTop() > 0){ return $el; } // if scrollTop is 0 try to scroll. else if($el.scrollTop( 1 ).scrollTop() > 0) { // if that worked reset the scroll top and return the element return $el.scrollTop(0); } } return $(); } (["html", "body"])); // do stuff with scrollElement...like: // scrollElement.animate({"scrollTop":target.offset().top},1000); This code works perfectly when the height of the document is greater than the height of the window. However, when the height of the document is the same or less than the window the method above will not work because scrollTop() will always be equal to 0. This becomes a problem if the DOM is updated and the height of the document grows beyond the height of the window after the code runs. Also, I generally don't wait until document.ready to set up my javascript handlers (this generally works). I could append a tall div to the body temporarily to force the method above to work BUT that would required the document to be ready in IE (you can't add a node to the body element before the tag is closed). For more reading on the document.ready "anti-pattern" topic read this. So, I'd love to find a solution that finds the scrollable element even when the document is short. Any ideas?

    Read the article

  • iPhone sdk Cocoa Touch - Pass touches down from parent UIView to child UIScrollview

    - by Joe
    I have a UIView inside my xib in IB and inside that is a UIScrollview that is a small 80x80 square and dynamically loaded with 8 or so 80 x 80 thumbnail images. The UIScrollview is not clipping the images so that they extend out either side so you can swipe left and right to scroll a chosen image into the the centre, paging is on so they snap ti each image. I have researched and found this is the best and possibly only way to do this. The UIScrollview sits in a 'container' UIView for one reason, it is there to receive the touches/swipes and pass them down to it's child the UIScrollview as otherwise all touches would have to start in the small 80x80 UIScrollview area and I wan them to be anywhere along the row of images. I have seen some sample code somewhere for doing this but just can not implement it. Treat me as a noob, starting from beginning to end, how should the UIView and UIScrollview be set up in IB to allow any touches to be passed, and what code should I put into where? The UIView is set up as scroll_container and the child UIScrollview is char_scroll At the moment I have got it all working except for the touches being passed from the parent to the child, and at the moment the touches have to always start inside the UIScrollview (tiny 80x80 box in centre) when I want to be able to swipe left or right in the long 480X80 horizontal parent UIView and have this still scroll the child UIScrollview. Hope you can help and understand what I mean!

    Read the article

  • Scrolling screen upward to expose TextView above keyboard

    - by Matt Winters
    I think I'm missing something obvious and would appreciate an answer. I have a view with a 2-section grouped tableView, each section having one row and a textView, the heights of the rows 335 and 140. This allows for a box with nicely rounded corners to type text into when the keyboard appears (140 height section) and when the keyboard is dismissed, a nice box to read more text (notes); most of the time, use is without the keyboard. I also added a toolbar at the bottom of the screen to scroll up above the keyboard. A button on the toolbar dismisses the keyboard. This last part works fine with the keyboard going up and down using a notification and the following code in a keyboardWillShow method: [UIView beginAnimations:@"showKeyboardAnimation" context:nil]; [UIView setAnimationDuration:0.50]; self.view.frame = CGRectMake(self.view.frame.origin.x, self.view.frame.origin.y, self.view.frame.size.width, self.view.frame.size.height - 216); [UIView commitAnimations]; But with the above code, the 2 sections of the tableView remain unscrolled, only the toolbar and the keyboard move. With the following code (found both in previous posts), both the toolbar and the tableView sections move. [UIView beginAnimations:nil context:NULL]; [UIView setAnimationDuration:0.50]; CGRect rect = self.view.frame; rect.origin.y -= 216; self.view.frame = rect; [UIView commitAnimations]; Now I know that I have to tweak the numbers to get the everything as I want it but my first question is what is substantively different between the 2 sets of code that the sections move in the 2nd but not in the 1st? The toolbar also moves with the 2nd code. The second question is, am I going to be able to scroll the smaller height section from off the screen to above the keyboard while at the same time moving the toolbar up just 216? Thanks

    Read the article

  • NSScrollView frame and flipped documentView

    - by StrAbZ
    Hi, I have problems with NSScrollView, It is not displayed the way I want. Yes I know there is a lot of post about it around the web, I need to override the isFlipped, in order to make it return YES, in my NSView subclass. Ok, it's done, so now, my scrollView scroll from top to bottom, and not in the reverse way, as it was before overriding isFlipped. But, this is the second part, my real problem, which I didn't found any answer on the web, how the hell I'm supposed to code, or create my view in interface builder, if everything is flipped? If I put something at the top, it is displayed a the bottom… do you have any magic trick to handle that? And my last problem, is the NSScrollView frame. before setting the documentView of my scroll view, everything is fine, the scrollView is displayed at the place I choose, but, when I set the document view, it looks like the scrollview frame looks bigger, so I have to resize it…. is this a normal behavior? Thank you very much.

    Read the article

  • jcarousel, I need :active state on external controls

    - by TJ Sherrill
    I am running a Jcarousel and I want to add a.active to the current pagination option. I have seen other posts around about this same thing. /** * We use the initCallback callback * to assign functionality to the controls */ function mycarousel_initCallback(carousel) { jQuery('.jcarousel-control a').bind('click', function() { carousel.scroll(jQuery.jcarousel.intval(jQuery(this).text())); return false; }); jQuery('#mycarousel-next').bind('click', function() { carousel.next(); return false; }); jQuery('#mycarousel-prev').bind('click', function() { carousel.prev(); return false; }); }; // Ride the carousel... jQuery(document).ready(function() { jQuery("#mycarousel").jcarousel({ scroll: 1, initCallback: mycarousel_initCallback, // This tells jCarousel NOT to autobuild prev/next buttons buttonNextHTML: null, buttonPrevHTML: null }); }); </script> Thats the initialize code and the pagination lives inside: <ul class="jcarousel-control"> <% ([email protected]).each do |n| %> <li><a href="#"> <%= n %></a></li> <% end %> </ul> Its a rails app, so rails is creating the list based on the number of projects in the group. Any ideas? Seems like it should be pretty simple.. But I don't know js at all.

    Read the article

  • CSS absolute DIV causing other absolute DIV problems

    - by Tim
    Hello, I have implemented a chat script which requires an absolutely positioned DIV to be wrapped around the pages content. This is to ensure the chat windows stay at the bottom. The problem is that because of the absolute positioning of this main wrapper, all other absolutely positioned elements (eg. Jquery Auto-completes, datepicker's etc) now scroll up and down with the page. Here is an example of the HTML: <body> <div id="main_container"> <div id="content">Elements like Jquery Autocompletes, Datepickers with absolute positioned elements in here</div> </div> The DIV "main_container" style looks like this: #main_container { width:100%; background-color:#ffffff; /* DO NOT REMOVE THIS; or you'll have issue w/ the scrollbar, when the mouse pointer is on a white space */ overflow-x: hidden; overflow-y: scroll; height:100%; /* this will make sure that the height will extend at the bottom */ position:absolute; /* container div must be absolute, for our fixed bar to work */ } I hope there is a simple fix as the chat script is too good to get rid of. Thanks, Tim

    Read the article

  • Javascript error when attempting to open a modal window in a modal window

    - by The Sheek Geek
    The application is running on a windows server 2003 box using asp.net 2.0 and is an IE specific web app. There is a button that opens a form in an iframe using showModalDialog(...) from a function call located in the javascript. Here is an example of the fucntion: function ShowBusinessHoursSubForm( source ) { var retval = window.showModalDialog("htm/" + locLocaleID + "/SubFormHostFrame.htm", source, "dialogWidth:265px;dialogHeight:261px;help:no;scroll:no;status:no;"); } The host frame is loading an aspx page which contains the actual form that is being used. On the form that is opened there is a button that, when clicked, submits changed to the form. However, if no changed were made before the form was submitted, another modal window pops up stating that there were no changed to the form. This modal window is opened through registration of some javascript in the button click event. The code is as follows (C#): string l_S_ErrorScript = "<script type='text/javascript' language='javascript'>window.showModalDialog('htm/" + l_S_Culture + "/NotChangedErrorDialog.htm', '../../" + l_S_SkinPath + "', 'dialogWidth:310px;dialogHeight:145px;scroll:no;help:no;status:no;');</script>"; if(!m_Page.ClientScript.IsStartupScriptRegistered("ErrorScript")) { m_Page.ClientScript.RegisterStartupScript(this.GetType(), "ErrorScript", l_S_ErrorScript); } When the button is clicked and this dialog needs to appear the following javascript error appears: Error: Object doesn't support this property or method The weird thing is, if I access the application locally and try it everything works fine, but accessing from another computer causes the error. Also, depending on what server (we have many servers for testing all with windows server 2003) the error may not occur on another computer either. These computers are running the same software version using the same version of IE with the same settings. I'm inclined to believe that there is some configuration issue somewhere, but with the settings being the same it is hard to tell. I cannot really change how the app works or the technologies used either. Anyone have any ideas as to what may be causing this?

    Read the article

  • Custom UITableViewCell changing indexPath While Scrolling ?

    - by Chris
    I have a custom UITableViewCell which I created in Interface Builder. I am successfully Dequeuing cells, but as I scroll, the cells appear to begin calling different indexPaths. In this example, I am feeding the current indexPath.section and indexPath.row into the customCellLabel. As I scroll the table up and down, some of the cells will change. The numbers can be all over the place, but the cells are not skipping around visually. If I comment out the if(cell==nil), then the problem goes away. If I use a standard cell, the problem goes away. Ideas why this might be happening? // Customize the appearance of table view cells. - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { UITableViewCell *cell = (UITableViewCell *)[tableView dequeueReusableCellWithIdentifier:@"CalendarEventCell"]; if (cell == nil) { NSLog(@"Creating New Cell !!!!!"); NSArray *nib = [[NSBundle mainBundle] loadNibNamed:@"CalendarEventCell" owner:self options:nil]; cell = (UITableViewCell *)[nib objectAtIndex:0]; cell.accessoryType = UITableViewCellAccessoryDisclosureIndicator; } // Set up the cell... [customCellLabel setText:[NSString stringWithFormat:@"%d - %d",indexPath.section, indexPath.row]]; return cell; }

    Read the article

  • How can Safari be prevented from scrolling an overflow:hidden iframe?

    - by Alexander Ljungberg
    With Safari you can disable most iframe scrolling by setting style="overflow: hidden;" on the iframe. However, if you click in the iframe and move the mouse the content scrolls anyhow. Example: <html> <body> <iframe style="width: 100%; height:100px; overflow: hidden;" scrolling="no" src="scrollcontent.html"> </iframe> </body> </html> scrollcontent.html: <html scroll="no" style="overflow:hidden;"> <body scroll="no" style="overflow:hidden;"> <div style="background-color: green; height:100px;">A</div> <div style="background-color: red; height:100px;">B</div> </body> </html> In this example, the iframe should only show a green area and it should be impossible to reveal the red area. This is mostly true: there is no scrollbar, the mouse wheel doesn't do anything and neither do the arrow keys. However click and drag still scrolls the view. This is particularly noticeable when selecting text. Does anyone know any trick to stop Safari from doing this?

    Read the article

  • Location of the object after scrolling in UIScrollView

    - by ludo
    Hi, I have a scrollView (width:320px height:100px) on my UIView, inside it I add 10 images with width:106.5px each. After that I use this function to have 3 different parts inside my scrollView, so everytime I scroll, an image will automatically be center. -(void)scrollViewDidEndDragging:(UIScrollView *)scrollView willDecelerate:(BOOL)decelerate { [self returnToPosition:self.scrollView]; } -(void)scrollViewDidEndDecelerating:(UIScrollView *)scrollView { [self returnToPosition:self.scrollView]; } -(void)returnToPosition:(UIScrollView *)scrollView { CGFloat itemWidth = 106.5f; CGFloat position = [self.scrollView contentOffset].x; CGFloat newPosition = 0.0f; CGFloat offSet = position / itemWidth; NSUInteger target = (NSUInteger)(offSet + 0.5f); newPosition = target * itemWidth; [self.scrollView setContentOffset:CGPointMake(newPosition, 0.0f) animated:YES]; } Here is my question, I want to be able to know which image will be in the middle position after the user scroll the View, because I want to display on my UIView a text, specific to that image. But I don't know how to do that. Some Ideas?

    Read the article

< Previous Page | 44 45 46 47 48 49 50 51 52 53 54 55  | Next Page >