Search Results

Search found 14593 results on 584 pages for 'pat inside'.

Page 19/584 | < Previous Page | 15 16 17 18 19 20 21 22 23 24 25 26  | Next Page >

  • Shrinking image by 57% and centering inside css structure

    - by Johua
    Hy, i'm really stuck. I'll go step by step and hope to make it short. This is the html structure: <li class="FAVwithimage"> <a href=""> <img src="pics/Joshua.png"> <span class="name">Joshua</span> <span class="comment">Developer</span> <span class="arrow"></span> </a> </li> Before i paste the css classes, some info about the exact goal to accomplish: Resize the picture (img) by 57%. If it cannot be done with css, then jquery/javascript solution. For example: Original pic is 240x240px, i need to resize it by 57%. That means that a pic of 400x400 would be bigger after resizing. After resizing, the picture needs to be centered vertical&horizontal inside a: 68x90 boundaries. So you have an LI element, wich has an A element, and inside A we have IMG, IMG is resized by 57% and centered where the maximum width can be of course 68px and maximum height 90px. No for that to work i was adding a SPAN element arround the IMG. This is what i was thinking: <li class="FAVwithimage"> <a href=""> <span class="picHolder"><img src="pics/Joshua.png"></span> <span class="name">Joshua</span> <span class="comment">Developer</span> <span class="arrow"></span> </a> </li> Then i would give the span element: display:block and w=68px, h=90px. But unforunatelly that didn't work. I know it's a long post but i'v did my best to describe it very simple. Beneath are the css classes and a picture to see what i need. li.FAVwithimage { height: 90px!important; } li.FAVwithimage a, li.FAVwithimage:hover a { height: 81px!important; } That's it what's relevant. I have not included the classes for: name,comment,arrow And now the classes that are incomplete and refer to IMG. li.FAVwithimage a span.picHolder{ /*put the picHolder to the beginning of the LI element*/ position: absolute; left: 0; top: 0; width: 68px; height: 90px; diplay:block; border:1px solid #F00; } Border is used just temporary to show the actuall picHolder. It is now on the beginning of LI, width and height is set. li.FAVwithimage span.picHolder img { max-width:68px!important; max-height:90px!important; } This is the class wich should shrink the pic by 57% and center inside picHolder Here I have a drawing describing what i need:

    Read the article

  • iphone - direct link to iPhone review form from inside iphone

    - by Mike
    I am trying to link directly to the review link of one of my Apps. I know that it is possible because Appirater did it in the past, but some change in iTunes turned the API down. Appirater uses this URL NSString *templateReviewURL = @"itms-apps://itunes.apple.com/WebObjects/MZStore.woa/wa/viewContentsUserReviews?id=APP_ID&onlyLatestVersion=true&pageNumber=0&sortOrdering=1&type=Purple+Software"; where APP_ID is the ID of an application. running this from inside the APP gives me the message Cannot Connect to iTunes Store. This Page talks about another kind of link https://userpub.itunes.apple.com/WebObjects/MZUserPublishing.woa/wa/addUserReview?id=APP_ID&type=Purple+Software and also itms-apps://ax.itunes.apple.com/WebObjects/MZStore.woa/wa/viewContentsUserReviews?type=Purple+Software&id=APP_ID The first one works, but just from the desktop mac. The second gives me the same error as the first... Cannot Connect to iTunes Store. iTunes link maker is not helping too, because it has no tools for iPad links... Do you guys know how to link to an app's review form from inside an app? In case you don't know, what kind of package should I use to dig this? a package sniffer? thanks for any help.

    Read the article

  • jQuery UI dialog on ASP.NET page (inside user control)

    - by marc_s
    I have a really odd behavior here: I created a little popup dialog in jQuery UI, and in my test HTML page, it works flawlessly. When I click on the button, the popup comes up, covers the background, and remains on screen until I click on one of the two buttons (OK or Cancel) provided. So now I wanted to add this into my ASP.NET 3.5 app. I wanted to add it to a GridView inside a user controls (ASCX), which is on a page (ASPX) contained inside a master page. The jQuery 1.4.2 and jQuery UI 1.8.1 scripts are referenced on the master page: <body> <form id="XXXXXX" runat="server"> <Ajax:ScriptManager ID="masterScriptManager" runat="server" ScriptMode="Auto"> <Scripts> <asp:ScriptReference Path="~/Scripts/jquery-1.4.2.min.js" /> <asp:ScriptReference Path="~/Scripts/jquery-ui-1.8.1.custom.min.js" /> </Scripts> </Ajax:ScriptManager> I had to change this to use the Ajax script manager, since adding them to the as never worked. So in my gridview, I have a column with image buttons, and when the user clicks on those, I am calling a little javascript function to show the jQuery UI dialog: function showDialog() { $("#dlg-discount").dialog('open'); $("#txtAmount").focus(); } When I run this page in MS IE 8, I get a separate page, and at the top of the page, I get the contents of my , with proper background color and all. In Firefox 3.5.6, I do get the dialog as a popup. In both cases, the dialog page/popup disappears again after a second or less - without me clicking anything! It seems similar to this question but the solution provided there doesn't work in my case. This one here also seems similar but again: the solution presented doesn't seem to work in my case... Any ideas / hints / tips on what the h** is going on here?? Thanks!

    Read the article

  • WPF ListView get GridViewColumn from control inside DataTemplate

    - by ragi
    Example: <ListView Name="lvAnyList" ItemsSource="{Binding}"> <ListView.View> <GridView> <GridViewColumn Header="xx" DisplayMemberBinding="{Binding XX}" CellTemplate="{DynamicResource MyDataTemplate}"/> <GridViewColumn Header="yy"> <GridViewColumn.CellTemplate> <DataTemplate> <TextBlock Text="{Binding YY}" /> </DataTemplate> </GridViewColumn.CellTemplate> </GridViewColumn> </GridView> </ListView.View> </ListView> If I access the TextBlock inside DataTemplate I will have access to information about the bound path. But I don't know how to find (starting from the TextBlock) its containing GridViewColumn (which is in the GridViewRowPresenter columns list) and compare it to the grid's GridViewColumn (from GridViewHeaderRowPresenter column list) to get the header's name. At the end I should have the pairs: xx-XX, yy-YY I can find a list of all TextBlocks inside ListView by using this: GridViewRowPresenter gvrp = ControlAux.GetVisualDescendants<GridViewRowPresenter>(element).FirstOrDefault(); IEnumerable<TextBlock> entb = GetVisualDescendants<TextBlock>(gvrp); I can find a list of all GridViewColumnHeaders: GridViewHeaderRowPresenter gvhrp = ControlAux.GetVisualDescendants<GridViewHeaderRowPresenter>(element).FirstOrDefault(); And I cannot find the connection between the TextBlocks and the GridViewColumns... I hope this is understandable.

    Read the article

  • Richfaces - <rich:Editor> inside jQuery ui dialog

    - by Guus
    I use a <rich:editor> inside a JQuery UI dialog: <div id="helpDialog" style="display: none" title="#{messages.help}"> <rich:editor id="helpTextArea" theme="advanced" value="#{helpUtils.test(helpId)}"> <f:param name="theme_advanced_buttons1" value="bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,|,fontselect,fontsizeselect,|,forecolor,backcolor"/> <f:param name="theme_advanced_buttons2" value=""/> <f:param name="theme_advanced_buttons3" value=""/> <f:param name="theme_advanced_toolbar_location" value="top"/> <f:param name="width" value="90%"/> <f:param name="theme_advanced_toolbar_align" value="left"/> </rich:editor> <p> <button id="editHelpButton">#{messages.edit}</button> <button id="saveHelpButton">#{messages.save}</button> </p> </div> When I click on "font family" or "font size" the dropdown box is shown in the upper left corner of the screen and not inside the dialog. (see screenshot) How can I fix this? screenshot

    Read the article

  • Editing a UITextField inside a UITableViewCell fails

    - by Stephen Darlington
    In my application I have a UITextField inside a UITableViewCell. If I click inside the text field and add some text I find that if try to move the insertion point it works the first time but fails on subsequent attempts. I am completely unable to move the selection; no "magnifying glass" appears. Even more curious, this "setting" seems to be permanent until I restart the application. And it affects all UITextFields on that screen and not just the one that I originally tried to edit. If you want to see it yourself, try the "UICatalog" sample that comes with the iPhone SDK. Click "text fields" and then "edit" and play around with the text boxes. I've done a lot of digging on this but it's pretty hard to Google for! The best references I've found are on Apple's support board and MacRumors formum (both reference a solution that apparently used to work on iPhone 2.0 but does work not with contemporary versions -- I did try). My feeling that is that this is a bug in the OS, but I thought I'd throw this out to the SO crowd for a second opinion and to see if there are any workarounds. Any ideas? Following benzado's suggestion, I tried building my application using the 2.0, 2.1 and 2.2 SDKs. I got the same behaviour in all versions. (Actually, something related but not the same broke in 2.2 but that's probably another question!)

    Read the article

  • LinearLayout not expanding inside a ScrollView

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

    Read the article

  • Removing white space inside quotes in XSLT

    - by fudgey
    I'm trying to format a table from XML. Lets say I have this line in the XML <country>Dominican Republic</country> I would like to get my table to look like this <td class="country DominicanRepublic">Dominican Republic</td> I've tried this: <td class="country {country}"><xsl:value-of select="country"/></td> then this: <xsl:element name="td"> <xsl:attribute name="class"> <xsl:text>country </xsl:text> <xsl:value-of select="normalize-space(country)"/> </xsl:attribute> <xsl:value-of select="country"/> </xsl:element> The normalize-space() doesn't remove the space between the two parts of the name and I can't use <xsl:strip-space elements="country"/> because I need the space when I display the name inside the table cell. How can I strip the space from the value inside the class, but not the text in the cell?

    Read the article

  • Rolling comments inside a log4net file

    - by Maestro1024
    Rolling comments inside a log4net file Is it possible to roll the data inside the log file? So I have an xml config file like <log4net> <appender name="LogFileAppender" type="log4net.Appender.RollingFileAppender"> <layout type="log4net.Layout.PatternLayout"> <ConversionPattern value="%d{yyyy-MM-dd hh:mm:ss} – %-5p: %m%n" /> </layout> <param name="File" value="c:\log.txt" /> <param name="AppendToFile" value="true" /> <rollingStyle value="Size" /> <maxSizeRollBackups value="1" /> <maximumFileSize value="5MB" /> <staticLogFileName value="false" /> </appender> <root> <level value="DEBUG" /> <appender-ref ref="LogFileAppender" /> </root> </log4net> What I want is to have a 5MB file that when it gets to the end will pull off the first line of the file and then add a new line at the end. Is that possible (I do not see it in the documentation)?

    Read the article

  • Invalid security validation exception inside a SharePoint workflow

    - by Dan Revell
    I'm having a strange security problem with a SharePoint workflow. Particular calls seem to result in the following exception: Microsoft.SharePoint.SPException: The security validation for this page is invalid. I've come across this error before and the simple fix is web.AllowUnsafeUpdates = true; ... web.AllowUnsafeUpdates = false; However I've never once encountered this problem inside a workflow before since a workflow runs as system. I first got this error in a code activity where I set the value of a column on the list item. Wrapping the item.Update in AllowUnsafeUpdates fixed it. After the code activity I have a CreateTask activity. This also causes the same error but only after running the code inside the activity's MethodInvoking. In both cases there's a SPListItem.UpdateItem involved within the stack trace. This call is failing a security check. I don't know anything about how this check works so I don't know where to look next. This is a strange one, because this SharePoint dev machine has been working fine for some time. No other projects or workflows exhibit this behaviour so that rules out an installation problem. There's just something about this particular workflow. [UPDATE] I've gotten around the issue by just creating a new project and building it up again. I still have the broken one and I'd still like to figure out the problem with it. I'd appreciate any suggestions of what it might be.

    Read the article

  • Loops inside loops

    - by cozzy
    Hi, I'd like to find easier way to write loops inside loops. Here is example code of 3 levels of 'for' loops: int level = 0; int value = 0; bool next = false; for (int i0 = 0; i0 < 6; i0++) { level = 0; value = i0; method(); if (next) for (int i1 = 0; i1 < 6; i1++) { level = 1; value = i1; method(); if (next) for (int i2 = 0; i2 < 6; i2++) { level = 2; value = i2; method(); if (next) { //Do somethnig } } } } private void method() { //use int 'level' and 'value' //determine bool 'next' } I wonder if it's possible to write the same thing different way. To set number of levels(number of loops) and loop repeats. In this case levels = 3; repeats = 6;. I need it because I am using more than 20 loops inside themselves and than the code is not comprehensible. I hope my explanation was ok and thanks for help.

    Read the article

  • WPF DataGrid inside Accordion height issue

    - by LucasS
    I am using the latest WPF Toolkit but am running into a height issue when I have a large record set bound into a datagrid inside an AccordionItem item. The height of the Accordion itself scales nicely but the datagrid inside the accordion control doesn't get get a scrollbar or get constrained in any way so the records are hidden. I know that I am most probably missing something very simple (like a binding from the datagrid's height property to the Accordion but that seems messy) here is a cut down version of the code (and yes, this has the same problem if you bind in a big recordset) ... </layouttoolkit:AccordionItem> <layouttoolkit:AccordionItem Header="grid 2"> <dg:DataGrid AutoGenerateColumns="False" CanUserAddRows="False" CanUserDeleteRows="False" SelectionMode="Single"> ... </dg:DataGrid.Columns> </dg:DataGrid> </layouttoolkit:AccordionItem> <layouttoolkit:AccordionItem Header="grid 3"> <dg:DataGrid AutoGenerateColumns="False" CanUserAddRows="False" CanUserDeleteRows="False" SelectionMode="Single"> ... </dg:DataGrid.Columns> </dg:DataGrid> </layouttoolkit:AccordionItem> </layouttoolkit:Accordion> </UserControl>

    Read the article

  • How to perform two-way data binding of controls in a user control inside a FormView

    - by Sandor Drieënhuizen
    I'm trying to perform two-way data binding on the controls in my user control, which is hosted inside a FormView template. FormView: <asp:ObjectDataSource runat="server" ID="ObjectDataSource" TypeName="WebApplication1.Data" SelectMethod="GetItem" UpdateMethod="UpdateItem"> </asp:ObjectDataSource> <asp:FormView runat="server" ID="FormView" DataSourceID="ObjectDataSource"> <ItemTemplate> <uc:WebUserControl1 runat="server"></uc:WebUserControl1> </ItemTemplate> <EditItemTemplate> <uc:WebUserControl1 runat="server"></uc:WebUserControl1> </EditItemTemplate> </asp:FormView> User control: <%@ Control Language="C#" ... %> <asp:TextBox runat="server" ID="TitleTextBox" Text='<%# Bind("Title") %>'> </asp:TextBox> The binding works fine when the FormView is in View mode but when I switch to Edit mode, upon calling UpdateItem on the FormView, the bindings are lost. I know this because the FormView tries to call an update method on the ObjectDataSource that does not have an argument called 'Title'. I tried to solve this by implementing IBindableTemplate to load the controls that are inside my user control, directly into the templates (just like I had entered them declaratively like in the code above). However, when calling UpdateItem in edit mode, the container that gets passed into the ExtractValues method of the template, does not contain the TextBox anymore. It did in view mode! I have found some questions on SO that relate to this problem but they are rather dated and they don't provide any answers that helped me solve this problem. How do you think I could solve this problem? It seems to be such a simple requirement but apparently it's more like opening a can of worms...

    Read the article

  • Calling server side method as filling value inside a textbox from calendar extender

    - by Dharmendra Singh
    I have a text box which i m filling of date from the calendar extender and the code is as below:- <label for="input-one" class="float"><strong>Date</strong></label><br /> <asp:TextBox ID="txtDate" runat="server" CssClass="inp-text" Enabled="false" AutoPostBack="true" Width="300px" ontextchanged="txtDate_TextChanged"></asp:TextBox> <asp:ImageButton ID="btnDate2" runat="server" AlternateText="cal2" ImageUrl="~/App_Themes/Images/icon_calendar.jpg" style="margin-top:auto;" CausesValidation="false" onclick="btnDate2_Click" /> <ajaxToolkit:CalendarExtender ID="calExtender2" runat="server" Format="dddd, MMMM dd, yyyy" OnClientDateSelectionChanged="CheckDateEalier" PopupButtonID="btnDate2" TargetControlID="txtDate" /> <asp:RequiredFieldValidator ID="RequiredFieldValidator7" runat="server" ControlToValidate="txtDate" ErrorMessage="Select a Date" Font-Bold="True" Font-Size="X-Small" ForeColor="Red"></asp:RequiredFieldValidator><br /> Javascript code is :- function CheckDateEalier(sender, args) { sender._textbox.set_Value(sender._selectedDate.format(sender._format)) } My requirement is that as the date is entered in to the textbox, I want to call this method: public void TimeSpentDisplay() { string date = txtDate.Text.ToString(); DateTime dateparsed = DateTime.ParseExact(date, "dddd, MMMM dd, yyyy", null); DateTime currentDate = System.DateTime.Now; if (dateparsed.Date > currentDate.Date) { divtimeSpent.Visible = true; } if (dateparsed.Date < currentDate.Date) { divtimeSpent.Visible = true; } if (dateparsed.Date == currentDate.Date) { divtimeSpent.Visible = false; } } Please help me that how i achieve this as i m calling this method inside txtDate_TextChanged method but the event is not firing as the text is changed inside the textbox. Please suggest how I can achieve this or give me an alternate idea to fulfill my requirement.

    Read the article

  • Accessing class member variables inside a BackgroundWorker's DoWork event handler, and other Backgro

    - by Justin
    Question 1 In the DoWork event handler of a BackgroundWorker, is it safe to access (for both reading and writing) member variables of the class that contains the BackgroundWorker? Is it safe to access other variables that are not declared inside the DoWork event handler itself? Obviously DoWork should not be accessing any UI objects of, say, a WinForms application, as the UI should only be updated from the UI thread. But what about accessing other (not UI-related) member variables? The reason why I ask is that I've seen the occasional comment come up while Googling saying that accessing member variables is not allowed. The only example I can find at the moment is a comment on this MSDN page, which says: Note, that the BGW can cause exceptions if it attempts to access or modify class level variables. All data must be passed to it by delegates and events. And also: NEVER. NEVER. Never try to reference variables not declared inside of DoWork. It may seem to work at times, but in reality you are just getting lucky. As far as I know, MSDN itself does not document any restrictions of this kind (although if I'm wrong, I'd appreciate a link). But comments like these do seem to pop up every now and again. (Of course if DoWork does access/modify a member variable that could be accessed/modified by the main thread at the same time, it is necessary to synchronise access to that field, eg by using a locking object. But the above quotes seem to require a blanket ban of accessing member variables, rather than just synchronising access!) Question 2 To make this into a more general question, are there any other (not documented?) restrictions that users of the BackgroundWorker should be aware of, aside from the above? Any "best practices", perhaps?

    Read the article

  • Loading one page inside another

    - by Robin I Knight
    User 'Citizen' provided an answer to the iframe situation with the ajax script from dynamic drive. As I predicted it although it loads one page inside another it does not work with the calculation scripts, collapsible panels, validation form. All of it simply not working. I have set up a test page that has the exact same HEAD section as the page that is loaded inside it, so it is not s problem of script location. Take a look and see if you can tell me what is going on. Baring in mind this is just a test page. On the test page the entire page is loaded from another and as you can see all the collapsible panels are open, all calculations except the duration are not working because another file that is loaded by ajax on the original page is not loading in this one, the accordion menu us not working and the validation form is not validating. It is as if all script triggers have been removed and left behind but like I said the HEAD section of the parent page contains all of the scripts as well. Any ideas http://www.divethegap.com/scuba-diving-programmes-dive-the-gap/programme-pages/dahab-divemaster/test.php

    Read the article

  • Two-way data binding of controls in a user control inside a FormView

    - by Sandor Drieënhuizen
    I'm trying to perform two-way data binding on the controls in my user control, which is hosted inside a FormView template. FormView: <asp:ObjectDataSource runat="server" ID="ObjectDataSource" TypeName="WebApplication1.Data" SelectMethod="GetItem" UpdateMethod="UpdateItem"> </asp:ObjectDataSource> <asp:FormView runat="server" ID="FormView"> <ItemTemplate> <uc:WebUserControl1 runat="server"></uc:WebUserControl1> </ItemTemplate> <EditItemTemplate> <uc:WebUserControl1 runat="server"></uc:WebUserControl1> </EditItemTemplate> </asp:FormView> User control: <%@ Control Language="C#" ... %> <asp:TextBox runat="server" ID="TitleTextBox" Text='<%# Bind("Title") %>'> </asp:TextBox> The binding works fine when the FormView is in View mode but when I switch to Edit mode, upon calling UpdateItem on the FormView, the bindings are lost. I know this because the FormView tries to call an update method on the ObjectDataSource that does not have an argument called 'Title'. I tried to solve this by implementing IBindableTemplate to load the controls that are inside my user control, directly into the templates (just like I had entered them declaratively like in the code above). However, when calling UpdateItem in edit mode, the container that gets passed into the ExtractValues method of the template, does not contain the TextBox anymore. It did in view mode! I have found some questions on SO that relate to this problem but they are rather dated and don't provide straight forward answers. How do you think I could solve this problem? It seems to be such a simple requirement but apparently it's more like opening a can of worms...

    Read the article

  • ASP.NET MVC.NET JQueryUI datepicker inside a div loaded/updated with ajax.actionlink

    - by ArjanW
    Im trying to incorporate jqueryUI's datepicker inside a partialview like this: <% using (Ajax.BeginForm("/EditData", new AjaxOptions { HttpMethod = "POST", UpdateTargetId = "div1" })) {%> Date: <%= Html.TextBox("date", String.Format("{0:g}", Model.date), new { id = "datePicker"})%> <% } %> <script type="text/javascript"> $(function() { $("#datePicker").datepicker(); }); </script> when i directly call the url to this partial view, so it renders only this view the datepicker works perfectly. (for the purpose of testing this i added the needed jquerry and jquerryui script and css references directly to the partial view) But if i use a Ajax.Actionlink to load this partial view inside a div (called div2, submitting the above form should update div1) like this: <div id="div1"> <%= Ajax.ActionLink("Edit", "/EditData", new { id = Model.id }, new AjaxOptions { HttpMethod = "GET", UpdateTargetId = "div2" } )%> </div> <div2>placeholder for the form</div> the datepicker wont apear anymore. My best guess is the javascript included in the loaded html doesnt get executed, ($(document).ready(function() { $("#datepicker").datepicker(); }); doesnt work either if that's the case how and where should i call the $("datepicker").datepicker(); ? (putting it in the ajaxoptions of the ajax.actionlink as oncomplete = "$(function() { $('#datepicker').datepicker();});" still doesnt work. if thats not the case, then where's my problem?

    Read the article

  • How to change font color inside nav element?

    - by user2924752
    I have a element and I want to change the color of the links within it, but all other links on my page are styled using the following CSS: a:link { color:#22b14c; text-decoration:none; } and here is the nav: <nav id="Nav"> <a href="index.html">Home</a> | <a href="Gallery.html">Library</a> | <a href="Contact.html">Contact</a> | <a href="About.html">About</a> </nav> and the nav css: #Nav { margin-top: 20px; background-color: #000000; color: #f2f2f2; font-size: 40px; font-family: "Calibri"; text-align: center; } I tried a span inside the nav element but that didn't work. How can I change the color for these links only inside the element?

    Read the article

  • jQuery Character Counter Inside Newly Created Tooltip

    - by Dodinas
    Hello all, I'm having a difficult time figuring this one out. I'm attempting to have a user open a tooltip (using jQuery qTip). What this does is create a "new" tooltip element on the page; it takes it from an existing hidden HTML div on the webpage. Once this new tooltip is created, it has a character counter that is supposed to dynamically update as the user types in the textbox (which is inside the tooltip). The "Max Length Character Counter" script can be found here. However, the "counter" portion is not working inside the newly created tooltip. Any ideas how I can bind this max length character counter to the tooltip? Here's what I'm working with so far: function load_qtip(apply_qtip_to) { $(apply_qtip_to).each(function(){ $(this).qtip({ content: $(".tooltip-contents"), //this is a DIV in the HTML show: 'click', hide: 'unfocus' }); }); } $(document).ready(function() { load_qtip(".tooltip"); $('.my_textbox').maxlength({ 'feedback' : '.my_counter' }); }); And here's what the HTML basically looks like (remember, though, this entire div is "replicated" into a new tooltip): <div class="tooltip_contents"> <form> <div class="my_counter" id="counter">55</div> <textarea class="my_textbox" maxlength="55" id="textbox"></textarea> <input type="button" value="Submit"> </form> </div> Any direction/suggestions on this would be great, as I am completely lost. Thanks very much!

    Read the article

  • ASP.NET dropdownlist callback doesn't work inside div

    - by Wayne Werner
    This seems super weird to me. I have a callback handler done in VB which works fine with this code: <!-- Div Outside Form --> <div class="container"> <form id="querydata" runat="server"> <asp:DropDownList runat="server" ID="myddl" AutoPostBack="true" OnSelectedIndexChanged="myddlhandler"> <asp:ListItem>Hello</asp:ListItem> <asp:ListItem>Goodbye</asp:ListItem> </asp:DropDownList> <asp:Label runat="server" ID="label1"></asp:Label> </form> </div> <!-- Yep, they're matching --> I can change the value and everything is A-OK, but if I change the code to this (div inside form): <form id="querydata" runat="server"> <!-- Div inside form doesn't work :( --> <div class="container"> <asp:DropDownList runat="server" ID="myddl" AutoPostBack="true" OnSelectedIndexChanged="myddlhandler"> <asp:ListItem>Hello</asp:ListItem> <asp:ListItem>Goodbye</asp:ListItem> </asp:DropDownList> <asp:Label runat="server" ID="label1"></asp:Label> </div> </form> It the postback no longer works. Is how asp is supposed to work? Or is it some magic error that only works for me? And most importantly, if asp is not supposed to work this way, how should I be doing this? Thanks!

    Read the article

  • Encapsulate update method inside of object or have method which accepts an object to update

    - by Tom
    Hi, I actually have 2 questions related to each other: I have an object (class) called, say MyClass which holds data from my database. Currently I have a list of these objects ( List < MyClass ) that resides in a singleton in a "communal area". I feel it's easier to manage the data this way and I fail to see how passing a class around from object to object is beneficial over a singleton (I would be happy if someone can tell me why). Anyway, the data may change in the database from outside my program and so I have to update the data every so often. To update the list of the MyClass I have a method called say, Update, written in another class which accepts a list of MyClass. This updates all the instances of MyClass in the list. However would it be better instead to encapulate the Update() method inside the MyClass object, so instead I would say foreach(MyClass obj in MyClassList) { obj.update(); } What is a better implementation and why? The update method requires a XML reader. I have written an XML reader class which is basically a wrapper over the standard XML reader the language natively provides which provides application specific data collection. Should the XML reader class be in anyway in the "inheritance path" of the MyClass object - the MyClass objects inherits from the XML reader because it uses a few methods. I can't see why it should. I don't like the idea of declaring an instance of the XML Reader class inside of MyClass and an MyClass object is meant to be a simple "record" from the database and I feel giving it loads of methods, other object instances is a bit messy. Perhaps my XML reader class should be static but C#'s native XMLReader isn't static.? Any comments would be greatly appreciated Thanks Thomas

    Read the article

  • Why are references compacted inside Perl lists?

    - by parkan
    Putting a precompiled regex inside two different hashes referenced in a list: my @list = (); my $regex = qr/ABC/; push @list, { 'one' => $regex }; push @list, { 'two' => $regex }; use Data::Dumper; print Dumper(\@list); I'd expect: $VAR1 = [ { 'one' => qr/(?-xism:ABC)/ }, { 'two' => qr/(?-xism:ABC)/ } ]; But instead we get a circular reference: $VAR1 = [ { 'one' => qr/(?-xism:ABC)/ }, { 'two' => $VAR1->[0]{'one'} } ]; This will happen with indefinitely nested hash references and shallowly copied $regex. I'm assuming the basic reason is that precompiled regexes are actually references, and references inside the same list structure are compacted as an optimization (\$scalar behaves the same way). I don't entirely see the utility of doing this (presumably a reference to a reference has the same memory footprint), but maybe there's a reason based on the internal representation Is this the correct behavior? Can I stop it from happening? Aside from probably making GC more difficult, these circular structures create pretty serious headaches. For example, iterating over a list of queries that may sometimes contain the same regular expression will crash the MongoDB driver with a nasty segfault (see https://rt.cpan.org/Public/Bug/Display.html?id=58500)

    Read the article

  • Kindle Fire Cant Fit My Webpage inside a Webview of specific size

    - by Madhavan Rangarao
    This is baffling to me. Please help, I could not figure it out ... In my sample html file I have set the meta tag to be <meta name="viewport" content="target-densitydpi=device-dpi, user-scalable=no"> to fit the webpage inside my webview of custom size say 800x600. In Android, I had to specify "target-densitydpi=device-dpi" and it did the job nicely. I tested my custom web page with nexus 7 tablet and the web page fits inside my web view correctly. The same code does not work in Kindle Fire. Only a part of my web page is shown and even if I set the 'initial-scale=1.0' did not help. I tried various settings programmatically but it did not help either. webview.getSettings().setBuiltInZoomControls(true); webview.getSettings().setSupportZoom(true); webview.getSettings().setLoadWithOverviewMode(true); webview.setInitialScale(1); webview.getSettings().setUseWideViewPort(true); Any pointers?

    Read the article

  • 960 GridSystem, three grid_4 inside one grid_12

    - by Olle
    I've created a 16 column layout with 960gs with a div class="grid_12" and after that a grid_4 (12+4...) Inside that grid_12 I wanted a three column style (3 grid_4). But the grid_4 boxes don't fit inside the grid_12, the last box drop into a second row. Shouldn't the 960gs framework be able to do this layout for me, have i missed anything? Thanks in advance. <div class="container_16"> ... <div id="main" class="grid_12"> <div class="grid_12"> <div class="grid_4"></div> <div class="grid_4"></div> <div class="grid_4"></div> </div> <div id="right" class="grid_4"> </div> </div> ... </div>

    Read the article

< Previous Page | 15 16 17 18 19 20 21 22 23 24 25 26  | Next Page >