Search Results

Search found 4648 results on 186 pages for 'voting buttons'.

Page 32/186 | < Previous Page | 28 29 30 31 32 33 34 35 36 37 38 39  | Next Page >

  • How to highlight the button untill the next view is changed in iphone?

    - by Pugal Devan
    Hi, I am new to iphone development. I have created five buttons in the view controller. If i clicked the button it goes to the corresponding view. Now i want to display the button in highlighted state when it is clicked. It should go back to the normal state only when i click the other button.(See the image below). I have set the another image for highigthting buttons when i clicked it, but it shows that highlighted state only one sec. Now i want to display the buttons highlighted till another button is clicked. Same like a Tabbar operations.(I have used buttons instead of tabbar for my requirements). Now i have used the following code, void didLoad { [btn1 setImage:[UIImage imageNamed:@"ContentColor.png"] forState:UIControlStateHighlighted]; [btn2 setImage:[UIImage imageNamed:@"bColor.png"] forState:UIControlStateHighlighted]; [btn3 setImage:[UIImage imageNamed:@"ShColor.png"] forState:UIControlStateHighlighted]; [btn4 setImage:[UIImage imageNamed:@"PicturesColor.png"] forState:UIControlStateHighlighted]; [btn5 setImage:[UIImage imageNamed:@"infoColor.png"] forState:UIControlStateHighlighted]; } Please help me out. Thanks.

    Read the article

  • GridView onTouch

    - by Jeff
    I am trying to set up a GridView of buttons that responds to onTouch. For example, if I swipe my finger across the screen horizontally, vertically or diagonally then I want the buttons which were touched to be selected. I tried setting OnTouchListener's for the buttons, but this didn't work, only the first button in the drag event received the onTouch events. Next I tried creating an OnTouchListener for the GridView and then using the X,Y coords to determine which buttons where touched. This doesn't seem to work either since the MOTION_DOWN events are only passed to the GridView's onTouch() if I start the drag on the very edge of the GridView. In fact if I drag my finger horizontally across the grid, the onTouch events aren't fired at all unless I start the drag at the edge of the GridView. Does anyone know of a better way to do this? Thanks in advance. gridview.setOnTouchListener(new View.OnTouchListener() { @Override public boolean onTouch(@SuppressWarnings("unused") View view, MotionEvent event) { float X = event.getX(); float Y = event.getY(); switch (event.getAction()) { case MotionEvent.ACTION_DOWN: System.out.println("Down: " + X + "," + Y); break; case MotionEvent.ACTION_MOVE: System.out.println("Move: " + X + "," + Y); break; case MotionEvent.ACTION_UP: System.out.println("Up: " + X + "," + Y); break; } return true; } }

    Read the article

  • NSMutableDictionary with UIButton* as keys - iPhone development

    - by Alejandro A.
    Hi, I'm new to iPhone development and I have a question that may have a very simple answer. I am trying to add buttons to a view and these buttons are associated with a custom class that I defined. When I add the buttons to the view, I would like to know what class these buttons correspond to. This is because when I press the button, I need to get some information about the class, but the receiver of the message is another class. I couldn't find information about an error that I'm getting on the web. The problem I have is that I'm trying to create an NSMutableDictionary where the keys are of type UIButton* and the values are of my custom type: // create button for unit UIButton* unitButton = [[UIButton alloc] init]; [sourceButtonMap setObject:composite forKey:unitButton]; Of course, the sourceButtonMap is defined in the class and initialized in the init function as sourceButtonMap = [[NSMutableDictionary alloc] init]; The error I get when I try to add the key-value pair is: *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** -[UIButton copyWithZone:]: unrecognized selector sent to instance 0x3931e90' Is this happening because I can't store UIButton* as keys? Can anyone point me why I'm getting this error? Thank you all, aa

    Read the article

  • sending parameters with ajax

    - by kawtousse
    I am trying to send parameters that I get from a table in my jsp to other JSP using ajax. I am using the followinf function to send all values to JSP: ajaxForm but I don't know why the send failed every time I run it: Here is the javascript function: function editarow() { var xhr = getXhr(); xhr.onreadystatechange = function() { if (xhr.readyState == 4 && xhr.status == 200) { selects = xhr.responseText; // On se sert de innerHTML pour rajouter les options a la liste document.getElementById('prjsel').innerHTML = selects; } }; var row, firstNameCell, lastNameCell; var table = document.getElementById("sheet"); var buttons = table.getElementsByTagName("button"); for (var i = 0; i < buttons.length; i++) { if (buttons[i].name == "edit") { buttons[i].onclick = function() { row = this.parentNode.parentNode; // The first name cell is the first child NameCell1 = findElement(row.firstChild); NameCell2 = findElement(NameCell1.nextSibling); NameCell3 = findElement(NameCell2.nextSibling); NameCell4 = findElement(NameCell3.nextSibling); NameCell5 = findElement(NameCell4.nextSibling); NameCell6 = findElement(NameCell5.nextSibling); NameCell7 = findElement(NameCell6.nextSibling); // `innerHTML` pour obtenir la valeur /*alert("name 1 is " + NameCell1.innerHTML); alert("name 2 is " + NameCell2.innerHTML); alert("name 3 is " + NameCell3.innerHTML); alert("name 4 is " + NameCell4.innerHTML); alert("name 5 is " + NameCell5.innerHTML); alert("name 6 is " + NameCell6.innerHTML); alert("name 7 is " + NameCell7.innerHTML);*/ } } } xhr.open("POST", "ajaxForm.jsp", true); xhr.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded'); xhr.send("NameCell1="+NameCell1,"NameCell2="+NameCell2,"NameCell3="+NameCell3,"NameCell4="+NameCell4,"NameCell5="+NameCell5,"NameCell6="+NameCell6,"NameCell7="+NameCell7 ); } After I get the value from the table I want to send all of them to the ajaxForm.jsp.

    Read the article

  • Why am I getting "Message sent to deallocated object" in Objective-C?

    - by Dave C
    I have several buttons on my app that are being created dynamically. They are all pointed at the button click event when pressed. When the button pressed method is called, the sender's tag (int value) is parsed into the controller's house ID. It works with one of the buttons — the first one created, to be specific — but the others throw the following error: -[CFNumber intValue]: message sent to deallocated instance 0xc4bb0ff0 I am not releasing these buttons anywhere in my code. I haven't set them to autorelease or anything like that. I'm just wondering why they are doing this on the click. The button click event: - (IBAction) ButtonClick: (id) sender { HouseholdViewController *controller = [[HouseholdViewController alloc] initWithNibName:@"HouseholdViewController" bundle:nil]; controller.delegate = self; controller.HouseID = [(NSInteger)[(UIButton *)sender tag] intValue]; //this line throws an error controller.modalTransitionStyle = UIModalTransitionStyleFlipHorizontal; [self presentModalViewController:controller animated:YES]; [controller release]; } Where I am creating the buttons: UIButton *button = [UIButton buttonWithType:UIButtonTypeCustom]; button.frame = CGRectMake(MyLongInScreenCoords, MyLatInScreenCoords, 50, 50); UIImage *buttonImageNormal = [UIImage imageNamed:@"blue_pin.png"]; UIImage *strechableButtonImageNormal = [buttonImageNormal stretchableImageWithLeftCapWidth:50 topCapHeight:50]; [button setBackgroundImage:strechableButtonImageNormal forState:UIControlStateNormal]; [self.view addSubview:button]; button.tag = [NSNumber numberWithInt:[[words objectAtIndex: i] intValue]]; ButtonPoints[CurrentHouseCount][0] = button; ButtonPoints[CurrentHouseCount][1] = [NSValue valueWithCGPoint:CGPointMake(MyActualLat, MyActualLong)]; [button addTarget:self action:@selector(ButtonClick:) forControlEvents:UIControlEventTouchUpInside]; CurrentHouseCount++;

    Read the article

  • how to place social media links at the end of every TYPO3 content element?

    - by Ugur Koçak
    Thanks to Kasper Skårhøj and all TYPO3 developers for this great product and extensions. I am a TYPO3 user and want to build a scientific portal using TYPO3-YAML. I use the package tyaml_2.0.1_complete from if-20 Project. It includes TYPO3 4.7.4 + YAML and many extensions. Facebook like button, Twitter and G+ buttons have been integrated to News extension by Georg Ringer. What I need is; I want to place the same buttons (fblike, fbshare, twitter and G+) buttons at the end of every content element automatically. I am searching web for more than 2 weeks, and read many pages about it, but all of them are for the coders. I couldn't find a solution yet.I can apply them if all steps are written one by one, and clearly. For example; http://www.typo3tutorials.net/2012/06/typoscript-wrap-content-elemtents-with.html But my TYPO3 package uses fluid template and don't know how to apply it exactly. Please could you give me a link (in any language) explaining how to integrate these buttons to the end of "text" or "text with image" ce? Or can you write them step by step. Thanks much.

    Read the article

  • Jquery dynamic button : how to bind to exisitng click event by class

    - by omer bach
    I have a click event triggered by the class selector inside the jquery ready scope: $(".testBtn").click(function() { alert("This Works"); }); This works fine for static buttons how ever this doesn't work for dynamic buttons which are added upon clicking the button with "addRowBtn" id. I'm guessing that it has something to do with that the button is created after the event is registered but still the new button has the 'testBtn' class so it makes sense it should work. Any idea what am i doing wrong and how to make the dynamic buttons registered to the class selector click event? Here is the whole code, you can copy and paste into an html, click the 'add button' and try to click the added buttons. you'll see nothing happens. <html> <head> <script src='http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js'></script> <script src='http://ajax.googleapis.com/ajax/libs/jqueryui/1/jquery-ui.min.js'></script> <script> $(function() { $(".addRowBtn").click(function() { $("#mainTable tr:last").after("<tr><td><button class='testBtn'>NotWorking</button></td></tr>"); }); $(".testBtn").click(function() { alert("This Works"); }); }); </script> </head> <body> <table id="mainTable"> <button class="addRowBtn">Add button</button> <tr><th>Testing</th></tr> <tr><td><button class='testBtn'>Working</button></td></tr> </table> </body> </html>

    Read the article

  • What is the relation between ContentPane and JPanel?

    - by Roman
    I found one example in which buttons are added to panels (instances of JPanel) then panels are added to the the containers (instances generated by getContentPane) and then containers are, by the construction, included into the JFrame (the windows). I tried two things: I got rid of the containers. In more details, I added buttons to a panel (instance of JPanel) and then I added the panel to the windows (instance of JFrame). It worked fine. I got rid of the panels. In more details, I added buttons directly to the container and then I added the container to the window (instance of JFrame). So, I do not understand two things. Why do we have two competing mechanism to do the same things. What is the reason to use containers in combination with the panels (JPanel)? (For example, what for we include buttons in JPanels and then we include JPanels in the Containers). Can we include JPanel in JPanel? Can we include a container in container?

    Read the article

  • Calling button in Action Script 3.0

    - by Meko
    I am trying to make button panel. each button have two type btn_home and btn_home_white I am trying to reach those buttons.It is work if I write for each button their own methods like btn_home.addEventListener(MouseEvent.MOUSE_OVER,overEffect); btn_home_white.addEventListener(MouseEvent.MOUSE_OUT,outEffect); function overEffect(e:MouseEvent) { var myTweenHight:Tween = new Tween( btn_home,"height",Bounce.easeOut,25,0,3,true); var myTweenHight2:Tween = new Tween(btn_home_white,"height",Bounce.easeOut,0,25,3,true); var myTweenAlpha:Tween = new Tween(btn_home_white,"alpha",Strong.easeOut,0,1,2,true); } function outEffect(e:MouseEvent) { var myTweenHight:Tween = new Tween btn_home,"height",Bounce.easeOut,0,25,3,true); var myTweenHight2:Tween = new Tween(btn_home_white,"height",Bounce.easeOut,25,0,3,true); var myTweenAlpha:Tween = new Tween(btn_home_white,"alpha",Strong.easeOut,1,0,2,true); } But I have 10 buttons as btn_buttonname and btn_buttonname_white . I tryed to create Event listener on stage for all.It works for firts type buttons btn_buttonname but How can I get second type buttons? I tryed e.target["_white"] but it does not work . stage.addEventListener(MouseEvent.MOUSE_OVER , overEffect); stage.addEventListener(MouseEvent.MOUSE_OUT , outEffect); function overEffect(e:MouseEvent) { var myTweenHight:Tween = new Tween(e.target,"height",Bounce.easeOut,25,0,3,true); trace("height"); var myTweenHight2:Tween = new Tween(e.target["_white"],"height",Bounce.easeOut,0,25,3,true); var myTweenAlpha:Tween = new Tween(e.target["_white"],"alpha",Strong.easeOut,0,1,2,true); } function outEffect(e:MouseEvent) { var myTweenHight:Tween = new Tween(e.target,"height",Bounce.easeOut,0,25,3,true); var myTweenHight2:Tween = new Tween(e.target["_white"],"height",Bounce.easeOut,25,0,3,true); var myTweenAlpha:Tween = new Tween(e.target["_white"],"alpha",Strong.easeOut,1,0,2,true); }

    Read the article

  • Standard and reliable mouse-reporting with GLUT

    - by Victor
    Hello! I'm trying to use GLUT (freeglut) in my OpenGL application, and I need to register some callbacks for mouse wheel events. I managed to dig out a fairly undocumented function: api documentation But the man page and the API entry for this function both state the same thing: Note: Due to lack of information about the mouse, it is impossible to implement this correctly on X at this time. Use of this function limits the portability of your application. (This feature does work on X, just not reliably.) You are encouraged to use the standard, reliable mouse-button reporting, rather than wheel events. Fair enough, but how do I use this standard, reliable mouse-reporting? And how do I know which is the standard? Do I just use glutMouseFunc() and use button values like 4 and 5 for the scroll up and down values respectively, say if 1, 2 and 3 are the left, middle and right buttons? Is this the reliable method? Bonus question: it seems the `xev' tool is reporting different values for my buttons. My mouse buttons are numbered from 1 to 5 with xev, but glut is reporting buttons from 0 to 4, i.e. an off-by-one. Is this common?

    Read the article

  • Why am I getting "Message sent to deallocated instance" in Objective-C?

    - by Dave C
    I have several buttons on my app that are being created dynamically. They are all pointed at the button click event when pressed. When the button pressed method is called, the sender's tag (int value) is parsed into the controller's house ID. It works with one of the buttons — the first one created, to be specific — but the others throw the following error: -[CFNumber intValue]: message sent to deallocated instance 0xc4bb0ff0 I am not releasing these buttons anywhere in my code. I haven't set them to autorelease or anything like that. I'm just wondering why they are doing this on the click. The button click event: - (IBAction) ButtonClick: (id) sender { HouseholdViewController *controller = [[HouseholdViewController alloc] initWithNibName:@"HouseholdViewController" bundle:nil]; controller.delegate = self; controller.HouseID = [(NSInteger)[(UIButton *)sender tag] intValue]; //this line throws an error controller.modalTransitionStyle = UIModalTransitionStyleFlipHorizontal; [self presentModalViewController:controller animated:YES]; [controller release]; } Where I am creating the buttons: UIButton *button = [UIButton buttonWithType:UIButtonTypeCustom]; button.frame = CGRectMake(MyLongInScreenCoords, MyLatInScreenCoords, 50, 50); UIImage *buttonImageNormal = [UIImage imageNamed:@"blue_pin.png"]; UIImage *strechableButtonImageNormal = [buttonImageNormal stretchableImageWithLeftCapWidth:50 topCapHeight:50]; [button setBackgroundImage:strechableButtonImageNormal forState:UIControlStateNormal]; [self.view addSubview:button]; button.tag = [NSNumber numberWithInt:[[words objectAtIndex: i] intValue]]; ButtonPoints[CurrentHouseCount][0] = button; ButtonPoints[CurrentHouseCount][1] = [NSValue valueWithCGPoint:CGPointMake(MyActualLat, MyActualLong)]; [button addTarget:self action:@selector(ButtonClick:) forControlEvents:UIControlEventTouchUpInside]; CurrentHouseCount++;

    Read the article

  • TextField Covering UIAlertView's Button.

    - by XcodeDev
    Hi, I am using a UIAlertView with three buttons: "Dismiss", "Submit Score" and @"View Leaderboard". The UIAlertView also contains a UITextField called username. At the moment the UITextField "username" is covering one of the buttons in the UIAlertView. I just wanted to know how I could stop the UITextField from covering one of the buttons, i.e move the buttons down. Here is an image of what is happening: And here is my code: [username setBackgroundColor:[UIColor whiteColor]]; [username setBorderStyle:UITextBorderStyleRoundRect]; username.backgroundColor = [UIColor clearColor]; username.returnKeyType = UIReturnKeyDone; username.keyboardAppearance = UIKeyboardAppearanceAlert; username.placeholder = @"Enter your name here"; username = [[UITextField alloc] initWithFrame:CGRectMake(20.0, 45.0, 245.0, 25.0)]; username.borderStyle = UITextBorderStyleRoundedRect; [username resignFirstResponder]; UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"Congratulations" message:[NSString stringWithFormat:@"You tapped %i times in %i seconds!\n", tapAmount, originalCountdownTime] delegate:self cancelButtonTitle:@"Dismiss" otherButtonTitles:@"Submit To High Score Leaderboard", @"View Leaderboard", nil]; alert.tag = 01; [alert addSubview:username]; [alert show]; [alert release];

    Read the article

  • On Render Callback For G+ Button

    - by Michael Robinson
    How might I go about performing an action only when a G+ button has finished rendering? Facebook allows one to do this using the following: FB.XFBML.parse(document, function() { alert('rendering done'); }); I've perused Google's documentation, but didn't see anything helpful. Currently my workaround is to monitor the G+ element until certain elements have been added, then perform my action: (function() { var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true; po.src = 'https://apis.google.com/js/plusone.js'; po.onload = function() { var awaitRender = function(element) { if (element.firstChild && element.firstChild.firstChild && element.firstChild.firstChild.tagName.toUpperCase() === 'IFRAME') { alert('rendered!'); } else { window.setTimeout(function() { awaitRender(element) }, 100); } }; var buttons = document.getElementsByClassName('googleplus-button'); for(var i = 0; i < buttons.length; i++) { awaitRender(buttons[i]); } } var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s); })(); I'd like to know please, if there is either: A correct way one should do this for G+ buttons A better implementation that what I've hacked together above

    Read the article

  • Warning generated by UIButton setting code

    - by Spider-Paddy
    I have a for loop setting the background images on buttons, basically the buttons are thumbnail previews of different items & can't be set statically, however the code gives an warning because it runs through all the UIViews but then calls setBackgroundImage which does not apply to all views. The warning is an irritation, I understand what it's complaining about, how can I get rid of it? (I don't want to turn off the warning, I want to fix the problem) // For loop to set button images for (UIView *subview in [self.view subviews]) // Loop through all subviews { // Look for the tagged buttons, only the 8 tagged buttons & within array bounds if((subview.tag >= 1) && (subview.tag <= 8) && (subview.tag < totalBundles)) { // Retrieve item in array at position matching button tag (array is 0 indexed) NSDictionary *bundlesDataItem = [bundlesDataSource objectAtIndex:(subview.tag - 1)]; // Set button background to thumbnail of current bundle NSString *picAddress = [NSString stringWithFormat:@"http://some.thing.com/data/images/%@/%@", [bundlesDataItem objectForKey:@"Nr"], [bundlesDataItem objectForKey:@"Thumb"]]; NSURL *picURL = [NSURL URLWithString:picAddress]; NSData *picData = [NSData dataWithContentsOfURL:picURL]; // Warning is generated here [subview setBackgroundImage:[UIImage imageWithData:picData] forState:UIControlStateNormal]; } }

    Read the article

  • $().buttonset not working on dialog modal box JQUERY

    - by vikitor
    Hello everyone! I've done a dialog box that contains a form inside it, and I would like to add some jquery fancy items to it. I've been trying with $().buttonset() as I've done with most of my radio buttons in the application, in order to get a coherent IU for my application. The thing is that, even if following the rules specified, the buttons remain as a normal radio button, and not with the fancy interface. Do you know what could be the problem? This is the part of the form where I want the fancy radio buttons: <div id ="Replace"> <input type="radio" name="Replace" value = "true" id = "ReplaceYes" onclick = "setReplace(this)" /> <label for="ReplaceYes">Yes</label> <input type="radio" name="Replace" value = "false" checked="checked" id = "ReplaceNo" onclick = "setReplace(this)" /> <label for="ReplaceNo">No</label> </div> And then, as the previous part of code is in a partial view, invoked when showing the modal box, this is how I try to convert the buttons appearance: $("#Replace").buttonset(); The thing is that, debugging it I've seen that it goes through that part of the code, but it doesn't do what it's meant to do. Any clue? Thanks everyone for your attention, vikitor

    Read the article

  • Magento delete some scripts

    - by Patrik van Dendis
    Hi I use a magento for my e-commerce. I have custom design, but when I show my source code I can see some scripts and css styles after my footer. I want edit it but I dont know where. <!--{%FOOTER_LINK}--> </div> </div> <script type='text/javascript' src='//www.beetailer.com/javascripts/beetailer.js'></script> <style type="text/css"> div.share-buttons {margin-top: 5px; margin-bottom: 2px; height: 28px; vertical-align: middle; text-align: justify} div.share-buttons-fb-like {width: 260px;} div.share-custom-container {width: 260px;} .share-buttons-fb-like .share-custom-container span {width: 260px !important;} iframe.fb_ltr {width: 260px !important;} div.top-container {margin-bottom: 0px; text-align: justify} .header-container .top-container {margin-bottom: 0px; text-align: justify} .header-container {margin-bottom: 0px;} div.share-buttons-og { margin-right: 5px !important;} .og-want {margin-top: 2px !important;} .og-own {margin-top: 2px !important;} </style>

    Read the article

  • Custom Navigation Bar (html/css) for a website

    - by MikeStardust
    I am making a website and though of a cool navigation bar that is suppose to look like this: And using css code: #navigation ul { list-style: none; text-align: center; } #navigation li { display: inline; } #navigation li a { text-indent: -5000px; display: inline-block; height: 40px; } #navigation li a.profile { width: 240px; background: url("http://i.imgur.com/pphPRAA.png"); text-decoration: none; } #navigation li a.profile:hover { background: url("http://i.imgur.com/bDwcbXd.png"); background-position: -240px; text-decoration: none; } #navigation li a.profile:current { background: url("http://i.imgur.com/bDwcbXd.png"); background-position: -240px; background-repeat: no-repeat; text-decoration: none; } I managed to make it look like this: http://pokemasters.freeiz.com/bare.html I just ran out of ideas.... i got the images that i made seperatly, a navbar: & buttons: I'm looking for a full width navbar that adjusts itself to different screens, is located at the bottom of the screen, red buttons while active or hovered and white buttons while normal, with that pokeball line right on top of it and overlaying the buttons Can someone point me in the right direction please?? thank you:)

    Read the article

  • jQuery Hover Fade Button with an Active State

    - by Tim
    I do not want to double post a question; I was trying to post an add-on to my first question that I was looking for additional help. How does one go about this? Here is the original question. jQuery Hover Fade Button with an Active State Was hoping to see if there is a solution to the glitch I found. The problem I am now looking for help with is all other buttons still have the hover effect, but a button that was once active no longer does. <ul class="buttons"> <li><a class="button" href="#">button 1</a></li> <li><a class="button" href="#">button 2</a></li> <li><a class="button" href="#">button 3</a></li> </ul> Best way to explain this. If button 2 is clicked – it is now active. Buttons 1 and 3 will still hover. If you click on button 1 – it is now active and button 2 will no longer hover while button 3 will. Eventually when you go through the series of all buttons the animation hover is no longer.

    Read the article

  • Custom Image Button and Radio/Toggle Button from Common Base Class

    - by Wonko the Sane
    Hi All, I would like to create a set of custom controls that are basically image buttons (it's a little more complex than that, but that's the underlying effect I'm going for) that I've seen a few different examples for. However, I would like to further extend that to also allow radio/toggle buttons. What I'd like to do is have a common abstract class called ImageButtonBase that has default implementations for ImageSource and Text, etc. That makes a regular ImageButton implementation pretty easy. The issue I am having is creating the RadioButton flavor of it. As I see it, there are at least three options: It would be easy to create something that derives from RadioButton, but then I can't use the abstract class I've created. I could change the abstract class to an interface, but then I lose the abstract implementations, and will in fact have duplication of code. I could derive from my abstract class, and re-implement the RadioButton-type properties and events (IsChecked, GroupName, etc.), but that certainly doesn't seem like a great idea. Note: I have seen http://stackoverflow.com/questions/2362641/how-to-get-a-group-of-toggle-buttons-to-act-like-radio-buttons-in-wpf, but what I want to do is a little more complex. I'm just wondering if anybody has an example of an implementation, or something that might be adapted to this kind of scenario. I can see pros and cons of each of the ideas above, but each comes with potential pitfalls. Thanks, wTs

    Read the article

  • IE8, XHTML, position: fixed; and z-index.

    - by Joel
    I have an XHTML 1.0 transitional Doctype. I have a <div> that is position: fixed; bottom: 0px; left: 0px; width: 100%; z-index: 200;. Inside that <div> I have two buttons which are position relative, aligned right, with a set z-index of 201; In Firefox the bar at the bottom and the two buttons are correctly located at the bottom. In IE8 however, the bar is visible and the z-index appears to be overlaying the other content, but the buttons are hidden behind the main div, despite being children and having their z-index set. I'm using the following meta tag; <meta http-equiv="X-UA-Compatible" content="IE=edge" /> to force the document into IE8 mode. If I emulate IE7 (put on compatability mode), the bar and buttons work just fine. I don't understand how IE7's rendering is better than IE8. I don't want to have to force compatability mode due to other things that IE7 cannot render and IE8 can. Is there another solution, or have I missed something? Thanks.

    Read the article

  • Moving checkmarks in checkbox lists after page reload - Firefox only

    - by DaveS
    I'm getting some strange behavior in Firefox whenever I put checkboxes inside a list (ol, ul, dl), and then dynamically insert buttons above the list. If I start with a something simple list like this: <dl class="c"> <dt><label for="a1"><input type="checkbox" id="a1" />one</label></dt> <dt><label for="a2"><input type="checkbox" id="a2" />two</label></dt> <dt><label for="a3"><input type="checkbox" id="a3" />three</label></dt> </dl> and add some jQuery like this: $(document).ready(function(){ var a = $('<button type="button">a</button>'); var b = $('<button type="button">b</button>'); $('<div/>').append(a).append(b).insertBefore($('.c')); }); ...then open it in Firefox, it looks fine at first. But check the first checkbox, reload the page, and the check-mark jumps to the second box. Reload again, and it jumps to the third. Reload yet again, and no checkboxes are left checked. If I leave out one of the buttons by dropping one of the append calls, it's fine. If I change the buttons to divs or something similar, it's fine. If I replace the dl tag with a div (and get rid of the dt tags), it's fine. But I need both buttons, and the checkboxes have to be in a list for what I'm trying to build. Does anybody know what's causing this?

    Read the article

  • getting parameter value from a table using javascript

    - by kawtousse
    hi every one; I want to get the parameter in my table(HTLML) table every time the user click edit button. The table contains in each row an edit button like following: retour.append("<td>"); retour.append("<button id=edit name=edit type=button onClick= editarow()>"); retour.append("<img src=edit.gif />"); retour.append("</button>"); retour.append("</td>"); to get the value of each row where edit is clicked using javascript I do the following: function editarow(){ var table = document.getElementById("sheet"); var buttons = table.getElementsByTagName("button"); for(var i=0; i<buttons.length; i++) { if(buttons[i].name=="edit") { buttons[i].onclick = function() { var buttonCell = this.parentNode;//cell var editThisRow = buttonCell.parentNode;//td var er=editThisRow.parentNode.attributes[1].value; alert(er); } } } } but i didn't get the values expected. thanks for help

    Read the article

  • How should I go about creating a point system for users like SO and yahoo answers?(PHP)

    - by ggfan
    I am creating a voting system for a Q&A site project in which if a user asks a question, he/she losses -5 points; answer a question +5, vote a question +1, etc. (kind of like SO and yahoo answers) --To create the basic arithmetic, I have a "users_points" table that relates the user_id and their total points. +---+---------+ | 1 | 100 | +---+---------+ | 2 | 54 | +---+---------+ --Basically if the users does certain task, it would + or - the points. How do I prevent users from say voting an answer up 100 times. ex: I want a user to be only able to vote once per question, etc.

    Read the article

  • jsp get ip address

    - by Alan
    Hello, whats the best way of preventing someone from voting twice? How do i get the users ip address? What if they are on a large network? will everyone on that network show the same ip? thanks UPDATE: request.getRemoteAddr() and request.getRemoteHost() return the Server names, not the client's host name and ip. Anyone else got any bright ideas? Ok, so lets forget about the voting twice thing. Im just trying to get the users ip address? i tried request.getRemoteAddr() and request.getRemoteHost() and think im getting the servers address. I have access to two separate networks and am getting the same IP address :(

    Read the article

< Previous Page | 28 29 30 31 32 33 34 35 36 37 38 39  | Next Page >