Search Results

Search found 2446 results on 98 pages for 'darren green'.

Page 82/98 | < Previous Page | 78 79 80 81 82 83 84 85 86 87 88 89  | Next Page >

  • Capture and handling the tab/Textchanged event in a textbox in asp.net MVC

    - by Icerman
    I have the following code th handle a user name validation on the server side. But the event seems not firing since break points in js or C# code didn't hit. Can anyone point out where I did wrong? Here is the user control which has a user name textbox: <%: Html.TextBox("UserName", Model.Username, new { maxlength = "40", size = "20", tabindex = "1", @onchange = "CheckAvailability()" })% CheckAvailability() is defined in the User.Validation.js and included in the above user control: $(document).ready(function () { function CheckAvailability() { $.post("/Home/Survey/CheckAvailability", { Username: $("#UserName").val() }, function (data) { var myObject = eval('(' + data + ')'); var newid = myObject; if (newid == 0) { $("#usernamelookupresult").html("<font color='green'>Available :-D</font>") } else { $("#usernamelookupresult").html("<font color='red'>Taken :-(</font>") } }); } }); Here is the survey controller function which will have server side validation: [HttpPost] public ActionResult CheckAvailability(string Username) { int Taken = 0; // This is where you add your database lookup if (Username == "abc") { Taken = 1; } return Json(Taken); }

    Read the article

  • javascript - rollover effect on overlapping transparent images

    - by user427969
    I want to add rollover effect on overlapping transparent images. For example: The following image is divided into 5 parts and I want to add rollover effect (different image) on each of them When O tried with div or img tag, the image is rendered as a rectangle so rollover effect is not proper. When i rollover on green part between yellow, the yellow image gets highlighted because its z-index is high. Following is the code that I tried: <body> <br /> <img src="part1.png" onclick="console.log('test1');"/> <img src="part2.png" onclick="console.log('test2');" style="position:absolute; left:30px; top: 19px;"/> <img src="part3.png" onclick="console.log('test3');" style="position:absolute; left:70px; top: 15px;"/> <img src="part4.png" onclick="console.log('test4');" style="position:absolute; left:95px; top: 16px;"/> <img src="part5.png" onclick="console.log('test5');" style="position:absolute; left:123px; top: 24px;"/> </body> images = , , , , I don't want to use jQuery, if possible.

    Read the article

  • not able to run c/cpp execs in eclipse cdt

    - by user1658323
    i installed eclipse and then cdt on an ubuntu system recently and was trying to make the first runnable c/c++ proj.. i installed g++ also, and then created the first executable cpp 'Hello World' project some files are created... then some issues... 1) even though Build Automatically is selected, I have to goto the project n do a Build Project to build it manually, and this i have to do everytime i make a change 2) After Building manually, there are some new folders created with Binaries and Debug files and i can see g++ commands in the console being executed. The project binary is output both to debug n binaries folder. But i am not able to run these through the Green Play Button or any other way in eclipse. Even Run configuration is not showing any option for c/C++ proj.. though i can goto terminal and run the binary myself through ./ But i want to be able to run n debug this through eclipse. plz help in fixing me this problem as i really love eclipse n have some c/cpp assignments coming soon.. Console info on doing a manual project build - Build of configuration Debug for project qwe ** make all Building file: ../src/qwe.cpp Invoking: GCC C++ Compiler g++ -O0 -g3 -Wall -c -fmessage-length=0 -MMD -MP -MF"src/qwe.d" -MT"src/qwe.d" -o "src/qwe.o" "../src/qwe.cpp" Finished building: ../src/qwe.cpp Building target: qwe Invoking: GCC C++ Linker g++ -o "qwe" ./src/qwe.o Finished building target: qwe Build Finished **

    Read the article

  • Dynamcally resising an open Accordion

    - by alavers
    I have an Accordion and the height of its content can be dynamically resized. I would like to see the Accordion dynamically respond to the child item's height, but I'm having trouble doing this. <lt:Accordion Name="MyAccordion" SelectionMode="ZeroOrOne" HorizontalAlignment="Stretch"> <lt:AccordionItem Name="MyAccordionItem" Header="MyAccordion" IsSelected="True" HorizontalContentAlignment="Stretch" VerticalAlignment="Stretch"> <StackPanel> <Button Content="Grow" Click="Grow"/> <Button Content="Shrink" Click="Shrink"/> <TextBox Name="GrowTextBox" Text="GrowTextBox" Height="400" Background="Green" SizeChanged="GrowTextBox_SizeChanged"/> </StackPanel> </lt:AccordionItem> </lt:Accordion> private void Grow(object sender, System.Windows.RoutedEventArgs e) { GrowTextBox.Height += 100; } private void Shrink(object sender, System.Windows.RoutedEventArgs e) { GrowTextBox.Height -= 100; } private void GrowTextBox_SizeChanged(object sender, System.Windows.SizeChangedEventArgs e) { MyAccordion.UpdateLayout(); MyAccordionItem.UpdateLayout(); } Mind you, if I collapse and then re-open the accordion, it takes shape just the way I want, but I'd like this resizing to occur immediately when the child resizes. I feebly attempted to fix this by adding a SizeChanged event handler that calls UpdateLayout() on the Accordion and AccordionItem, but this doesn't have any visual effect. I can't figure out where proper resizing takes place inside the Accordion control. Does anyone have an idea?

    Read the article

  • Problem with floating divs in IE8

    - by hivehicks
    I want to make two block stand side by side. In Opera, Chrome and Firefox I get the expected result with the code I use. But IE8 refuses to display it correctly. Here's IE8 screenshot: http://ipicture.ru/upload/100405/RCFnQI7yZo.png And Chrome screenshot (how it should look like): http://ipicture.ru/upload/100405/4x95HC33zK.png Here's my HTML: <div id="balance-container"> <div id="balance-info-container"> <p class="big" style="margin-bottom: 5px;"> <strong> <span style="color: #56666F;">??????:</span> <span style="color: #E12122;">-2312 ???</span> </strong> </p> <p class="small minor"><strong>????????? 1000 ???. ?? 1.05.10</strong></p> </div> <div id="balance-button-container"> <button id="pay-button" class="green-button">????????? ????</button> </div> </div> And CSS: #balance-container { margin-left: auto; margin-right: auto; width: 390px; } #balance-info-container, #balance-button-container { float: left; } #balance-info-container { width: 250px; }

    Read the article

  • ASP.NET Repeater - Evaluate Item as int?

    - by WedTM
    I'm trying to style a table row based upon a value in the databound collection (from LINQ to SQL) in my item template, however it's not working. This is what I have so far: <ItemTemplate> <% string style = String.Empty; if ((string)DataBinder.Eval(Quotes.Cu, "Status") == "Rejected") style = "color:red;"; else if ((string)Eval("Priority") == "Y") style = "color:green;"; if (style == String.Empty) Response.Write("<tr>"); else Response.Write("<tr style=\"" + style + "\""); %> <td> <%# Eval("QuoteID") %> </td> <td> <%# Eval("DateDue", "{0:dd/MM/yyyy}") %> </td> <td> <%# Eval("Company") %> </td> <td> <%# Eval("Estimator") %> </td> <td> <%# Eval("Attachments") %> </td> <td> <%# Eval("Employee") %> </td> </tr> </ItemTemplate>

    Read the article

  • Dynamically add data stored in php to nested json

    - by HoGo
    I am trying to dynamicaly generate data in json for jQuery gantt chart. I know PHP but am totally green with JavaScript. I have read dozen of solutions on how dynamicaly add data to json, and tried few dozens of combinations and nothing. Here is the json format: var data = [{ name: "Sprint 0", desc: "Analysis", values: [{ from: "/Date(1320192000000)/", to: "/Date(1322401600000)/", label: "Requirement Gathering", customClass: "ganttRed" }] },{ name: " ", desc: "Scoping", values: [{ from: "/Date(1322611200000)/", to: "/Date(1323302400000)/", label: "Scoping", customClass: "ganttRed" }] }, <!-- Somoe more data--> }]; now I have all data in php db result. Here it goes: $rows=$db->fetchAllRows($result); $rowsNum=count($rows); And this is how I wanted to create json out of it: var data=''; <?php foreach ($rows as $row){ ?> data['name']="<?php echo $row['name'];?>"; data['desc']="<?php echo $row['desc'];?>"; data['values'] = {"from" : "/Date(<?php echo $row['from'];?>)/", "to" : "/Date(<?php echo $row['to'];?>)/", "label" : "<?php echo $row['label'];?>", "customClass" : "ganttOrange"}; } However this does not work. I have tried without loop and replacing php variables with plain text just to check, but it did not work either. Displays chart without added items. If I add new item by adding it to the list of values, it works. So there is no problem with the Gantt itself or paths. Based on all above I assume the problem is with adding plain data to json. Can anyone please help me to fix it?

    Read the article

  • How to traverse table in Jquery and add a class?

    - by SWL
    I have a simple table of two rows. The first column is required, but the others are not; however, I would like them to be required in pairs. So if the user enters a value for Quantity3, then Size3 should also now be required. As a fiddle: http://jsfiddle.net/NaRts/7/ <tr> <td><input name="qty1[492]" class="qty required" type="text"></td> <td><input name="qty2[492]" class="qty" type="text"></td> <td><input name="qty3[492]" class="qty" type="text"></td> </tr><tr> <td><input name="size1[492]" type="text" class="size required" ></td> <td><input name="size2[492]" type="text" class="size" ></td> <td><input name="size3[492]" type="text" class="size" ></td> </tr> And the simple jQuery I have is: $('.qty').keyup(function() { var s = $(this).attr('name'); // = qty3[418] var qtyID = s.replace(/[^1-9\[\]]/g, ""); // = 3[418] var SizeID = "size" + qtyID; var $sizeInput = $(this).closest('tr').next().find(SizeID); $sizeInput.css('background-color', 'green'); $sizeInput.addClass('required'); //I tried this too but it didn't work //$(this).parent().find(SizeID).addClass('required'); });? ? Any help is much appreciated.

    Read the article

  • XSLT - How to select top a to top b

    - by user812241
    how can I extract the first 2 C-Values ('Baby' and 'Cola') where B is 'RED'. Input instance is: <Root> <A> <B>BLACK</B> <C>Apple</C> </A> <A> <B>RED</B> <C>Baby</C> </A> <A> <B>GREEN</B> <C>Sun</C> </A> <A> <B>RED</B> <C>Cola</C> </A> <A> <B>RED</B> <C>Mobile</C> </A> </Root> Output instance must be: <Root> <D>Baby</D> <D>Cola</D> </Root> I thought about the combination of for-each and global variables. But in XSLT it is not possible to change the value for a global variable to break the for-each. I have no idea anymore.

    Read the article

  • Linq and returning types

    - by cdotlister
    My GUI is calling a service project that does some linq work, and returns data to my GUI. However, I am battling with the return type of the method. After some reading, I have this as my method: public static IEnumerable GetDetailedAccounts() { IEnumerable accounts = (from a in Db.accounts join i in Db.financial_institution on a.financial_institution.financial_institution_id equals i.financial_institution_id join acct in Db.z_account_type on a.z_account_type.account_type_id equals acct.account_type_id orderby i.name select new {account_id = a.account_id, name = i.name, description = acct.description}); return accounts; } However, my caller is battling a bit. I think I am screwing up the return type, or not handling the caller well, but it's not working as I'd hoped. This is how I am attempting to call the method from my GUI. IEnumerable accounts = Data.AccountService.GetDetailedAccounts(); Console.ForegroundColor = ConsoleColor.Green; Console.WriteLine("Accounts:"); Console.ForegroundColor = ConsoleColor.White; foreach (var acc in accounts) { Console.WriteLine(string.Format("{0:00} {1}", acc.account_id, acc.name + " " + acc.description)); } int accountid = WaitForKey(); However, my foreach, and the acc - isn't working. acc doesn't know about the name, description and id that I setup in the method. Am I at least close to being right?

    Read the article

  • Sql Server problems reading columns with a foreigh key

    - by illdev
    I have a weird situation, where simple queries seem to never finish for instance SELECT top 100 ArticleID FROM Article WHERE ProductGroupID=379114 returns immediately SELECT top 1000 ArticleID FROM Article WHERE ProductGroupID=379114 never returns SELECT ArticleID FROM Article WHERE ProductGroupID=379114 never returns SELECT top 1000 ArticleID FROM Article returns immediately by 'returning' I mean 'in query analyzer the green check mark appears and it says "Query executed successfully"'. I sometimes get the rows painted to the grid in qa, but still the query goes on waiting for my client to time out - 'sometimes': SELECT ProductGroupID AS Product23_1_, ArticleID AS ArticleID1_, ArticleID AS ArticleID18_0_, Inventory_Name AS Inventory3_18_0_, Inventory_UnitOfMeasure AS Inventory4_18_0_, BusinessKey AS Business5_18_0_, Name AS Name18_0_, ServesPeople AS ServesPe7_18_0_, InStock AS InStock18_0_, Description AS Descript9_18_0_, Description2 AS Descrip10_18_0_, TechnicalData AS Technic11_18_0_, IsDiscontinued AS IsDisco12_18_0_, Release AS Release18_0_, Classifications AS Classif14_18_0_, DistributorName AS Distrib15_18_0_, DistributorProductCode AS Distrib16_18_0_, Options AS Options18_0_, IsPromoted AS IsPromoted18_0_, IsBulkyFreight AS IsBulky19_18_0_, IsBackOrderOnly AS IsBackO20_18_0_, Price AS Price18_0_, Weight AS Weight18_0_, ProductGroupID AS Product23_18_0_, ConversationID AS Convers24_18_0_, DistributorID AS Distrib25_18_0_, type AS Type18_0_ FROM Article AS articles0_ WHERE (IsDiscontinued = '0') AND (ProductGroupID = 379121) shows this behavior. I have no idea what is going on. Probably select is broken ;) Anyone can tell me how to handle such a situation? More info, anyone?

    Read the article

  • Posting a form using Ajax

    - by hopes
    Hi everyone, do u have an idea of how to send my radio button name for myAjaxPostrequest.send(parameters); can parameters be like this: var answername=document.getElementById('option1').name; var parameters=answername; ? this code is for using ajax to post a form and my php page needs the name of the radiobutton clicked I tried this code and it works as I want except for inserting in the database. It means parameters is the problem what I want to insert is the number located between brakects of the radiobutton name. I could do it when I post form without Ajax but now I can't send the name of the radiobutton any clue about what I can send as parameter for function myAjaxPostrequest.send(parameters);? <form id="Question1" method="post"> <br /> <P> The sky color is.. </P><img border="0" src="images/wonder.png" width="94" height="134"/><br /><br /><br /> <input type="radio" id="option1" name="answer[1]" value="correct!" onclick="submitFormWithAjax();"/> blue <br /> <input type="radio" id="option1" name="answer[1]" value="false!" onclick="submitFormWithAjax();"/> red <br /> <input type="radio" id="option1" name="answer[1]" value="false!" onclick="submitFormWithAjax();"/> green <br /> <input type="radio" id="option1" name="answer[1]" value="false!" onclick="submitFormWithAjax();"/> white <br /> <br /> </Form>

    Read the article

  • HOw to make image stay inside the div box on scrolling

    - by Mirage
    I have the image position fixed inside div and code is gven below #content{ margin-top:100px; width:900px; color:#009; border:1px solid red; overflow:hidden; display:block; } img { float:left; position:fixed; top:140px; padding:50px; } #text{ display:block; border:1px solid green; width:500px; height:1200px; float:right; overflow:scroll; } #footer{ clear:both; width:600px; height:300px; border:2x solid blue; color:#939; } HTML is <div id="content" > <img src="bar.jpg" width="46" height="639" /> <div id="text"> ggggggggggggggggggfgdfgdfgdgdfgdgdfgdf </div> </div> <div id="footer"> Footer text </div> </body> Now when i scroll down then image comes out of the content div box. IS there any way so that even if i scroll the image bar should stay inside the div box. The screen shot shows my problem First Screen is ok without scrolling But when i scroll the text full then it covers my footer as well

    Read the article

  • Launch a new page in Zend/php on button click

    - by BlueMonster
    PHP & Zend Noob here I've downloaded the skeleton project from here: https://github.com/zendframework/ZendSkeletonApplication Say i want to open a new page that simply displays "hello world" text if click on the "ZF2 Development Portal" button(bottom left green button) on the page that launches --- how do i do this? See image: I've read through this tutorial, but i'm not sure how the model, view, or controller are actually launched? See tutorial: http://blog.wilgucki.pl/2012/07/tworzenie-modulw-w-zend-framework-2.html From looking at the code, i know that i will have to change this line of code: <div class="span4"> <h2><?php echo $this->translate('Follow Development') ?></h2> <p><?php echo sprintf($this->translate('Zend Framework 2 is under active development. If you are interested in following the development of ZF2, there is a special ZF2 portal on the official Zend Framework website which provides links to the ZF2 %swiki%s, %sdev blog%s, %sissue tracker%s, and much more. This is a great resource for staying up to date with the latest developments!'), '<a href="http://framework.zend.com/wiki/display/ZFDEV2/Home">', '</a>', '<a href="http://framework.zend.com/zf2/blog">', '</a>', '<a href="http://framework.zend.com/issues/browse/ZF2">', '</a>') ?></p> <p><a class="btn btn-success" href="http://framework.zend.com/zf2" target="_blank"><?php echo $this->translate('ZF2 Development Portal') ?> &raquo;</a></p> </div> More specifically this line: <p><a class="btn btn-success" href="http://framework.zend.com/zf2" target="_blank"><?php echo $this->translate('ZF2 Development Portal') ?> &raquo;</a></p> but i'm really confused as to what i'm supposed to change it to in order to launch a new page. Any ideas? Thanks in advance!

    Read the article

  • UINavigationController not working under ARC in iPhone

    - by user1811427
    I have creared a new project "Empty Application" template in Xcode 4.3, it is having only two classes AppDelegate.h & .m I cheaked with ARC to use automatic reference count while creating the app. I added two new files "RootViewController" & "NewProjectViewControllers". I implemented code to set navigation controller as follows in AppDelegate - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]]; // Override point for customization after application launch. rootViewController = [[MainViewController alloc] init]; UINavigationController *navigation = [[UINavigationController alloc] initWithRootViewController:rootViewController]; [self.window addSubview:navigation.view]; self.window.backgroundColor = [UIColor whiteColor]; [self.window makeKeyAndVisible]; return YES; } and in hte home view (Root view controller) implemented as follows - (void)viewDidLoad { [super viewDidLoad]; self.title = @"Projects"; UINavigationBar *navigationBar = [self.navigationController navigationBar]; [navigationBar setTintColor: [UIColor colorWithRed:10/255.0f green:21/255.0f blue:51/255.0f alpha:1.0f]]; //To set the customised bar item UIButton *rightBarBtn = [UIButton buttonWithType:UIButtonTypeCustom]; [rightBarBtn setBackgroundImage:[UIImage imageNamed:@"plus_new.png"] forState:UIControlStateNormal]; rightBarBtn.frame=CGRectMake(0.0, 100.0, 30.0, 30.0); [rightBarBtn addTarget:self action:@selector(addProject) forControlEvents:UIControlEventTouchUpInside]; UIBarButtonItem* rightBarItem = [[UIBarButtonItem alloc] initWithCustomView:rightBarBtn]; self.navigationItem.rightBarButtonItem = rightBarItem; // Do any additional setup after loading the view from its nib. } - (void) addProject { NewProjViewController *editProject = [[NewProjViewController alloc] init]; [self.navigationController pushViewController:editProject animated:YES]; NSLog(@"xxxxxxxxxxxxxxx"); } But since i used ARC the navigation may dealoc immediately and it doesn't work, All the actions in method works except push to the next view if i do same thing with out ARC it works fine How to resolve this issue..? Thanks in advance

    Read the article

  • javascript split() array contains

    - by Mahesha999
    While learning JavaScript, I did not get why the output when we print the array returned of the Sting.split() method (with regular expression as an argument) is as explained below. var colorString = "red,blue,green,yellow"; var colors = colorString.split(/[^\,]+/); document.write(colors); //this print 7 times comma: ,,,,,,, However when I print individual element of the array colors, it prints an empty string, three commas and an empty string: document.write(colors[0]); //empty string document.write(colors[1]); //, document.write(colors[2]); //, document.write(colors[3]); //, document.write(colors[4]); //empty string document.write(colors[5]); //undefined document.write(colors[6]); //undefined Then, why printing the array directly gives seven commas. Though I think its correct to have three commas in the second output, I did not get why there is a starting (at index 0) and ending empty string (at index 4). Please explain I am screwed up here.

    Read the article

  • how to create static line in coreplot

    - by Rémi Bédard-Couture
    I am trying to make my control lines static so instead of being displayed as part of the graph(the control lines are moving with the graph), they would be displayed like an axis the app can only scroll horizontally i'm talking about the two red line and the green line(which i put over the x axis) this is how i do my lines: // Center line CPTScatterPlot *centerLinePlot = [[CPTScatterPlot alloc] init]; centerLinePlot.identifier = kCenterLine; CPTMutableLineStyle *lineStyle = [CPTMutableLineStyle lineStyle]; lineStyle.lineWidth = 2.0; lineStyle.lineColor = [CPTColor greenColor]; centerLinePlot.dataLineStyle = lineStyle; centerLinePlot.dataSource = self; [graph addPlot:centerLinePlot]; but maybe it has something to do with the displayed range: ////////ajuste la portion a voir if(data.Resultats.count>10) { plotSpace.xRange = [CPTPlotRange plotRangeWithLocation:CPTDecimalFromDouble(data.Resultats.count - 10) length:CPTDecimalFromDouble(10)]; } plotSpace.yRange = [CPTPlotRange plotRangeWithLocation:CPTDecimalFromDouble(RangeMin) length:CPTDecimalFromDouble(RangeMax-RangeMin)]; // Adjust visible ranges so plot symbols along the edges are not clipped CPTMutablePlotRange *xRange = [plotSpace.xRange mutableCopy]; CPTMutablePlotRange *yRange = [plotSpace.yRange mutableCopy]; //place l'axe x sur la ligne de controle pour voir les WorkOrders x.orthogonalCoordinateDecimal = CPTDecimalFromDouble(center); //x.orthogonalCoordinateDecimal = yRange.location; //y.orthogonalCoordinateDecimal = xRange.location; //x.visibleRange = xRange; //y.visibleRange = yRange; //x.gridLinesRange = yRange; //y.gridLinesRange = xRange; [xRange expandRangeByFactor:CPTDecimalFromDouble(1.15)];//1.05 [yRange expandRangeByFactor:CPTDecimalFromDouble(1.15)]; plotSpace.xRange = xRange; plotSpace.yRange = yRange;

    Read the article

  • How do you handle the tension between refactoring and the need for merging?

    - by Xavier Nodet
    Hi, Our policy when delivering a new version is to create a branch in our VCS and handle it to our QA team. When the latter gives the green light, we tag and release our product. The branch is kept to receive (only) bug fixes so that we can create technical releases. Those bug fixes are subsequently merged on the trunk. During this time, the trunk sees the main development work, and is potentially subject to refactoring changes. The issue is that there is a tension between the need to have a stable trunk (so that the merge of bug fixes succeed -- it usually can't if the code has been e.g. extracted to another method, or moved to another class) and the need to refactor it when introducing new features. The policy in our place is to not do any refactoring before enough time has passed and the branch is stable enough. When this is the case, one can start doing refactoring changes on the trunk, and bug-fixes are to be manually committed on both the trunk and the branch. But this means that developpers must wait quite some time before committing on the trunk any refactoring change, because this could break the subsequent merge from the branch to the trunk. And having to manually port bugs from the branch to the trunk is painful. It seems to me that this hampers development... How do you handle this tension? Thanks.

    Read the article

  • jquery touch punch - draggable on ipad

    - by dshuta
    i am starting to work with the jquery touch punch extensions in order to allow draggability on ipad, but i am getting tripped up right away. probably something terribly dumb on my part. the draggable example from the developer works fine on my ipad: http://furf.com/exp/touch-punch/draggable.html but not for me: http://danshuta.com/touchpunch/ this works fine in my desktop browser, but on the ipad it just focuses on the block and scrolls the entire page as i drag, as if it were just an image or other normal embedded object. as this is what happens normally with jquery/ui on ipad, this makes me think it is not loading or otherwise ignoring the "punch" code from my site (though if i host the jquery files on my site via the same path, those load and function fine in desktop browser). here's the entire code, very basic: <!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8" /> <title>Touchpunchtest</title> <script src="http://code.jquery.com/jquery.min.js"></script> <script src="http://code.jquery.com/ui/1.8.17/jquery-ui.min.js"></script> <script src="js/jquery.ui.touch-punch.js"></script> </head> <body> <div id="draggybox" onclick="void(0)" style="width: 150px; height: 150px; background: green;"></div> <script>$('#draggybox').draggable();</script> </body> </html> what am i missing?!

    Read the article

  • Limiting the width of a TextBlock in Silverlight

    - by Druzil
    The obvious MaxWidth gets ignored and the text in the "DisplayBox" TextBlock displays the whole text even if this text continues past the parent container controls (to the edge of the silverlight area. <win:HierarchicalDataTemplate x:Key="hierarchicalTemplate" ItemsSource="{Binding _children}"> <Border BorderThickness="0" BorderBrush="Orange" HorizontalAlignment="Stretch" Background="{Binding Converter={StaticResource BackgroundConverter}}"> <toolkit:DockPanel LastChildFill="True" Width="{Binding HeirarchyLevel, Converter={StaticResource WidthConverter}}" Height="20"> <Canvas toolkit:DockPanel.Dock="Right" Width="20" MouseLeftButtonUp="Arrow_MouseLeftButtonDown"> <Rectangle Width="20" Height="20" Fill="Transparent" /> <Line Stroke="Black" X1="5" Y1="10" X2="17" Y2="10" /> <Line Stroke="Black" X1="11" Y1="5" X2="17" Y2="10" /> <Line Stroke="Black" X1="11" Y1="15" X2="17" Y2="10" /> </Canvas> <Ellipse Canvas.Top="5" Width="10" Height="10" Fill="Green" toolkit:DockPanel.Dock="Right" MouseLeftButtonDown="Ellipse_MouseLeftButtonDown" /> <Canvas Width="Auto" Loaded="TextArea_Loaded"> <TextBlock Name="DisplayBox" FontFamily="Arial" FontSize="17" Foreground="Black" Width="Auto" Text="{Binding TaskName}" MouseLeftButtonUp="TextBlock_MouseLeftButtonUp" /> <TextBox Name="EditBox" FontFamily="Arial" FontSize="10" Foreground="Black" Height="20" Text="{Binding TaskName}" Visibility="Collapsed" LostFocus="TextBox_LostFocus" /> <Line Stroke="Black" X1="0" Y1="10" X2="202" Y2="10" Width="Auto" /> </Canvas> </toolkit:DockPanel> </Border> </win:HierarchicalDataTemplate>

    Read the article

  • UIPickerview filter list from a user previous textfield input

    - by user1547180
    int variabla; - (NSInteger)numberOfComponentsInPickerView:(UIPickerView *)pickerView { return 1; } - (NSInteger)pickerView:(UIPickerView *)pickerView numberOfRowsInComponent:(NSInteger)component { if (variabla == 1) return list4.count; else if(variabla == 2) return list3.count; if (variabla == 3) return list1.count; if (variabla == 4) return list2.count; return YES; [pickerView reloadAllComponents]; } - (void)pickerView:(UIPickerView *)pickerView didSelectRow:(NSInteger)row inComponent:(NSInteger)component { if (variabla == 1) { subjectField.text = [list4 objectAtIndex:row]; } else if (variabla == 2) { gradeField.text = [list3 objectAtIndex:row]; } else if (variabla == 3) { mathField.text = [list1 objectAtIndex:[pickerView selectedRowInComponent:0]]; selectedRow = [pickerView selectedRowInComponent:0]; coreTView.text = [mathMeaning objectAtIndex:selectedRow]; } if (variabla == 4) { elaField.text = [list2 objectAtIndex:[pickerView selectedRowInComponent:0]]; selectedRow = [pickerView selectedRowInComponent:0]; coreTView.text = [elaMeaning objectAtIndex:selectedRow]; } [pickerView reloadAllComponents]; NSLog(@"row selected is %d", selectedRow); } - (NSString *)pickerView:(UIPickerView *)pickerView titleForRow:(NSInteger)row forComponent:(NSInteger)component { if (variabla == 1) return [list4 objectAtIndex:row]; if (variabla == 2) return [list3 objectAtIndex:row]; if (variabla == 3) return [list1 objectAtIndex:row]; if (variabla == 4) return [list2 objectAtIndex:row]; return NO; [pickerView reloadAllComponents]; } Hey I would like to know or pointed in the right direction on how to load a UIPickerView based on the user input from a previous uitextfield so if they type in the previous textfield apple I would like red, green, blue to show in the UIPickerView or if they type orange I would like to see orange, yellow grape thanks for the help in advance.

    Read the article

  • Is using a GUI worse than using bash and other text interface tools?

    - by Glycerine
    As a freelancer, and previous Adobe trainer, I get a look-in at many development workflows and alternate styles of programming and design and therefore quite open to different workflows. But a recent post I had, I needed to use SQL - so I whipped out navicat and wrote a nice join statement. I had sniggering comments and sideways glances when I told the developers I was working with navicat, I preferred a GUI to bash and I prefer Aptana to notepad. I felt a little insulted and under skilled as I didn't want to sit in front of reams of spewing green text. I know and use the tools when required but I prefer more attractive, modern products. Have you guys had this? What do you do to overcome it - apart from using bash and notepad more? How do you subdue a developer who's being arrogant about his skill? And is it my fault? I hope this question is not subjective, I do feel like I am inferior to my peers due to it - so some advise would really help.

    Read the article

  • How do I get this linearlayout working on android?

    - by Arkadiy
    I'm trying to create a scrollview that contains a linearlayout with some options inside of it. I'd like for the options to show up at the top and grow downwards, and to have "save," "delete," and "cancel" buttons which show up at the very bottom of the screen (if there is space left in between the bottom of all the options and the top of the buttons). Here's a screenshot of my attempt: http: //img375.imageshack.us/img375/3628/10370572.png (StackOverflow was only letting me post a single link so you'll have to get rid of the space in between http: and the rest) As you can see, the buttons show up directly below the options rather than at the bottom of the screen. In fact the top level (green) linearlayout doesn't even extend all the way down, despite having a height of fill_parent and a weight of 1 (and the blue is the scrollview, so there is room to expand). I've tried every possible combination of heights, weights, gravities, and anything else to get this working and still can't do it. Everytime I pasted my xml layout into here, the top and bottom portions got cut off, so instead I pasted it here: pastey link Can anyone see what I'm doing wrong?

    Read the article

  • Returning JSON object from an ASP.NET page

    - by Emin
    Hi, In my particular situation, I have couple of solutions to my problem. I want to find out which one is more feasible. In this case, I can also achieve my goal by returning a JSON object from my server side code, however, I do not know how it is done and what is the best way of doing it. First off, I don't need a full aspx page as I only need a response returned from code. So, do I use web services? handler? or is there any other specific way you people do this? Is this solution feasible? do I build the JSON string using the StringBuilder class and inject that string into the target aspx page? are there any precautions? or things that I should be aware of? I appreciate your ideas. Regards, Kemal ------------UPDATE !------------ Suppose I have a JSON object in my userlist.aspx page. which then I use it with jQuery... {"menu": { "id": "color1", "value": "color", "popup": { "menuitem": [ {"value": "Red"}, {"value": "Green"}, {"value": "Yellow"} ] } }} // example taken from the json.org/example page now when I want to add a new menuitem from my aspx page, what do I do... I think this way my question is more specific... Lets assume I create a new string in my aspx code, as such "{"value": "Blue"}. Now how do I inject this into the already existing itemlist in the target page? or is this not the correct approach to this kind of situation? if not how else can it be achieved? Also if I wanted to fire a jquery event when a new item is added to this list, how is this achieved?

    Read the article

  • Javascript - event listener toggle button

    - by user2546157
    I'm trying to create a button which can toggle "double click" to "single click" and in the opposite. For some reason, once it toggles to single click and it cannot toggle back. Can anyone please help! function init() { normal_listeners(); } function addListener(){ var image1 = document.getElementById('image_1'); var image2 = document.getElementById('image_2'); var image3 = document.getElementById('image_3'); if(document.getElementById('listener_1').value == "Listener"){ document.getElementById('listener_1').style.backgroundColor = "red"; alert("Normal"); image1.addEventListener("dblclick", function(){userChoice(1);}, false); image2.addEventListener("dblclick", function(){userChoice(2);}, false); image3.addEventListener("dblclick", function(){userChoice(3);}, false); document.getElementById('listener_1').value = "Normal"; } else if(document.getElementById('listener_1').value == "Normal") { document.getElementById('listener_1').style.backgroundColor = "green"; alert("Listener"); image1.addEventListener("click", function(){userChoice(1);}, false); image2.addEventListener("click", function(){userChoice(2);}, false); image3.addEventListener("click", function(){userChoice(3);}, false); document.getElementById('listener_1').value = "Listener"; } } function normal_listeners(){ var image1 = document.getElementById('image_1'); var image2 = document.getElementById('image_2'); var image3 = document.getElementById('image_3'); var listener1 = document.getElementById('listener_1'); listener1.addEventListener("click", addListener, false); image1.addEventListener("dblclick", function(){userChoice(1);}, false); image2.addEventListener("dblclick", function(){userChoice(2);}, false); image3.addEventListener("dblclick", function(){userChoice(3);}, false); } window.onload = init; <img id="image_1" src="rock.jpg" alt="ROCK" width="100" height="100"> <img id="image_2" src="paper.jpg" alt="PAPER" width="100" height="100"> <img id="image_3" src="scissors.jpg" alt="SCISSORS" width="100" height="100"> <input type="button" id="listener_1" value="Normal" style="background-color:red">

    Read the article

< Previous Page | 78 79 80 81 82 83 84 85 86 87 88 89  | Next Page >