Search Results

Search found 31794 results on 1272 pages for 'html entities'.

Page 24/1272 | < Previous Page | 20 21 22 23 24 25 26 27 28 29 30 31  | Next Page >

  • Preserving indentation when inserting HTML from MySQL

    - by Benjamin
    I am using MySQL and PHP to populate parts of a site, often with HTML stored in a TEXT field. I like to keep my HTML indented so that the source is neat and easy to read, for example: <body> <div> <p>Blahblah</p> </div> </body> However, when the HTML is pulled from MySQL, I end up with: <body> <div> <p>Blahblahblah</p> </div> </body> This is quite ugly when there is a large amount of HTML being inserted into a DIV that is significantly indented. How can I stop this from happening? FYI, I use wordwrap() to keep each line from being too long.

    Read the article

  • How send html mail using linux command line

    - by Diesel Draft
    Hi, I need send mail with html format. I have only linux comand line and command "mail". Currently have used: echo "To: [email protected]" > /var/www/report.csv echo "Subject: Subject" >> /var/www/report.csv echo "Content-Type: text/html; charset=\"us-ascii\"" >> /var/www/report.csv echo "<html>" >> /var/www/report.csv mysql -u ***** -p***** -H -e "select * from users LIMIT 20" dev >> /var/www/report.csv echo "</html>" >> /var/www/report.csv mail -s "Built notification" [email protected] < /var/www/report.csv But in my mail-agent i get only plain/text.

    Read the article

  • Python and displaying HTML

    - by Tyler Seymour
    I've gotten pretty comfortable with Python and now I'm looking to make a rudimentary web application. I was somewhat scared of Django and the other Python frameworks so I went caveman on it and decided to generate the HTML myself using another Python script. Maybe this is how you do it anyways - but I'm just figuring this stuff out. I'm really looking for a tip-off on, well, what to do next. My Python script PRINTS the HTML (is this even correct? I need it to be on a webpage!), but now what? Thanks for your continued support during my learning process. One day I will post answers! -Tyler Here's my code: from SearchPhone import SearchPhone phones = ["Iphone 3", "Iphone 4", "Iphone 5","Galaxy s3", "Galaxy s2", "LG Lucid", "LG Esteem", "HTC One S", "Droid 4", "Droid RAZR MAXX", "HTC EVO", "Galaxy Nexus", "LG Optimus 2", "LG Ignite", "Galaxy Note", "HTC Amaze", "HTC Rezound", "HTC Vivid", "HTC Rhyme", "Motorola Photon", "Motorola Milestone", "myTouch slide", "HTC Status", "Droid 3", "HTC Evo 3d", "HTC Wildfire", "LG Optimus 3d", "HTC ThunderBolt", "Incredible 2", "Kyocera Echo", "Galaxy S 4g", "HTC Inspire", "LG Optimus 2x", "Samsung Gem", "HTC Evo Shift", "Nexus S", "LG Axis", "Droid 2", "G2", "Droid x", "Droid Incredible" ] print """<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>table of phones</title> </head> <body> </body> </html> """ #table print '<table width="100%" border="1">' for x in phones: y = SearchPhone(x) print "\t<tr>" print "\t\t<td>" + str(y[0]) + "</td>" print "\t\t<td>" + str(y[1]) + "</td>" print "\t\t<td>" + str(y[2]) + "</td>" print "\t\t<td>" + str(y[3]) + "</td>" print "\t\t<td>" + str(y[4]) + "</td>" print "\t</tr>" print "</table>

    Read the article

  • Best practice how to store HTML in a database column

    - by tbrandao
    I have an application that modifies a table dynamically, think spreadsheet), then upon saving the form (which the table is part of) ,I store that changed table (with user modifications) in a database column named html_Spreadhseet,along with the rest of the form data. right now I'm just storing the html in a plain text format with basic escaping of characters... I'm aware that this could be stored as a separate file, the source table (html_workseeet) already is. But from a data handling perspective its easier to save the changed html table to and from a column so as to avoid having to come up with a file management strategy (which folder will this live in, now must include folder in backups, security issues now need to apply to files, how to sync db security with file system etc.), so to minimize these issues I'm only storing the ... part in the database column. My question is should I gzip the HTML , maybe use JSON, or some other format to easily store and retrieve the HTML from the database column, what is the best practice to store HTML content in a datbase? Or just store it as I currently am as an escaped text column?

    Read the article

  • Call one html file from another

    - by Ankita
    I want to call one html page fron another in a div. I tried using <include file="NavigationTree.html" /> and <? include("/starfix/pages/NavigationTree.html"); ?> But it doesn't work. Am I doing something wrong or do i need to do it some other way?

    Read the article

  • Is it possible to split HTML using DOMDocument?

    - by Lynn Adrianna
    Using DOMDocument, is it possible to split a block of HTML by text wrapped in tags and those that are not, while maintaining the order? Sorry, if this doesn't make sense. My example should make it clear. Let's say I have the following block of HTML: text1<b style="color:pink">text2</b>text3<b>text4</b> <b style="font-weight:bold">text5</b> Is it possible create an array as such: array( [0] => text1 [1] => <b style="color:pink">text2</b> [2] => text3 [3] => <b>text4</b> [4] => [5] => <b style="font-weight:bold">text5</b> ) Below is my current working solution, which uses a regular expression, to split the HTML. $tokens = preg_split('/(<b\b[^>]*>.*?<\/b>)/i', $html, null, PREG_SPLIT_DELIM_CAPTURE); However, I always read that it is a bad idea to parse HTML using regular expressions, so was just wondering if there is a better way.

    Read the article

  • HTML tag for identifying text

    - by ravi
    I am not very much familiar with HTML programming. If we look at the source code of a page, then we can see what are the HTML tags for which texts and so. It is the case that there is group or class of HTML tags which is used for purpose such that it can be used for main text or so. I mean like '<\input type="radio" name="option"' this tag says that there will a radio button, similar can be make a group of HTML tags such that it consist of text part, which means we look at the tag and not at the content and can say that in between startTag and endTag we have text.

    Read the article

  • How to keep format within HTML converted to Excel

    - by pojomx
    Hello, I'm working with an HTML table, that contains numbers (formated) and when I export this to xls file (just change extension... hehe) I loss some of the formated data. Example: in html I have " 1,000.00 | 500.00 | 20.00 " and in excel it shows like: "1,000.00 | 500 | 20" I want it to know if it is possible to show the very same format as in html. THankyou :P

    Read the article

  • javascript inserting html code

    - by Marius
    Hello, I have a situation when there's a table and you can add a new row by clicking a button. The row is dynamically generated by a server and it is passed back in HTML. So basically what i need to do is prefix the new row to the old table. Something like this: tableelement.innerHTML = newHtml + tableelement.innerHTML; That surely works, but i have a table header and, obviously, i need to insert the new html after it. How would i do this? insertBefore or insertAfter can't help (afaik), because they're meant for inserting elements and not unparsed HTML. So how could i, having an object of the header's row, insert another row (in HTML) after it (or before) ? Thank you for your ideas

    Read the article

  • Create Extension Method to Produce Open & Closing Tags like Html.BeginForm()

    - by DaveDev
    Hi Guys I wonder if it's possible to create an extension method which has functionality & behaviour similar to Html.BeginForm(), in that it would generate a complete Html tag, and I could specificy its contents inside <% { & } %> tags. For example, I could have a view like: <% using(Html.BeginDiv("divId")) %> <% { %> <!-- Form content goes here --> <% } %> This capability would be very useful in the context of the functionality I'm trying to produce with the example in this question This would give me the ability to create containers for the types that I'll be <% var myType = new MyType(123, 234); %> <% var tag = new TagBuilder("div"); %> <% using(Html.BeginDiv<MyType>(myType, tag) %> <% { %> <!-- controls used for the configuration of MyType --> <!-- represented in the context of a HTML element, e.g.: --> <div class="MyType" prop1="123" prop2="234"> <!-- add a select here --> <!-- add a radio control here --> <!-- whatever, it represents elements in the context of their type --> </div> <% } %> I realise this will produce invalid XHTML, but I think there could be other benefits that outweigh this, especially since this project doesn't require that the XHTML validate to the W3C standards. Thanks Dave

    Read the article

  • html/php: how to handle absolute url's?

    - by YuriKolovsky
    Is the html tag safe to use in terms of browser support? Or should I generate a root path with PHP which i then add like this <a href="<?=BASE?>somepage.html">somepage</a> which makes up a absolute url. using the base tag like this <base href="<?=BASE?>" /> I am then able to use links like this <a href="somepage.html">somepage</a> now I am fully aware that it would be much easier to just do this without using the base tag: <a href="/somepage.html">somepage</a> but how do I test locally then with a base url of http://localhost/testsite/ ???

    Read the article

  • HTML reuse, create template

    - by nanonerd
    After about a year doing Asp.net web forms, I stepped out (for the most part) from the .net world. I'm now working on a webapp that uses a lot of client side scripting and uses WebAPI for data access. I have a HTML section that allows note taking. I would like to make this HTML section into a template that I can reuse elsewhere on the site (e.g., insert this piece of HTML code into another web page). I'm a bit befuddled on how to go about this. Think of my problem as trying to create a "user control" in asp.net web forms ... only that I am not using web forms. Just good old fashioned HTML, CSS, Javascript, jquery, and knockout. Conceptually, I'd think that others have been in the same spot as myself. Can anyone elaborate a solution or at least provide some pointers? Thanks !

    Read the article

  • Passing HTML form data in the URL on local machine (file://)

    - by atzz
    Hi, I'm building a small HTML/JS application for primary use on local machine (i.e. everything is accessed via file:// protocol, though maybe in the future it will be hosted on a server within intranet). I'm trying to make a form with method="get" and action="target.html", in the hope that the browser will put form data in the URL (like, file://<path>/target.html?param1=aaa&param2=bbb). However, it's not happening (target.html opens fine, but no parameters is passed). What am I doing wrong? Is it possible to use forms over file:// at all? I can always build the url manually (via JS), but being lazy I'd prefer the browser do it for me. ;) Here is my sample form: <form name='config' action="test_form.html" method="get" enctype="application/x-www-form-urlencoded"> <input type="text" name="param1"> <input type="text" name="param2"> <input type="submit" value="Go"> </form>

    Read the article

  • Getting information from servlet created html

    - by user541597
    I have a servlet that creates an html text box and then redirects to another servlet on submit. How can I access the value of the html text box from the new servlet? I am able to access servlet variables from the new servlet but I am not aware of how to access the value of the html generated code. thanks, Here is the servlet that gets the text input public class ServletB extends HttpServlet { public void doGet(HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException { response.setContentType("text/html"); String value = System.getProperty("card"); PrintWriter out = response.getWriter(); out.println("<center><h1>Your preffered method of payment is "+value+"</h1><br />"); out.println("Please Enter Card Number<input type =\"text\" name = \"number\"/><form action=\"http://codd.cs.gsu.edu:9999/cpereyra183/servlet/ServletC\"><input type =\"submit\" value=\"Continue\" /><input type=\"button\" value=\"Cancel\" /></center>"); } }} This is the servlet the first servlet redirects to all I do is try to do is output the text input public class ServletC extends HttpServlet { public void doGet(HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException { response.setContentType("text/html"); String value = System.getProperty("card"); PrintWriter out = response.getWriter(); out.println(request.getParameter("number")); } }

    Read the article

  • How to assign HTML value to a asp.net string variable

    - by Zerotoinfinite
    I am using asp.net and C#. I want to send mail to my user in HTML format, I have the content in HTML format let say like this <table style="width:100%;"> <tr> <td style="width:20%; background-color:Blue;"></td> <td style="width:80%; background-color:Green;"></td> </tr> </table> Now I am unable to assign this to a string variable, so that I could send it as a mail. Please let me know how can I bind this whole HTML content into a varibale. Also, please note that the above code is only a demo, I have around 100 lines of HTML code.

    Read the article

  • Include HTML file into Smarty .tpl file.

    - by Leonarth
    {if $loggedin} {literal} {include file="allhead.html"} {/literal} {else} {literal} {include file="allhead1.html"} {/literal} {/if} How do I include the code contained into an HTML file in a smarty .tpl file? I've tried different solutions on various forums, but none work.

    Read the article

  • HTML/CSS - No 100% height on div in IE

    - by Jordan Rynard
    Okay, so I've got a problem - and I'd love to have it fixed. I am using my favourite way of setting up a simple header/content/footer layout. The problem is that any elements I add to the 'content' div of my layout can not be expanded to 100% in Internet Explorer (as far as I know, IE only). I understand there is no height declared to the 'content' element, but because of the style of its positioning (declaring an absolute top AND bottom), the element fills the desired area. (The content element has a background color defined so you can see that the div is in fact filling between both the header and the footer.) So my problem is, since the div is clearly expanded between the two, why can't a child be set to 100% to fill that area? If anyone has any solutions, I'd love to hear them. (I'm looking for a solution that won't involve designing by an entire different layout.. or at least perhaps an explanation of why this is happening. I'm assuming at this point it's because of the lack of a height declaration -- but the div is expanded, so I don't get it!) You can view a page of the example here: http://www.elizabethlouter.com/html/index.html And here is the code as used on the page: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta name="robots" content="noindex" /> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>No 100% height on 'content' child div in IE</title> </head> <style> html, body { width:100%; height:100%; margin:0px; padding:0px; } body { position:relative; } #wrapper { position:absolute; top:0px; width:960px; height:100%; left:50%; margin-left:-480px; } #header{ position:absolute; top:0px; left:0px; width:100%; height:200px; background-color:#999; } #content{ position:absolute; top:100px; bottom:50px; left:0px; width:100%; background-color:#F7F7F7; } #content_1{ width:200px; background-color:black; height:100%; } #footer{ position:absolute; bottom:0px; left:0px; width:100%; height:50px; background-color:#999; } </style> <body> <div id="wrapper"> <div id="header"> </div> <div id="content"> <div id="content_1"> </div> </div> <div id="footer"> </div> </div> </body> </html>

    Read the article

  • How do i get this to work? [closed]

    - by user1867842
    This is my code.... it speaks for itself. <?php define("html","<html>"); define("htmlEnd","</html>"); etc... etc... ?> What i'm trying to do is make a wrapper for html's tags so they won't be needed anymore. But i can't get any of the attributes for html elements to be defined in php. This again speaks for itself... i don't know any other way of saying this... i guess how would i make a other mark up language like html without any tags but still keep everything about html is what i'm trying to say.....

    Read the article

  • li element background colors and overflow scrolling

    - by user17753
    I created a simple html source, and applied a small CSS style sheet to it: html { width: 100%; } body { font-family: Calibri, Tahoma, Geneva, sans-serif; padding: 20px; } pre { padding: 0; margin: 0 auto; border: 1px solid #888; font-family: Menlo,Monaco,Consolas,monospace; color: #000; width: 80%; overflow: auto; } pre li { white-space: pre; } ol { margin-top: 0; margin-bottom: 0; /* IE indents via margin-left */ color: #979797; background: #E3E3E3; } .li1 { background: #F5F5F5 } .li2 { background: #eee } I have an ordered list inside a pre-formatted tag. Every other list element is either given the class attribute li1 or li2 (the purpose of which is to alternate the colors). The list elements need the white-space: pre because the white space before and after the text node is important. The pre is to be 80% of the containing element (which ends up being 80% of the window's width). In the event of overflow in the x dimension, I want scrolling. I did all this in the above CSS, and it almost works. The issue I am having is that the background colors of the list elements don't extend with the content. They seem to be capped to the original width of the pre and/or ol element as demonstrated in the following picture where I scroll all the way right as possible: I tinkered with the CSS for a while, but I cannot determine the root cause for this or the fix. Looking for some advice on this one, thanks. Complete source with the issue is as below, NOTE: to would-be editors of the below code the pre element is intended to be on a single line as it's pre-formatted text, and formatting it otherwise would change things. <!DOCTYPE html> <html> <head> <meta http-equiv="content-type" content="text/html; charset=utf-8"> <title>Test Site</title> <style type="text/css"> html { width: 100%; } body { font-family: Calibri, Tahoma, Geneva, sans-serif; padding: 20px; } pre { padding: 0; margin: 0 auto; border: 1px solid #888; font-family: Menlo,Monaco,Consolas,monospace; color: #000; width: 80%; overflow: auto; } pre li { white-space: pre; } ol { margin-top: 0; margin-bottom: 0; /* IE indents via margin-left */ color: #979797; background: #E3E3E3; } .li1 { background: #F5F5F5 } .li2 { background: #eee } </style> </head> <body> <pre class="php"><ol><li class="li1">pre a &#123; text-decoration: none &#125;</li><li class="li2">pre a:hover &#123; background: #C8C8C8 }</li><li class="li1">pre li &#123; white-space: pre; &#125;</li><li class="li2">&nbsp;</li><li class="li1">.php ol &#123; margin-top: 0; margin-bottom: 0; /* IE indents via margin-left */</li><li class="li2"> color: #979797; background: #E3E3E3; }</li><li class="li1">&nbsp;</li><li class="li2">&nbsp;</li><li class="li1">&nbsp;</li><li class="li2">.php .li1 &#123; background: #F5F5F5 }</li><li class="li1">.php .li2 &#123; background: #eee }</li><li class="li2">&nbsp;</li><li class="li1">&nbsp;</li><li class="li2">.php .st0 &#123; color: #C0C } /* string content */</li><li class="li1">.php .st_h &#123; color: #F0C } /* string content single quoted */</li><li class="li2">.php .sy0 &#123; color: #000 } /* semi-colon, operators */ </li><li class="li1">.php .br0 &#123; color: #000 } /* parens */</li><li class="li2">.php .kw2 &#123; color: #00F } /* php tags */</li><li class="li1">.php .sy1 &#123; color: #00F } /* php tags */</li><li class="li2">.php .nu0 &#123; color: #F00 } /* numbers */</li><li class="li1">.php .kw3 &#123; color: #096 } /* core language functions */</li><li class="li2">.php .re0 &#123; color: #09F; font-weight: bold; } /* variables */</li><li class="li1">.php .kw1 &#123; color: #069; font-weight: bold; } /* control statements? */</li><li class="li2">.php .kw4 &#123; color: #069; font-weight: bold; } /* bool? */</li><li class="li1">.php .co1 &#123; color: #FF8400 } /* Forward slash comments */</li></ol></pre> </body> </html>

    Read the article

< Previous Page | 20 21 22 23 24 25 26 27 28 29 30 31  | Next Page >