Search Results

Search found 54311 results on 2173 pages for 'right click menu'.

Page 112/2173 | < Previous Page | 108 109 110 111 112 113 114 115 116 117 118 119  | Next Page >

  • how to execute any function in jquery after few seconds on the click of any link

    - by james Bond
    I have struts2 jquery grid where on click of a row I am calling a jQuery function for performating a struts2 action. My code is running fine. I want to perform my jQuery function after delay of a few seconds. How can I do this? <script type="text/javascript"> //assume this code is working fine on rowselect from my jquery grid, New Updation in it is "i want to execute or load the url after few seconds" $(function(){ $.subscribe('rowselect', function(event,data) { var param = (event.originalEvent.id); $("#myAdvanceDivBoxx").load('<s:url action='InsertbooksToSession' namespace='/admin/setups/secure/jspHomepage/bookstransaction'/>'+"?bid="+event.originalEvent.id); }); }); </script> What i tried is the below code but am unable to get the output which i am looking for: <script type="text/javascript"> $(function(){ $.subscribe('rowselect', function(event,data) { var param = (event.originalEvent.id); $("#myAdvanceDivBoxx").load('<s:url action='InsertbooksToSession' namespace='/admin/setups/secure/jspHomepage/bookstransaction'/>'+"?bid="+event.originalEvent.id); }).delay(9000); }); </script>

    Read the article

  • Find most right and left point of a horizontal circle in 3d Vector environment

    - by Olivier de Jonge
    I'm drawing a 3D pie chart that is rendered with in 3D vectors, projected to 2D vectors and then drawn on a Graphics object. I want to calculate the most left and right point of the circle The method to create a vector, draw and project to a 2d vector are below. Anyone knows the answer? public class Vector3d { public var x:Number; public var y:Number; public var z:Number; //the angle that the 3D is viewed in tele or wide angle. public static var viewDist:Number = 700; function Vector3d(x:Number, y:Number, z:Number){ this.x = x; this.y = y; this.z = z; } public function project2DNew():Vector { var p:Number = getPerspective(); return new Vector(p * x, p * y); } public function getPerspective():Number{ return viewDist / (this.z + viewDist); } }

    Read the article

  • CSS- removing horizontal space in list menu using display inline property

    - by Kayote
    Hi All, Im new to CSS and have a set target of learning & publishing my website in CSS by the end of the month. My question: Im trying to build a CSS horizontal menu with hover drop downs, however, when I use the 'display: inline' property with li (list) items, I get horizontal spaces between the li (list) items in the bar. How do I remove this space? Here is the html: <div id="tabas_menu"> <ul> <li id="tabBut0" class="tabBut">Overview</li> <li id="tabBut1" class="tabBut">Collar</li> <li id="tabBut2" class="tabBut">Sleeves</li> <li id="tabBut3" class="tabBut">Body</li> </ul> </div> And here is the CSS: #tabas_menu { position: absolute; background: rgb(123,345,567); top: 110px; left: 200px; } ul#tabas_menu { padding: 0; margin: 0; } .tabBut { display: inline; white-space: list-style: none; background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(rgba(255,142,190,1)),to(rgba(188,22,93,1))); background: -moz-linear-gradient(top, rgba(255,142,190,1), rgba(188,22,93,1)); font-family: helvetica, calibri, sans-serif; font-size: 16px; font-weight: bold; line-height: 20px; text-shadow: 1px 1px 1px rgba(99,99,99,0.5); -moz-border-radius: 0.3em; -moz-box-shadow: 0px 0px 2px rgba(0,0,0,0.5); -webkit-border-radius: 0.3em; -webkit-box-shadow: 0px 0px 2px rgba(0,0,0,0.5); padding: 6px 18px; border: 1px solid rgba(0,0,0,0.4); margin: 0; } I can get the space removed using the 'float: left/right' property but its bugging me as to why I cannot achieve the same effect by just using the display property.

    Read the article

  • Need CSS Help with a hover element - cant extend to left and right of page

    - by Bobafett
    Hi there, Need some CSS guru help. If you visit my link: http://www.gabbr.com/js/viewer/cmedata/index1.html and hover over the years (top middles, 2008, 2009, 2010, etc) you will notice an orange bar extending from the top to the bottom of the page. I am trying to get the same effect on the left (month and day) but am unable to do so. The problem I am having is that I cannot get the orange hover bar to extend off the left of the screen for either #dayleft or for #monthleft. It extends all the way to the right margin of the screen but not the left. The problem is the margin-left: 15px; in #monthleft and margin-left: 80px; in #dayleft. But I cannot get rid of these since I require them for the letter spacing. Any advice?

    Read the article

  • select (or click) specific radiobutton using jQuery

    - by Oleg Babanov
    I am trying to make specific radiobutton checked on page load and tried a lot of ways, but no one worked for me. This is a part of orderform on my webstore. <input type="radio" name="sPaymentCarrier" id="pC_2-1" value="1;2;0.00" onclick="countCarrierPrice( this )" /> <label for="pC_2-1">0</label> Actually this radiobutton is the only on radiobutton on page, and it must be checked to let user make order. I tried $(function() { var $radios = $('input:radio[name=sPaymentCarrier]'); if($radios.is(':checked') === false) { $radios.filter('[value=1;2;0.00]').attr('checked', true); } }); and $('input:radio[name="sPaymentCarrier"]').filter('[value="1;2;0.00"]').attr('checked', true); but none of these ways worked. Also I tried a lot of other codes, but when I refreshed page I still saw this button unchecked. I guess maybe I have to set up jquery click on this button instead of select, but actually I cannot make this work. Any help is appreciated!

    Read the article

  • jQuery: responding to click event of element added to document after page load

    - by morpheous
    I am writing a page which uses a lot of in situ editing and updating using jQuery for AJAX. I have come accross a problem which can best be summarised by the workflow described below: Clicking on 'element1' on the page results in a jQuery AJAX POST Data is received in json format The data received in json format The received data is used to update an existing element 'results' in the page The received data is actual an HTML form I want jQuery to be responsible for POSTing the form when the form button is clicked The problem arises at point 6 above. I have code in my main page which looks like this: $(document).ready(function(){ $('img#inserted_form_btn').click(function(){ $.ajax({'type: 'POST', 'url': 'www.example.com', function($data){ $(data.id).html($data.frm); }), 'dataType': 'json'} }); }); However, the event is not being triggered. I think this is because when the document is first loaded, the img#inserted_form_btn element does not exist on the page (it is inserted into the DOM as the result of an element being clicked on the page (not shown in the code above - to keep the question short) My question therefore is: how can I get jQuery to be able to respond to events occuring in elements that were added to the DOM AFTER the page has loaded?

    Read the article

  • change php variable on click event

    - by Claudiu
    I want to change php variable ($start and $end called by var b1 and var b2) if the user clicks on button. Now I know that php is server side, but how can I do it? I read something about using $get but I don't know how to implement it: <?php if ( is_user_logged_in() ) { ?> <input type="submit" value="Start Chat" id="start_chat" style="position: absolute; top: 30px; left: 10px;" /> <?php } ?> <script> jQuery('#start_chat').click(function(){ $(this).data('clicked', true); }); var b1 = '<?php echo $start; ?>'; var b2 = '<?php echo $end; ?>'; if(jQuery('#start_chat').data('clicked')) { // change var b1 and b2 } else { // do not change anything } </script> <div id="eu_la"> <?php $start = strtotime('9:30'); $end = strtotime('12:30'); $timenow = date('U'); if((date('w') == 4) && ($timenow >= $start && $timenow <= $end)) { // day 2 = Tuesday include('facut_mine.php'); } else { do_shortcode('[upzslider usingphp=true]'); } ?>

    Read the article

  • FB like text-align: right instead of left

    - by senzacionale
    http://www.facebook.com/plugins/like.php?href={0}&amp;layout=standard&amp;show_faces=true&amp;width=450&amp;action=like&amp;colorscheme=light&amp;height=80 I am using iframe. whole code: string iframe = string.Format("<iframe src=\"http://www.facebook.com/plugins/like.php?href={0}&amp;layout=standard&amp;show_faces=true&amp;width=450&amp;action=like&amp;colorscheme=light&amp;height=80\" scrolling=\"no\" frameborder=\"0\" style=\"border:none; overflow:hidden; width:450px; height:35px; text-align:right;\" allowTransparency=\"true\"></iframe>", fullUrl); return iframe;

    Read the article

  • jquery - index of click element on the list is different on IE 7

    - by surajz
    cms is generating content in this format. <ul id="slide_nav" class="tabs"> <a name="ctn2363_2465" id="ctn2363_2465" class="hidden"></a><li id="button_1"><a class="ohlord" href="javascript: void(0);" id="b1">Bookbag</a></li> <a name="ctn2363_2466" id="ctn2363_2466" class="hidden"></a><li id="button_2"><a class="ohlord" href="javascript: void(0);" id="b2">help</a></li> <a name="ctn2363_2467" id="ctn2363_2467" class="hidden"></a><li id="button_3"><a class="ohlord" href="javascript: void(0);" id="b3">Team</a></li> <a name="ctn2363_2468" id="ctn2363_2468" class="hidden"></a><li id="button_4"><a class="ohlord" href="javascript: void(0);" id="b4">At</a></li> </ul> To get a correct index of the clicked link I have to do this in IE 7 (use class info in selector) $("#slide_nav li a").click(function(){ var index = $("#slide_nav li > a.ohlord").index(this); }); On firefox $("#slide_nav li > a").index(this); works. On IE this produces incorrect index (0, 2, 4, 6 ..). Is there a way to get the correct index in IE 7 for the above html without using class information in the selector? My second question is $('#slides img')[index].attr('style', 'display: block;'); does not work. I have to iterate through each $('#slides img') elements to set the attribute. Isn't HTMLElement object returned from $('#slides img')[index] an jquery object?

    Read the article

  • Jquery menu help please

    - by Trai Tran
    I am having trouble with this menu, when I hover to the subcategories they keep slideup. I want the subcategories to remain when I hover it and when I move my mouse outside it will slideup, same go to the main categories. Please help. I had been working on this for 1 hour but no solution. $(document).ready(function(){ $('ul#level1').slideUp(); $('a#tab').hover(function(){ var content_show = $(this).attr('title'); $('.'+ content_show).stop().slideDown(); },function(){ var content_show = $(this).attr('title'); $('.'+ content_show).stop().slideUp(); }); }); <li><a href="#" id="tab" class="active" title="one">Sport</a> <ul id="level1" class="one"> <li><a href="#">View All</a></li> <li><a href="#" >Shoes</a></li> <li><a href="#" >T-Shirt</a></li> <li><a href="#" >Tools</a></li> <li><a href="#" >Hats</a></li> <li><a href="#">Pants</a></li> </ul> </li> <li><a href="#" id="tab" class="tab" title="two">Foods</a> <ul id="level1" class="two"> <li><a href="#">Link Here</a></li> <li><a href="#">Link Here</a></li> <li><a href="#">Link Here</a></li> <li><a href="#">Link Here</a></li> <li><a href="#">Link Here</a></li> </ul> </li>

    Read the article

  • Right way to get the children

    - by Web Developer
    I have the below code and it works but what is the right way to get table onclick of add HTML <h4 class="titlebar"> Skills <small><a onclick="return false;" href="/add/" data-span="3">Add</a></small> </h4> <div class="body"> <table class="table"><tbody> <tr><td width="125"></td></td></tr> </tbody></table> </div> JQuery var TableBlock = $(this).closest('.titlebar').next().children('table');

    Read the article

  • Layering Images & Click to Choose Using Javascript

    - by rneal
    So I'm making a gallery of fabrics and backgrounds for letters for a fraternity/sorority store in my college's town. If you don't know what I'm talking about, this is a fabric letter. You can see how it has a white outline (background) and a red inside (foreground). WELL, I want to make it so you can change both the foreground and background, simply by clicking it's similar image. This is what I have so far <script type="text/javascript">// <![CDATA[ function changeImage(filename) { document.mainimage.src = filename; }// ]]></script> with these for each fabrics: <a href="javascript:changeImage('/wp-content/themes/collegiateconnectionbg/images/fabrics/foregrounds/37.jpg')"> <img src="/wp-content/themes/collegiateconnectionbg/images/fabrics/foregrounds/37.jpg" alt="" width="100px" height="50px" /></a> I really like how this works, but it's only good for one layer. Is there anyway I can add a layer below it, but still make it show at the top of the page? I know I'll have to use photoshop and transparency for both options, thats no problem, but I wanted to make sure I can do this before I start creating 600+ images. I know I can play with z-index and css, but since I'm using wordpress the one example I read about here wasn't working or I didn't completely understand it, and messed up my entire page. Also here's my tester webpage to see the current code in work. (if you click the navy&white stars image, you can see a very rough makeshift "A") Thanks in advance!

    Read the article

  • Simplify my menu animation code

    - by zaius
    I've got a bunch of 'project' divs that I want to expand when they're clicked on. If there's already a project open, I want to hide it before I slide out the new one. I also want to stop clicks on an already open project from closing and then opening it again. Here's an example of what I mean (warning - wrote the code in the browser): $('.projects').click(function() { var clicked_project = $(this); if (clicked_project.is(':visible')) { clicked_project.height(10).slideUp(); return; } var visible_projects = $('.projects:visible'); if (visible_projects.size() > 0) { visible_projects.height(10).slideUp(function() { clicked_project.slideDown(); }); } else { clicked_project.slideDown(); } }); Really, my big issue is with the second part - it sucks that I have to use that if/else - I should just be able to make the callback run instantly if there aren't any visible_projects. I would think this would be a pretty common task, and I'm sure there's a simplification I'm missing. Any suggestions appreciated!

    Read the article

  • On load rather than on click

    - by connor
    I have the following code: jQuery(function ($) { var OSX = { container: null, init: function () { $("input.apply, a.apply").click(function (e) { e.preventDefault(); $("#osx-modal-content").modal({ overlayId: 'osx-overlay', containerId: 'osx-container', closeHTML: null, minHeight: 80, opacity: 65, position: ['0',], overlayClose: true, onOpen: OSX.open, onClose: OSX.close }); }); }, open: function (d) { var self = this; self.container = d.container[0]; d.overlay.fadeIn('fast', function () { $("#osx-modal-content", self.container).show(); var title = $("#osx-modal-title", self.container); title.show(); d.container.slideDown('fast', function () { setTimeout(function () { var h = $("#osx-modal-data", self.container).height() + title.height() + 20; // padding d.container.animate( {height: h}, 200, function () { $("div.close", self.container).show(); $("#osx-modal-data", self.container).show(); } ); }, 300); }); }) }, close: function (d) { var self = this; // this = SimpleModal object d.container.animate( {top:"-" + (d.container.height() + 20)}, 500, function () { self.close(); // or $.modal.close(); } ); } }; OSX.init(); }); To load this script, a button with the class "apply" has to be clicked... Does anyone know a way of loading this script "onload" without a button being clicked? I have tried a lot of things, but I am a newbie when it comes to Javascript. Thanks!

    Read the article

  • on click submit button move itsplace

    - by Mayur
    Hi All, I m Using submit button for my form its work fine in all browser except ie7 when an user click on it it moved please suggest me what to do .confirm-button-submit { width : 79px; font : bold 12px sans-serif;; color : #000; background : url("../images/confirm-btn.png") 0 -33px no-repeat; text-decoration : none; margin-top :0px; text-align:center; border:0px; cursor : pointer; height:32px; padding : 8px 0px 12px 0px; } .confirm-button-submit:hover { width : 79px; font : bold 12px sans-serif;; color : #fff; background : url("../images/confirm-btn.png") 0 0 no-repeat; text-decoration : none; margin-top :0px; text-align:center; border:0px; cursor : pointer; height:32px; padding : 8px 0px 12px 0px; } i used this css please tell me what to do code: <input type="button" value="Show" name="commit" onclick="range_validation(this)" class="confirm-button-submit"/>`

    Read the article

  • The right way to setup VisualStudio 2010 for OpenCL

    - by LonliLokli
    what is the right way to setup VisualStuio 2010 for working with *.cl files? I have added *.cl under Tool/Text editor/File extensions and copied usertype.dat into the common7/ide folder, but VS underlines keywords like float4 or cross. Is it necessary to add some key in registry or can somebody propose a tutorial? Thanks in advance. PS i have already asked similar question old one question, but now i am looking explicit for a solution with vs2010. It is not bad, but really nerves and deflects me from programming tasks.

    Read the article

  • jQuery change CSS background position and mouseover/mouseout

    - by steelfrog
    I have a menu composed of a single image (e.g., sprites). In order to display the hover image, I simply move the background image down. I'd like this effect to be controlled by jQuery and animated. This is a sample menu item. <ul> <li id="home"><a href="#"></a></li> </ul> This is what I'm toying with. I'm very new to jQuery and am having problems getting the proper selector going. $(document).ready(function(){ $('#home a'); // Set the 'normal' state background position .css( {backgroundPosition: "0 0"} ) // On mouse over, move the background .mouseover(function(){ $(this).stop().animate({backgroundPosition:"(0 -54px)"}, {duration:500}) }) // On mouse out, move the background back .mouseout(function(){ $(this).stop().animate({backgroundPosition:"(0 0)"}, {duration:500}) }) }); Could you point out what I'm doing wrong? I know the selector is probably incorrect but I'm having a hard time figuring out how to manipulate the anchor.

    Read the article

  • jQuery: change a css value if a option is selected

    - by Ivan Castellanos
    I'm trying to make an option dropdown menu and I got stuck when I try to show a textbox if the option 'other' is selected. there's what I have: <span id="con-country"><label for="country">Country: </label> <select name="country" required="required"> <option value="usa">United States</option> <option value="uk">United Kingdom</option> <option id="other" value="other">Other</option> </select> </span> <span id="con-specify"> <label for="specify">Specify: </label> <input type="text" name="specify" id="c-specify" required="required"></input> </span> CSS: #con-specify{ margin-left: 50px; display: none; } Simple huh?, the problem is that I don't know how to do the code in jQuery So, if the user select other in the menu, then the textbox should appear, how can I do that?

    Read the article

  • Configure Console2 to open bash in current folder

    - by davidkennedy85
    I've seen this but it doesn't work for me. I'm not using Git's version of bash but the one that comes with cygwin, so that could be part of the problem. Here is how I have my tab in Console2 set up: Title: bash.exe Shell: C:\cygwin\bin\bash.exe --login -i Startup dir: %HOMEDRIVE%%HOMEPATH% This is my registry entry: Directory shell Console2 Open Console2 Here command "C:\Console2\Console.exe" -d "%1" bash always starts in my home directory instead of the directory I'm clicking on, then I have to cd /cygdrive/d/code ... etc. I tried removing the value in the "Startup dir" field, changing it to %1, %1% with no luck. I also tried this solution but it didn't work for me either: Title: bash.exe Shell: C:\cygwin\bin\bash.exe -l Registry: Directory shell Console2 Open Console2 Here command "C:\Console2\Console.exe" -d "%V" .profile file in root directory: cd - Any ideas?

    Read the article

  • Windows Server 2008 R2 - Cannot Change DNS Domain Context on Some Machines

    - by Richie086
    So I have a small Windows Server 2008 R2 network consisting of a domain controller, a file server, sql server, etc. All machines are joined to a windows domain (CPUSHIELD.COM) and show up in Active Directory Users and Computers under the Computers OU. Each computer has a DNS record as well that was populated when I joined each computer to the domain. However, when I go to my SQL server VM (which is joined to CPUSHIELD.COM) and try to add domain users or groups to the local users or groups on my file server (which is a physical machine) or my sql server (which is a virtual machine), for some reason I cannot change the context to the CPUSHIELD.COM domain.. For example: Here is the really strange thing, I have two other servers on my network that do show CPUSHIELD.COM in the From This Location field (as I would expect with any machine joined to a domain) and I am able to search the local machine and/or domain for users/groups to add. I have done hundreds of Windows Server 2008 installs and this is the first time I have run into this issue. Any ideas? Let me know if you need more info

    Read the article

  • how to disable moving down on Enter key in Excel 2007?

    - by earlyadopter
    There used to be a check-box in preferences in Excel 2003 to disable moving down on Enter key after you edited a cell. Where could I find that setting in Excel 2007? <whining on>It drives me insane how microsoft trashes users skills and "fingers" memory to make what their new users may be will find easier. What about us, using these products for ten years?<whining off> I want to control moving around with arrow keys, and Enter to only return me from the cell editing mode to navigation, not moving down. I'm not in a data entry business!! I'm analyzing data, editing just few cells time-to-time.

    Read the article

  • Extracting Windows 8 Start Screen Patterns

    - by oreon
    Is there any way to extract the Windows 8 Start Screen patterns, in order to use them as standalone wallpapers on other systems? For example see this screenshot: I am interested in the dark blue background. I heard that this background is somehow adapted to your chosen color theme. So many different variations should exist. Engadget has an article here briefly talking about these background patterns and the different color schemes. They call them "personalization tattoos".

    Read the article

  • How to bring back a far right chromeless window?

    - by Click Ok
    Accidentally some windows goes far right, and "goes out of" to the monitor. I know keyboard shortcuts to move it back when the windows have a title bar. But that windows (HTC Home and Rainlendar) don't have title bar, doesn't appears in windows TaskBar or TaskManager. I've tryed restart windows; to close and reopen that software; change the resolution to very low, and then to very high; but it doesn't works... I know that I can dig in the settings files of that programs, but I think interesting discover how to bring back that windows so I can use that technique if that problem appears again with another softwares too. Thank you!

    Read the article

  • Android ProgressDialog Progress Bar doing things in the right order

    - by FauxReal
    I just about got this, but I have a small problem in the order of things going off. Specifically, in my thread() I am setting up an array that is used by a Spinner. Problem is the Spinner is all set and done basically before my thread() is finished, so it sets itself up with a null array. How do I associate the spinners ArrayAdapter with an array that is being loaded by another thread? I've cut the code down to what I think is necessary to understand the problem, but just let me know if more is needed. The problem occurs whether or not refreshData() is called. Along the same lines, sometimes I want to call loadData() from the menu. Directly following loadData() if I try to fire a toast on the next line this causes a forceclose, which is also because of how I'm implementing ProgressDialog. THANK YOU FOR LOOKING public class CMSHome extends Activity { private static List<String> pmList = new ArrayList<String>(); // Instantiate helpers PMListHelper plh = new PMListHelper(); ProjectObjectHelper poc = new ProjectObjectHelper(); // These objects hold lists and methods for dealing with them private Employees employees; private Projects projects; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); // Loads data from filesystem, or webservice if necessary loadData(); // Capture spinner and associate pmList with it through ArrayAdapter spinner = (Spinner) findViewById(R.id.spinner); ArrayAdapter<String> adapter = new ArrayAdapter<String>( this, android.R.layout.simple_spinner_item, pmList); adapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item); spinner.setAdapter(adapter); //---the button is wired to an event handler--- Button btn1 = (Button)findViewById(R.id.btnGetProjects); btn1.setOnClickListener(btnListAllProjectsListener); spinner.setOnItemSelectedListener(new MyOnItemSelectedListener()); } private void loadData() { final ProgressDialog pd = ProgressDialog.show(this, "Please wait", "Loading Data...", true, false); new Thread(new Runnable(){ public void run(){ employees = plh.deserializeEmployeeData(); projects = poc.deserializeProjectData(); // Check to see if data actually loaded, if not then refresh if ((employees == null) || (projects == null)) { refreshData(); } // Load up pmList for spinner control pmList = employees.getPMList(); pd.dismiss(); } }).start(); } private void refreshData() { // Refresh data for Projects projects = poc.refreshData(); poc.saveProjectData(mCtx, projects); // Refresh data for PMList employees = plh.refreshData(); plh.savePMData(mCtx, employees); } } <---- EDIT ----- I tried changing loadData() to the following after Jims suggestion. Not sure if I did this right, still doesn't work: private void loadData() { final ProgressDialog pd = ProgressDialog.show(this, "Please wait", "Loading Data...", true, false); new Thread(new Runnable(){ public void run(){ employees = plh.deserializeEmployeeData(); projects = poc.deserializeProjectData(); // Check to see if data actually loaded, if not return false if ((employees == null) || (projects == null)) { refreshData(); } pd.dismiss(); runOnUiThread(new Runnable() { public void run(){ // Load up pmList for spinner control pmList = employees.getPMList(); } }); } }).start(); }

    Read the article

  • Move to next item or position in List view on button click

    - by praveenb
    Hi, im new to Android programing I build a listview showing station names, that grabs its data from a URL. I used ArrayAdapter to accomplish listview with data. I need to navigate through station names in listview, using previous, next buttons click. I google for this task and tried in different ways to workout bt im not able to solve. shall any one pls help me out for this issue. Thanks in advance...... I tried like this ` private ListView stationList; . . public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); requestWindowFeature(Window.FEATURE_NO_TITLE); setContentView(R.layout.playscreen); // move up event handler preButton= (ImageButton) findViewById(R.id.prevButton); preButton.setOnClickListener(new View.OnClickListener() { public void onClick(View view) { movePre(); } }); // move down event handler nxtButton= (ImageButton) findViewById(R.id.nextButton); nxtButton.setOnClickListener(new View.OnClickListener() { public void onClick(View view) { moveNxt(); } }); stationList.setAdapter(new StationAdapter(this, android.R.layout.simple_list_item_1, _stationList)); } else { Log.d(TAG, "No Stations"); } } private void movePre(){ stationList.setSelection(stationList.getSelectedItemPosition() + 1); } // Move selected item "down" in the ViewList. private void moveNxt(){ stationList.setSelection(stationList.getSelectedItemPosition() + 1); } private class StationAdapter extends ArrayAdapter { private Vector<Station> items; public StationAdapter(Context context, int textViewResourceId, Vector<Station> items) { super(context, textViewResourceId, items); this.items = items; } public void setSelectedPosition(int pos){ selectedPos = pos; // inform the view of this change notifyDataSetChanged(); } public int getSelectedPosition(){ return selectedPos; } @Override public View getView(int position, View convertView, ViewGroup parent) { View v = convertView; if (v == null) { LayoutInflater vi = (LayoutInflater) getSystemService(Context.LAYOUT_INFLATER_SERVICE); v = vi.inflate(R.layout.row, null); } Station st = items.get(position); if (st != null) { TextView tt = (TextView) v.findViewById(R.id.toptext); TextView bt = (TextView) v.findViewById(R.id.bottomtext); if (tt != null) { tt.setText(st.getStationName()); } if (bt != null) { bt.setText(st.getCT()); } } return v; } } `

    Read the article

< Previous Page | 108 109 110 111 112 113 114 115 116 117 118 119  | Next Page >