Search Results

Search found 30478 results on 1220 pages for 'html embed'.

Page 6/1220 | < Previous Page | 2 3 4 5 6 7 8 9 10 11 12 13  | Next Page >

  • How to tell the Browser the character encoding of a HTML website regardless of Server Content.-Type Headers?

    - by hakre
    I have a HTML page that correctly (the encoding of the physical on disk matches it) announces it's Content-Type: <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <meta http-equiv="Content-Type" content= "text/html; charset=utf-8"> <title> ... Opening the file from disk in browser (Google Chrome, Firefox) works fine. Requesting it via HTTP, the webserver sends a different Content-Type header: $ curl -I http:/example.com/file.html HTTP/1.1 200 OK Date: Fri, 19 Oct 2012 10:57:13 GMT ... Content-Type: text/html; charset=ISO-8859-1 (see last line). The browser then uses ISO-8859-1 to display which is an unwanted result. Is there a common way to override the server headers send to the browser from within the HTML document?

    Read the article

  • CSS and HTML incoherences when declaring multiple classes

    - by Cesco
    I'm learning CSS "seriously" for the first time, but I found the way you deal with multiple CSS classes in CSS and HTML quite incoherent. For example I learned that if I want to declare multiple CSS classes with a common style applied to them, I have to write: .style1, .style2, .style3 { color: red; } Then, if I have to declare an HTML tag that has multiple classes applied to it, I have to write: <div class="style1 style2 style3"></div> And I'm asking why? From my personal point of view it would be more coherent if both could be declared by using a comma to separate each class, or if both could be declared using a space; after all IMHO we're still talking about multiple classes, in both CSS and HTML. I think that it would make more sense if I could write this to declare a div with multiple classes applied: <div class="style1, style2, style3"></div> Am I'm missing something important? Could you explain me if there's a valid reason behind these two different syntaxes?

    Read the article

  • Using JavaScript for basic HTML layout

    - by Slobaum
    I've been doing HTML layout as well as programming for many years and I'm seeing a growing issue recently. Folks who primarily do HTML layout are becoming increasingly more comfortable using JavaScript to solve basic page layout problems. Rather than consider what HTML is capable of doing (to hit their target browsers), they're slapping on bloated JS frameworks that "fix" fairly basic problems. Let's get this out of the way right here: I find this practice annoying and often inconsiderate of those with special accessibility needs. Unfortunately, when you try to tell these folks that what they're doing isn't semantic, ideal, or possibly even a good idea, they always counter with the same old arguments: "JavaScript has a market saturation of 98%, we don't care about the other 2%." or "Who doesn't have JavaScript enabled these days?" or simply "We don't care about those users." I find that remarkably short-sighted. I would really like the opinion of the community at large. What do you think, am I holding too fast to a dying ideal? I am willing to accept that, but would like to be given good arguments as to why I should disregard 2%+ of my user base (among others). Is JavaScript's prevalence a good excuse to use a programmatic language to do basic layout, thus mucking up your behavior and layout? jQuery and similar "behavior" based frameworks are blurring the lines, especially for those who don't realize the difference. Honestly (and probably most importantly), I would like some "argument ammo" to use against these folks when the "it's the right way to do it" argument is unacceptable. Can you cite sources outlining your stance, please? Thanks everybody, please be civil :)

    Read the article

  • Does JAXP natively parse HTML?

    - by ikmac
    So, I whip up a quick test case in Java 7 to grab a couple of elements from random URIs, and see if the built-in parsing stuff will do what I need. Here's the basic setup (with exception handling etc omitted): DocumentBuilderFactory dbfac = DocumentBuilderFactory.newInstance(); DocumentBuilder dbuild = dbfac.newDocumentBuilder(); Document doc = dbuild.parse("uri-goes-here"); With no error handler installed, the parse method throws exceptions on fatal parse errors. When getting the standard Apache 2.2 directory index page from a local server: a SAXParseException with the message White spaces are required between publicId and systemId. The doctype looks ok to me, whitespace and all. When getting a page off a Drupal 7 generated site, it never finishes. The parse method seems to hang. No exceptions thrown, never returns. When getting http://www.oracle.com, a SAXParseException with the message The element type "meta" must be terminated by the matching end-tag "</meta>". So it would appear that the default setup I've used here doesn't handle HTML, only strictly written XML. My question is: can JAXP be used out-of-the-box from openJDK 7 to parse HTML from the wild (without insane gesticulations), or am I better off looking for an HTML 5 parser? PS this is for something I may not open-source, so licensing is also an issue :(

    Read the article

  • Duplicating someone's content legitimately & writing HTML to support that

    - by Codecraft
    I want to add content from other blogs to my own (with the authors permission) to help build additional relevant content and support articles I've found useful that others have written. I'm looking into how to do this responsibly - ie, by giving the original content author a boost and not competing against them for search traffic which should go to their site. In order to keep my duplicate content out of search, and to hint to the search engines where the original content is to be found i've implemented: <head> <meta name='robots' content='noindex, follow'> <link rel='canonical' href='http://www.originalblog.com/original-post.html' /> </head> Additionally, to boost the original article and to let readers know where it came from i'll be adding something like this: <div> Article originally written by <a href='http://www.authorswebsite.com'>Authors Name</a> and reproduced with permission.<br/> <a href='http://www.originalblog.com/original-post.html' target='new'> Read the original article here. </a> </div> All that remains is a way to 'officially' credit the original author in the HTML for the search spiders to see. Can anyone tell me a way to do this possibly using rel="author" (as far as I can see thats only good for my own original content), or perhaps it doesn't matter given that the reproduced pages will be kept out of search engines? Also, have I overlooked anything in the approach?

    Read the article

  • How to use HTML Agility pack

    - by chh
    I want to know how to use the HTML Agility Pack as I am totally new to it. My XHTML document is not completely valid. Thats why i wanted to use it. Can any one tell me how to use it in my project? My project is in C#.

    Read the article

  • Best way to layout in HTML forms?

    - by Jen
    I want to display an HTML form containing labelled text fields, like this: First Name: [_____________] Last Name: [_____________] Date of Birth: [________] My obvious approach is to use a <TABLE> and simply place the labels and text fields in its cells, but is there a better way, e.g. a CSS-based approach?

    Read the article

  • Which is more Efficient HTML DOM or JQuery

    - by Quasar the space thing
    I am trying to add new Elements in an HTML page body by using document.createElement via Javascript, I am doing this with few if/else case and function callings. All is working fine. Recently I came to know that I can do this with JQuery, too. I have not done too much of coding yet so I was wondering which way is the best in terms of efficiency ? Using native DOM methods or using JQuery to add elements dynamically on the page?

    Read the article

  • Retrieving well formed HTML using Jericho HTML parser in Java

    - by Raj
    Hello, I've looked at jTidy for converting a snipped of malformed/real-world HTML into well-formed HTML/XHTML. However, there's a bug in the latest version due to which I'm not able to use it. I'm looking at Jericho since it has a lot of positive reviews around the net. However, its not immediately obvious to me how one would go about implementing a method like: public String getValidHTML(String messedUpHTML) For instance, if it was passed <div>bar, it would return <div>bar</div> Any pointers would be helpful. Thanks in advance!

    Read the article

  • php email html link, but just showing up as html code

    - by Idealflip
    Hi everyone, I'm trying to e-mail a html table, that has links within it. But when I receive the e-mail, it just shows me the html code itself. I'm using PHP pear to send the email. I try constructing a string like so $body = "<table>"; $body = $body . "<tr><td><a href='http://google.ca'>Google</a></td></tr>"; $body = $body . "</table>"; then e-mailing it, but when I receive the e-mail, it comes like this <table><tr><td><a href='http://google.ca'>Google</a></td></tr></table> Any suggestions? Thanks!

    Read the article

  • Html Agility Pack: DescendantsOrSelf() not returning HTML element

    - by Program.X
    I have some HTML, eg: <%@ Page Title="About Us" Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true" CodeBehind="ContentManagedTargetPage.aspx.cs" Inherits="xxx.ContentManagedTargetPage" %> <%@ Register TagPrefix="CxCMS" Namespace="xxx.ContentManagement.ASPNET.UI" Assembly="xxx.ContentManagement.ASPNET" %> <asp:Content ID="HeaderContent" runat="server" ContentPlaceHolderID="HeadContent"> </asp:Content> <asp:Content ID="BodyContent" runat="server" ContentPlaceHolderID="MainContent"> <h2> Content Managed </h2> <p> Put content here. [<CxCMS:ContentManagedPlaceHolder Key="keyThingy" runat="server" />] </p> </asp:Content> And I want to find all the instances of the CxCMS:ContentManagedPlaceHolder element. I'm using HTML Agility Pack, which seems the best fit. However, despite looking at the [meagre] documentation, I can't get my code to work. I would expect the following to work: string searchForElement = "CxCMS:ContentManagedPlaceHolder"; IEnumerable<HtmlNode> contentPlaceHolderHtmlNodes = HtmlDocument.DocumentNode.Descendants(searchForElement); int count = contentPlaceHolderHtmlNodes.Count(); But I get nothing back. If I change to DescendantsOrSelf, I get the document node back, "#document" - which is incorrect: string searchForElement = "CxCMS:ContentManagedPlaceHolder"; IEnumerable<HtmlNode> contentPlaceHolderHtmlNodes = HtmlDocument.DocumentNode.DescendantsOrSelf(searchForElement); int count = contentPlaceHolderHtmlNodes.Count(); I also tried using LINQ: string searchForElement = "CxCMS:ContentManagedPlaceHolder"; IEnumerable<HtmlNode> contentPlaceHolderHtmlNodes = HtmlDocument.DocumentNode.DescendantsOrSelf().Where(q=>q.Name==searchForElement); int count = contentPlaceHolderHtmlNodes.Count(); As neither of these methods work, I moved onto using SelectNodes, instead: string searchForElement = "CxCMS:ContentManagedPlaceHolder"; string xPath="//"+searchForElement // "//CxCMS:ContentManagedPlaceHolder" var nodes= HtmlDocument.DocumentNode.SelectNodes(xPath); This just throws the exception: "Namespace Manager or XsltContext needed. This query has a prefix, variable, or user-defined function.". I can't find any way of adding namespace management to the HtmlDocument object. What am I missing, here? The DescendantsOrSelf() method works if using a "standard" HTML tag, such as "p", but not the one I have. Surely it should work? (It needs to!)

    Read the article

  • how to use php, html, css togther in a html template [closed]

    - by pandu
    I work with conversion of a html template in to PHP, normally i code like this <div id="test"> <?php echo "<p>hello world</p>"; ?> </div> <?php for($i=0;$i<=8;$i++){ echo "<ul>"; echo "<li>link1"; echo "<li>link2"; echo "</ul>"; } ?> Suggest an easy way to use html tags in php code, other than using a template system, Also tell me how to use for, foreach loop, if else, along with html,CSS tags

    Read the article

  • Things you can draw with HTML tables

    - by Coronatus
    So I was watching a talk by Google's Marissa Mayer about speeding up Google's pages. They found that a shopping cart icon increased load time by 2%, and users then searched 2% less. They managed to replace the icon with an HTML table. Here is my attempt at drawing a shopping cart: (live example page) <html> <head> <style> table {border-collapse: collapse;} th, td {width: 8px; height: 8px;} th {background-color: blue;} td {background-color: white;} </style> </head> <body> <table> <!-- this row is just to see alignment --> <tr> <td></td><td></td><td></td><td></td><td></td> <td></td><td></td><td></td><td></td><td></td> <td></td><td></td><td></td><td></td><td></td> <td></td><td></td><td></td><td></td><td></td> </tr> <!-- handle --> <tr> <td colspan="14"></td> <th colspan="3"></th> <td colspan="3"></td> </tr> <tr> <td colspan="13"></td> <th colspan="2"></th> <td colspan="1"></td> <th colspan="2"></th> <td colspan="2"></td> </tr> <tr> <td colspan="13"></td> <th colspan="2"></th> <td colspan="1"></td> <th colspan="2"></th> <td colspan="2"></td> </tr> <tr> <td colspan="14"></td> <th colspan="3"></th> <td colspan="3"></td> </tr> <!-- main body --> <tr> <td colspan="5"></td> <th colspan="13"></th> <td colspan="2"></td> </tr> <tr> <td colspan="5"></td> <th colspan="1"></th> <td colspan="1"></td> <th colspan="1"></th> <td colspan="1"></td> <th colspan="1"></th> <td colspan="1"></td> <th colspan="1"></th> <td colspan="1"></td> <th colspan="1"></th> <td colspan="1"></td> <th colspan="1"></th> <td colspan="1"></td> <th colspan="1"></th> <td colspan="2"></td> </tr> <tr> <td colspan="5"></td> <th colspan="1"></th> <th colspan="1"></th> <td colspan="1"></td> <th colspan="1"></th> <td colspan="1"></td> <th colspan="1"></th> <td colspan="1"></td> <th colspan="1"></th> <td colspan="1"></td> <th colspan="1"></th> <td colspan="1"></td> <th colspan="1"></th> <th colspan="1"></th> <td colspan="3"></td> </tr> <tr> <td colspan="5"></td> <th colspan="1"></th> <td colspan="1"></td> <th colspan="1"></th> <td colspan="1"></td> <th colspan="1"></th> <td colspan="1"></td> <th colspan="1"></th> <td colspan="1"></td> <th colspan="1"></th> <td colspan="1"></td> <th colspan="1"></th> <td colspan="1"></td> <th colspan="1"></th> <td colspan="2"></td> </tr> <tr> <td colspan="5"></td> <th colspan="1"></th> <th colspan="1"></th> <td colspan="1"></td> <th colspan="1"></th> <td colspan="1"></td> <th colspan="1"></th> <td colspan="1"></td> <th colspan="1"></th> <td colspan="1"></td> <th colspan="1"></th> <td colspan="1"></td> <th colspan="1"></th> <th colspan="1"></th> <td colspan="3"></td> </tr> <tr> <td colspan="5"></td> <th colspan="1"></th> <td colspan="1"></td> <th colspan="1"></th> <td colspan="1"></td> <th colspan="1"></th> <td colspan="1"></td> <th colspan="1"></th> <td colspan="1"></td> <th colspan="1"></th> <td colspan="1"></td> <th colspan="1"></th> <td colspan="1"></td> <th colspan="1"></th> <td colspan="2"></td> </tr> <tr> <td colspan="5"></td> <th colspan="1"></th> <th colspan="1"></th> <td colspan="1"></td> <th colspan="1"></th> <td colspan="1"></td> <th colspan="1"></th> <td colspan="1"></td> <th colspan="1"></th> <td colspan="1"></td> <th colspan="1"></th> <td colspan="1"></td> <th colspan="1"></th> <th colspan="1"></th> <td colspan="3"></td> </tr> <tr> <td colspan="5"></td> <th colspan="1"></th> <td colspan="1"></td> <th colspan="1"></th> <td colspan="1"></td> <th colspan="1"></th> <td colspan="1"></td> <th colspan="1"></th> <td colspan="1"></td> <th colspan="1"></th> <td colspan="1"></td> <th colspan="1"></th> <td colspan="1"></td> <th colspan="1"></th> <td colspan="2"></td> </tr> <tr> <td colspan="5"></td> <th colspan="1"></th> <th colspan="1"></th> <td colspan="1"></td> <th colspan="1"></th> <td colspan="1"></td> <th colspan="1"></th> <td colspan="1"></td> <th colspan="1"></th> <td colspan="1"></td> <th colspan="1"></th> <td colspan="1"></td> <th colspan="1"></th> <th colspan="1"></th> <td colspan="3"></td> </tr> <tr> <td colspan="5"></td> <th colspan="13"></th> <td colspan="2"></td> </tr> <!-- wheels --> <tr> <td colspan="7"></td> <th colspan="2"></th> <td colspan="4"></td> <th colspan="2"></th> <td colspan="5"></td> </tr> <tr> <td colspan="6"></td> <th colspan="4"></th> <td colspan="2"></td> <th colspan="4"></th> <td colspan="4"></td> </tr> <tr> <td colspan="7"></td> <th colspan="2"></th> <td colspan="4"></td> <th colspan="2"></th> <td colspan="5"></td> </tr> </table> </body> </html> What can you draw in tables?! Impress us.

    Read the article

  • Html Agility Pack get all elements by class

    - by Adam
    I am taking a stab at html agility pack and having trouble finding the right way to go about this. For example: var findclasses = _doc.DocumentNode.Descendants("div").Where(d => d.Attributes.Contains("class")); However, obviously you can add classes to a lot more then divs so I tried this.. var allLinksWithDivAndClass = _doc.DocumentNode.SelectNodes("//*[@class=\"float\"]"); But that doesn't handle the cases where you add multiple classes and "float" is just one of them like this.. class="className float anotherclassName" Is there a way to handle all of this? I basically want to select all nodes that have a class = and contains float.

    Read the article

  • How to use htaccess to rewrite url to html anchor tag (#)

    - by Lee L
    Hi - I have a situation where I want to take the following URL: /1/john and have it redirect using Apache's htaccess file to go to /page.php?id=1&name=john#john so that it goes to an html anchor with the name of john. I've found a lot of reference to escaping special characters, and to adding the [NE] flag so that the redirect ignores the # sign, but these don't work. For example, adding [NE,R] means that the URL just appears in the browser address as the original: http://mysite.com/page.php?id=1&name=john#john. Any help would be appreciated.

    Read the article

  • Extracting pure content / text from HTML Pages by excluding navigation and chrome content

    - by Ankur Gupta
    Hi, I am crawling news websites and want to extract News Title, News Abstract (First Paragraph), etc I plugged into the webkit parser code to easily navigate webpage as a tree. To eliminate navigation and other non news content I take the text version of the article (minus the html tags, webkit provides api for the same). Then I run the diff algorithm comparing various article's text from same website this results in similar text being eliminated. This gives me content minus the common navigation content etc. Despite the above approach I am still getting quite some junk in my final text. This results in incorrect News Abstract being extracted. The error rate is 5 in 10 article i.e. 50%. Error as in Can you Suggest an alternative strategy for extraction of pure content, Would/Can learning Natural Language rocessing help in extracting correct abstract from these articles ? How would you approach the above problem ?. Are these any research papers on the same ?. Regards Ankur Gupta

    Read the article

  • Is there a way to construct HTML/CSS in an HTML email such that if image X does not load, text Y will appear?

    - by wide_eyed_pupil
    I'm looking for something a little more sophisticated than the alt="Newsletter Heading text" attribute of <img> tag. So if the Masthead.png image doesn't load for whatever reason, I want the display text, say Font: 60px Helvetica Neue Black, Helvetica, ..., Sans Serif text-align: center to appear in the middle of the table cell that is my masthead instead of just the alt text in some small default font in top right corner. One idea I had was to use to put the image on-top of the text display but I don't know if z-depth is something I can use in email HTML(?4)?

    Read the article

  • Creating Zend_Form elements from row html

    - by P.M
    Hi there, I am having an issue with Zend_Form and your help will be appreciated. in fact I have a class to generate categories as options $categories = My_Util_Category::toHtmlSelect();//for simplicity I removed other lines this code generates <select> <option > root</option> <option> root / children</option> </select> On another hand, I use Zend_Form form to edit categories. The code looks like: $form = My_Form_Category( $data, $selectElements = array() ); which outputs a form, text field, a select box for parent categories and a submit button. How can I get 'select element' from $form, and replace it with row html 'select' generated with $categories any help, or link will be appreciated. Thanks.

    Read the article

  • Javascript/iframe/embed/object question

    - by thinkfuture
    OK, so here is my issue. I'm building a system which will allow people to embed lists of links on their pages. When the link is clicked, i'd like to use something like Lightview or Lightwindow to open it up over the whole window, not just in the iframe. I don't have access to the page that the user will be embedding this object into. Everything I've tried so far tells me that I can't open anything over the parent window, since I don't have access to it from the iframe or object, javacript security issue. However, I've seen sites that do that kind of overlay. so it must be possible. If anyone can point me to any resources that could help, that would be great. if it matters, i'm using Ruby on Rails... Thanks...chris

    Read the article

  • How to Embed/Link binary data into a C++ DLL

    - by CrimsonX
    So I have a Visual Studio 2008 project which has a large amount of binary data that it is currently referencing. I would like to package the binary data much like you can do with C# by adding it as a "resource" and compiling it as a DLL. Lets say all my data has an extension of ".data" and is currently being read from the visual studio project. Is there a way that you can compile or link the data into the .dll which it is calling? I've looked at some of the google link for this and so far I haven't come up with anything - the only possible solution I've come up with is to use something like ResGen to create a .resources file and then link it using AssemblyLinker with /Embed or /Link flags. I dont think it'd work properly though because I dont have text files to create the .resources files, but rather binary files themselves. Any advice?

    Read the article

  • Embed form in another website - pitfalls

    - by Paddy
    Scenario: We provide a hosted site that clients pay to use internally (a tool to support their business workflow). We have a requirement to provide a form that the clients can 'embed' in their outward facing site. This form will permit a member of the public to enter some details to register an interest - this data will be pushed to our remote system. Question: I'm currently planning on creating a simple HTML page that the client's web guys can include in a simple fashion on their site (either using an iframe or an object tag). If I do this, am I going to run into difficulties when the user tries to submit the embedded form (as it will be going to different domain to the one they are currently browsing)? I had a look at google adsense and I see that they just provide a link to a JS file that renders their ads - I'm not sure I see the advantage in this, but if anybody has any bright ideas... Whatever technique that gets used, I'll have to authenticate the request as coming from my client's site(s).

    Read the article

  • Seperating Javascript and Html, when dynamically adding html via javascript

    - by optician
    I am currently building a very dynamic table for a list application, which will basically perform basic CRUD functions via AJAX. What I would like to do is separate the visual design and javascript to the point where I can change the design side without touching the JS side. This would only work where the design stays roughly the same(i would like to use it for rapid protyping) Here is an example. <table> <tr><td>record-123</td><td>I am line 123</td><td>delete row</td></tr> <tr><td>record-124</td><td>I am line 124</td><td>delete row</td></tr> <tr><td>record-125</td><td>I am line 125</td><td>delete row</td></tr> <tr><td>add new record</td></tr> </table> Now, when I add a new record, I would like to insert a new row of html, but I would rather not put this html into the javascript file. What I am considering is creating a row like this on the page, near the table. <tr style='visble:none;' id='template-row'><td>record-id</td><td>content-area</td><td>delete row</td></tr> And when I come to add the new row, I search the page for the tags with the id=template-row , and then grab it, do a string replace on it, and then put it in the right place in the page. As long as the design doesn't shift radically, and I keep the placeholder strings the same, it means designs can be quickly modified without touching the js. Can any give any advice on a methodology like this?

    Read the article

  • MVC/HTML - input submit won't trigger when HTML is in a text area

    - by cw
    Any idea why the below code doesn't trigger if I were to put some HTML inside the textarea? It works fine it I don't have HTML in it, but I'm not sure why it doesn't work with it. Here is the code. <form action="/Home/AddPost" method="post"> <table> <tr> <td>Post Title:</td> <td><input id="Title" type="text" name="title" /></td> </tr> <tr> <td>Post Description:</td> <td><textarea id="Description" rows="10" cols="60" name="description"></textarea></td> </tr> </table> <input type="submit" value="Save" /> </form>

    Read the article

< Previous Page | 2 3 4 5 6 7 8 9 10 11 12 13  | Next Page >