Search Results

Search found 1919 results on 77 pages for 'semantic markup'.

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

  • WPF: Custom control that binds its content to a label

    - by nialsh
    I want to write a custom control that's used like this: <HorizontalTick>Some string</HorizontalTick> It should render like this: -- Some string ------------------------------------------- Here's my code: <UserControl x:Class="WeatherDownloadDisplay.View.HorizontalTick" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" mc:Ignorable="d" d:DesignWidth="348" Name="controlRoot"> <DockPanel LastChildFill="True"> <UserControl VerticalAlignment="Center" BorderBrush="Black" BorderThickness="1" Width="10"/> <Label Content="???" /> <UserControl VerticalAlignment="Center" BorderBrush="Black" BorderThickness="1"/> </DockPanel> It works except for the label binding. Can someone help me fill in the question marks? I thought about using a ContentPresenter but it seems like an inline binding would be best. -Neal

    Read the article

  • How can I get an element from within a frameset frame using JavaScript?

    - by Nick
    I need to access and element from within a frameset frame. For example if I have the following markup: <frameset rows="33%,33%,*"> <frame src="frame1.html"/> <frame src="frame2.html"/> <frame src="frame3.html"/> </frameset> How can I get some element from one of the child frames? I have tried this: window.frames[1].getElementById('someElementId') This results in a type error: getElementById() is not a function. Can someone assist? Thanks!

    Read the article

  • python [lxml] - cleaning out html tags

    - by sadhu_
    from lxml.html.clean import clean_html, Cleaner def clean(text): try: cleaner = Cleaner(scripts=True, embedded=True, meta=True, page_structure=True, links=True, style=True, remove_tags = ['a', 'li', 'td']) print (len(cleaner.clean_html(text))- len(text)) return cleaner.clean_html(text) except: print 'Error in clean_html' print sys.exc_info() return text I put together the above (ugly) code as my initial forays into python land. I'm trying to use lxml cleaner to clean out a couple of html pages, so in the end i am just left with the text and nothing else - but try as i might, the above doesnt appear to work as such, i'm still left with a substial amount of markup (and it doesnt appear to be broken html), and particularly links, which aren't getting removed, despite the args i use in remove_tags and links=True any idea whats going on, perhaps im barking up the wrong tree with lxml ? i thought this was the way to go with html parsing in python?

    Read the article

  • WPF: capturing XAML into subclassed control

    - by Sonic Soul
    hello, i narrowed down what i want my wpf button to look like using XAML. now i would like to create a sub classed button control that i can just re-use w/out having to write all that markup <Button Click="TestGridColumnButton_Click" Background="Transparent" Width="16" Height="16" Margin="0,0,0,0" Padding="0,0,0,0" BorderBrush="{x:Null}"> <Button.Template> <ControlTemplate> <Image HorizontalAlignment="Center" VerticalAlignment="Center" Style="{StaticResource SourceStyle}" /> </ControlTemplate> </Button.Template> </Button> how can i set all these properties using C# ?

    Read the article

  • databinding to self without code

    - by jcollum
    I'm building a UserControl in WPF. The control has two properties, Title and Description, that I'd like to bind to two textblocks. Seems real straightforward, and I got it working, but I'm curious about something. To get it to work I had to add this code: void CommandBlock_Loaded(object sender, RoutedEventArgs e) { this.DataContext = this; } My bindings look like this: <TextBlock Text="{Binding Title}" Width="100" ... /> <TextBlock Text="{Binding Description}" Width="100" ... /> What I'm wondering is how come I couldn't get it to work without the this.DataContext = this; and instead use DataContext="{Binding RelativeSource={RelativeSource Self}}" (in the UserControl element of the markup)? I'm sure I'm missing something about DataContexts but don't know what.

    Read the article

  • JQuery: Read each line of an element

    - by Sarfraz
    Hello, Suppose I have this html markup: <div id="wrapper"> $(function(){ // hide all links except for the first $('ul.child:not(:first)').hide(); $("a.slide:first").css("background-color","#FF9900"); $('ul.parent a.slide').click(function(){ $('ul.parent a.slide').css("background-color","#3399FF"); $('ul.parent a.slide').mouseout(function(){ $(this).css("background-color","#3399FF"); }); $('ul.parent a.slide').mouseover(function(){ $(this).css("background-color","#66CC66"); }); }); }); </div> What is the easiest way to read each line of code present in the div. How do I extract each line of code from that div or loop over each line styling in any way I want. Thanks

    Read the article

  • Request for another page from aspx site

    - by sanjuro
    Hi, it is possible to do a request for another page on internet from page_load? I mean if it is possible to aquire markup code with informations from another page and display them on my aspx site? For example something like this: protected void Page_Load(object sender, EventArgs e) { UnknownType anotherSite = GetMarkupCode("www.fifa.com"); //parse anotherSite . . . //display parsed informations . . . } If it is possible how can i do that? Many thanks for answers.

    Read the article

  • What are the latest options in Java logging frameworks?

    - by sanity
    This question gets asked periodically, but I've long felt that existing Java logging frameworks were overcomplicated and over-engineered, and I want to see what's new. I have a more critical issue on my current project as we've standardized on JSON as our human-readable data encoding, and most logging frameworks I've seen require XML. I would really rather avoid using JSON for 95% of my apps configuration, and XML for the rest just because of the logging framework (truth be told, I hate XML used for anything other than text markup, its original intended purpose). Are there any hot new Java logging frameworks that are actively maintained, reasonably powerful, have a maven repo, can be reconfigured without restarting your app, and don't tie you to XML?

    Read the article

  • FindControl() method throws ArithmeticException?

    - by Mark Struzinski
    I have a line of C# in my ASP.NET code behind that looks like this: DropDownList ddlStates = (DropDownList)fvAccountSummary.FindControl("ddlStates"); The DropDownList control is explicitly declared in the markup on the page, not dynamically created. It is inside of a FormView control. When my code hits this line, I am getting an ArithmeticException with the message "Value was either too large or too small for an Int32." This code has worked previously, and is in production right now. I fired up VS2008 to make some changes to the site, but before I changed anything, I got this exception from the page. Anyone seen this one before?

    Read the article

  • VS2010 - shortcuts for web controls and HTML snippets

    - by p.campbell
    Consider the feature in Visual Studio 2010 for snippets in the HTML Source view of a web page. type a control name in plaintext with no markup or brackets! ... e.g. hyperlink. Then hit Tab Your web control has been auto-completed for you. It's up to you to fill in the other details that you need. This works for form as well: <form action="default.aspx" method="post"> </form> This looks like a real time saver. This is supported in WebForms and ASP.NET MVC projects. What other snippets are available in Visual Studio 2010 in the Source view of a page?

    Read the article

  • big background without scrolls

    - by mkoso
    I have layout that has wider background picture than the content area. I have made 970ppx wrapper where the content is. And in body I have backgroud image but I need to have anothen background image above of tht body background image so I have made class bgimg. So basically the markup is like this: But the bgimg is about 1050px wide and thus it gives scrolls when users browser is 1024x768. Is there way of getting rid the scrolls? I mean I want to have have scrollbars if users browrser is narrower thant the 970x wrapper of course. So can I put something like overflow hidden for bgimg class? Hopefully you did understannd what I mean.

    Read the article

  • Post and Comment with the same Model.

    - by xRobot
    I have created a simple project where everyone can create one or more Blog. I want to use this models for Post and for Comment: class Post_comment(models.Model): content_type = models.ForeignKey(ContentType) object_id = models.PositiveIntegerField(_('object ID')) content_object = generic.GenericForeignKey() # Hierarchy Field parent = models.ForeignKey('self', null=True, blank=True, default=None, related_name='children') # User Field user = models.ForeignKey(User) # Date Fields date_submitted = models.DateTimeField(_('date/time submitted'), default = datetime.now) date_modified = models.DateTimeField(_('date/time modified'), default = datetime.now) title = models.CharField(_('title'), max_length=60, blank=True, null=True) post_comment = models.TextField(_('post_comment')) markup = models.IntegerField(choices=MARKUP_CHOICES, default=DEFAULT_MARKUP, null=True, blank=True) if it is a comment the parent is not null. So in most case the text field will contain a little bit of text. Can I use this model for both Post and Comment ?

    Read the article

  • NavigateUrl="#" becomes href="SubFolder/#"??

    - by jamietre
    This isn't exactly Fermat's last theorem, but it keeps coming back to annoy me like an unpaid phone bill from college. Sometimes I want to create a HyperLink that does not cause a postback, so I want the target url to be #. When the markup happens to be from a UserControl in a subfolder, / |- Home.aspx (uses UC.ascx) |- Sub |- UC.ascx the URL is rewritten with a relative path, e.g. <asp:HyperLink runat="server" NavigateUrl="#" >Click Me!</asp:HyperLink> becomes <a href="SubFolder/#">Click Me!</a> Which is, unfortunately, wrong. Obviously I can get around this by not using a server control, but it seems stupid. Can this be avoided? The point here is I will add a click event with jQuery or in code-behind, and I never want it to cause a postback, but I want it to be a hyperlink for CSS reasons.

    Read the article

  • Drupal Webform textfield dynamic growing list

    - by Bob Crowley
    Just curious... I have a project where people can input their cooking recipes. I would like to build a webform that will have a textfield and when it is filled in a new textfield appears below. A "growing textfield list". Let me try to show it here: Ingredient #1 _________________________________ [add] When you type and ingredient click "add" you then are going to see: Ingredient #1 Potatoes_________________________ Ingredient #2 _________________________________ [add] Sorry for not knowing the proper markup. However if anyone knows: a) the proper term for this ( I call a growing textfield list )? b) how to do it with webform in drupal?

    Read the article

  • How to aviod sapcing from the first div of each row

    - by sandeep
    I have DIVs which comes side by side of each other & but there only fourth DIV comes in the first row & other are shifted too the next row. I want each row first div take no space from left side but is not happened. Here is my code http://jsfiddle.net/25pwG/ I know i can do it with giving class manual to the new row DIV but i didn't want that. i want this with less css & i didn't want to change my markup NOTE: i want capability till IE8. Thanks in advance :)

    Read the article

  • NHibernate Queries with Values Produced by Business Logic

    - by Lewis
    I have an NH query which returns a Product with a BasePrice. Depending on various other factors, such as Manufacturer price markup, I use a PricingService on the C# side of things to produce a "final" price. The issue is that I now need to query against this final value - i.e., I need to run a query that selects Products within a particular "final" price range. I'm thinking that my approach to this is all wrong, but I really didn't want to put the logic of the final price calculation in a SQL function or something like that, so any suggestions would be appreciated.

    Read the article

  • innerHTML parse for Google Chrome?

    - by user554095
    Hey all. I am adding text to a textArea via Javascript in Chrome (doing it a totally different way in Firefox/IE as Chrome does not support contentWindows). Here is my code: document.getElementById("vB_Editor_001_textarea").value += '<font color="white"><b>' + numberLabel + ':</b> ' + armory + '</font><br/>'; This HTML is getting put directly into the textArea without being parsed. How can I make it parse into regular text with the HTML markup when it hits the textArea? Thanks!

    Read the article

  • jquery find child

    - by Sir Lojik
    hi all, ive got a jquery DOM traversing problem... i would like to get the first div (child) of li with id='wpc_pics2840' from the markup below. ie <div class="ui-btn-inner"> <li id="wpc_pics2840"> <div class="ui-btn-inner"> <div class="ui-btn-text"> <a href="#" class="ui-link-inherit"> <img width="40" height="40" src="http://www.veepiz.com/members/jimmydeantony/media/443_thumb.jpg" class="ui-li-thumb ui-corner-bl"> <div style="font-size:9pt;font-weight:normal;">upload a bigger picture....</div> </a> </div><span class="ui-icon ui-icon-arrow-r"></span></div></li> btw, please dont say something like $('.ui-btn-inner')... its got to be the first child div of element with id='wpc_pics2840'

    Read the article

  • How do I bind functions to all input elements using jQuery?

    - by bakkelun
    Hi, let's say I have this set of HTML-markup and CSS #CSS .inputhelp_text { background: #000; color: #fff; } .nodisplay { display: none; } <input class="inputhelp" id="firstname" /><span class="inputhelp_text nodisplay" id="help_firstname">Write in your firstname</span> <input class="inputhelp" id="lastname" /><span class="inputhelp_text nodisplay" id="help_lastname">Write in your lastname</span> Using jQuery, I need to bind a function to all input fields (I guess using jQuery's EACH function) so that when I click the input field, it should switch the class of each span to only "inputhelp_text". I've gotten this to work in two separate functions for each field, but since I have alot of fields, I know there's a better way to solve it. Any suggestions?

    Read the article

  • Why doesn't BlackBerry let me click on this link?

    - by Steve N
    This is a link in an HTML email.. Other links in this email work, but this one does not get recognized in a BlackBerry as a link, so you can't click on it. Does anyone know why that might be? Here's the markup for it: <a title="Continue" style="display: block; width:200px; border:1px solid #336699; text-align: center; padding-top:5px; padding-bottom:5px; font-size:14px; font-family: Arial, Sans-Serif; color:#336699; font-weight:bold; text-decoration: none;" href="https://www.mydomain.com/mypage.aspx?id=8430650">Continue ››</a>

    Read the article

  • prevent form from automatically re-submitting on page load

    - by user323774
    I am using jQuery to point a form's target to an iframe on .submit(). This is to upload a file. It works fine, but when the page reloads, and the iframe is appended to the DOM, the iframe automatically resubmits the form, causing the same file to be sent to the server on each page load. If I do not include the iframe in the HTML markup, or do not append it to the DOM, this doesn't happen, but of course, I need the iFrame. So my question is, how can i prevent this? :) Andrew

    Read the article

  • How good is the Rails sanitize() method?

    - by Horace Loeb
    Can I use ActionView::Helpers::SanitizeHelper#sanitize on user-entered text that I plan on showing to other users? E.g., will it properly handle all cases described on this site? Also, the documentation mentions: Please note that sanitizing user-provided text does not guarantee that the resulting markup is valid (conforming to a document type) or even well-formed. The output may still contain e.g. unescaped ’<’, ’’, ’&’ characters and confuse browsers. What's the best way to handle this? Pass the sanitized text through Hpricot before displaying?

    Read the article

  • jQuery hover() event on div element within a button element

    - by jakeisonline
    I can't seem to get jQuery to notice the div within the following markup <button class="button submit positive right" id="omnisubmit" type="submit"> <div class="label">Submit</div> <div class="controller">&nbsp;</div> </button> And here is the jQuery I'm currently using: $("button#omnisubmit div.controller").hover(function () { console.log("Hover..."); }); However, jQuery doesn't seem to pick up when the mouse is hovering over that div, $("button#omnisubmit div.controller").hover( works correctly, of course. I have a feeling it's because putting divs inside buttons may not be standard HTML?

    Read the article

  • How to make a div expand vertically to wrpa the content within it?

    - by MalcomTucker
    I have a div which wraps a number of images that are generated dynamically. I don't know how high the list of images is. My problem is the div that contains the dynamically generated images doesn't behave like it is housing any content - I want it to extend to the height of the list of images. Each image is itself wrapped in a div. This is the wrapper div: .block { padding:10px; margin-top:10px; height:auto; background-color:#f9f9f9; } This is the markup dynamically generated for (one of) the images: <div class="block"> <div style="float: left; padding: 2px 2px 2px 2px;"><IMG SRC="45.jpg" BORDER="0"/></div> ..... How do I get the block div to extend down with the images? Thanks

    Read the article

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