Search Results

Search found 33613 results on 1345 pages for 'html lists'.

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

  • clean html a string by element id using php

    - by user327140
    Hi, as you can see by the subject am looking for a tool for cleaning up a HTML string in php using a HTML id property, example: According to the following PHP string I wish to clean the HTML erasing the black11 $test = ' <div id="block1"> <div id="block11">Hello1 <span>more html here...</span></div> <div id="block12">Hello2 <span>more html here...</span></div> </div> <div id="block2"></div> '; Will became $test = ' <div id="block1"> <div id="block12">Hello2 <span>more html here...</span></div> </div> <div id="block2"></div> '; I already tried the tool from htmlpurifier.org and can't get the desirable result. Only thing I achieved was removing elements by tag; erasing id; erasing class. Is there any simple way to achieve this using purifier or other? Thanks in advance,

    Read the article

  • Read HTML file into email

    - by cast01
    Ive written a script to send html emails and all works well. I have the email stored in a separate HTML file which is then read in usin a while loop and fgets(). However, i want to be able to pass variables into the html. For example, in a html file i may have something like.. <body> Dear Name <br/> Thank you for your recent purhcase </body> and i read this into a string like so $file = fopen($filename, "r"); while(!feof($file)) { $html.= fgets($file, 4096); } fclose ($file); I want to be able to replace "Name" in the html file by a variable and im not entirely sure on the best way to do this. I could always make my own tag and then use regex to replace that with the name once ive read the file into the string, but im wondering if there is a better/easier method to do this. (On a side note, if anyone knows whether its better to use file_get_contents instead of multiple calls to fgets, id be interested to know)

    Read the article

  • How can I convert HTML to pdf?

    - by Walkman
    I want to read and annotate internet articles like books on my iPad so I would like to convert HTML to PDF. Is there a way of doing this that preserves every font as is can make PDF out of selection handle javascript source code highlighting libraries well doesn't add anything (ads from shareware or logos etc) to every page I will be happy with any solution applicable to iPad or OSX. I have tried some converters I have found online but none fit the criteria above.

    Read the article

  • HTML notes in freemind

    - by asdf
    Hi, I wonder if the following things can be done with the HTML notes pane of freemind: Is it possible on the layout view to decrease the separation between lines? The panel is horizontal, is it possible to setup a vertical view? (I have a big, horizontal-like monitor) By the way, when I move the mouse pointer over a node, i can see the HTLM note associated with it, but its view (as a yellow square) only lasts for some seconds. Can it be made permament? Thanks a lot

    Read the article

  • Looking for tex to html converter

    - by Stephen
    I need to convert a very large latex project (made up of many .tex and style files) into .html (or something similarly non-.pdf). Can someone recommend a quality converter program? Preferably, one that is: available on linux (specifically Ubuntu) actively maintained Thanks!

    Read the article

  • Problem to generate nested ul lists using PHP

    - by Michael Mao
    Hi all: I am working on a front-end web app where a nested unordered list would be used for the jQuery plugin mcdropdown. Here is the data structure from PHP: a nested array of arrays : Array ( [0] => Array ( [fullpath] => ../foil/alphanumeric/ [depth] => 0 ) [1] => Array ( [fullpath] => ../foil/alphanumeric/letters/ [depth] => 1 ) [2] => Array ( [fullpath] => ../foil/alphanumeric/numbers/ [depth] => 1 ) [3] => Array ( [fullpath] => ../foil/alphanumeric/numbers/symbols/ [depth] => 2 ) ) Basically, I took the excellent answer from this question on SO, modified it a bit : global $fullpaths; // $fullpaths contains the above data structure in print_r $result = ''; $currentDepth = -1; while(!empty($fullpaths)) { $currentNode = array_shift($fullpaths); if($currentNode['depth'] > $currentDepth) { $result .='<ul>'; } if($currentNode['depth'] < $currentDepth) { $result .=str_repeat('</ul>', $currentDepth - $currentNode['depth']); } $result .= '<li>'. $currentNode['fullpath'] .'</li>'; $currentDepth = $currentNode['depth']; if(empty($fullpaths)) { $result .= str_repeat('</ul>', 1 + $currentDepth); } } print $result; and got the following output: <ul> <li>../foil/alphanumeric/</li> <ul> <li>../foil/alphanumeric/letters/</li> <li>../foil/alphanumeric/numbers/</li> <ul> <li>../foil/alphanumeric/numbers/symbols/</li> </ul> </ul> </ul> Which cannot be accepted by the mcdropdown jQuery plugin, it expects something like this: <li rel="1"> 'Alphanumeric' <ul> <li rel="2">'Letters'</li> <li rel="3">'Numbers' <ul> <li rel="4">'Symbols'</li> </ul> </li> </ul> </li> To be frank, I don't quite understand how the answer from that question works, I have been trying to modify that solution to cope with my situation, but still failed. Any help and suggestion is much appropriated in advance.

    Read the article

  • Good HTML CSS JS editor for iPad ?

    - by xiamx
    I want to be able to edit HTML CSS and JS on my iPad. I noticed that there are a few applications in AppStore that does that. But I'm not sure which to use. I need grammar highlight, tag autocompletation and preview. Please suggest one.

    Read the article

  • ajax html vs xml/json responses - perfomance or other reasons

    - by pedalpete
    I've got a fairly ajax heavy site and some 3k html formatted pages are inserted into the DOM from ajax requests. What I have been doing is taking the html responses and just inserting the whole thing using jQuery. My other option is to output in xml (or possibly json) and then parse the document and insert it into the page. I've noticed it seems that most larger site do things the json/xml way. Google Mail returns xml rather than formatted html. Is this due to performance? or is there another reason to use xml/json vs just retrieving html? From a javascript standpoint, it would seem injecting direct html is simplest. In jQuery I just do this jQuery.ajax({ type: "POST", url: "getpage.php", data: requestData, success: function(response){ jQuery('div#putItHear').html(response); } with an xml/json response I would have to do jQuery.ajax({ type: "POST", url: "getpage.php", data: requestData, success: function(xml){ $("message",xml).each(function(id) { message = $("message",xml).get(id); $("#messagewindow").prepend(""+$("author",message).text()+ ": "+$("text",message).text()+ ""); }); } }); clearly not as efficient from a code standpoint, and I can't expect that it is better browser performance, so why do things the second way?

    Read the article

  • Can I include a robots meta tag outside of the head in HTML snippets indeded to be SSIed?

    - by Dan
    I have a number of files in my site which are not intended for independent viewing, but rather to be AJAXed into content within the site. They obviously don't meet HTML standards (no body, head, etc.) as independent entities. I would like to prevent search engines from indexing these pages, but do not have access to /robots.txt (which would be much more ideal). My question is, could I include the following at the top of these partial HTML files and get the desired results? <meta name="robots" content="noindex, noarchive"> I guess there are two parts to this question. Will this cause any rendering issues in any browsers? Will search engines (at least Google & Bing) interpret this as intended?

    Read the article

  • Edit HTML template on Blogger website

    - by HKK
    This is a question about the website www.blogger.com. I am trying to modify my active template like this: I want to add a github ribbon to my template page, like the ones seen here: https://github.com/blog/273-github-ribbons I have tried pasting in the templates in the head tag and in the body tag, but in both cases I get error messages like this from the blogger site: Is it possible to add such a ribbon to a blogger site by editing the template html, and in that case, where is the correct place to paste in the code snippet?

    Read the article

  • How to convert a really big HTML file to PDF in Windows

    - by PeterStrange
    We have a few really large HTML files (60-100 MB) that we cannot convert to PDF with any reliability. Adobe Acrobat 9 crashes - hits the 2GB limit for applications. Open Office converts, but removes some of the anchors (). ActivePDF webgrabber crashes. Is using a 64 bit situation an option for this type of thing? I see a bunch of options out there, but can they do better than Adobe Acrobat 9 itself?

    Read the article

  • How do I remove HTML that I place dynamically with JQuery

    - by Vivek
    lets say i have fallowing html... <li><a href="#" id='DataSheets' >Data Sheets</a><font class="leftNavHitsFont">- (1)</font></li> <li><a href="#" id='ApplicationNotes' >Application Notes</a><fontclass="leftNavHitsFont">- (6)</font></li> what i want to do is, add a html on onclick of these links, if you click on first link output should look like <li><span>ajksdfskaj</span></li> <li><a href="#" id='ApplicationNotes' >Application Notes</a><fontclass="leftNavHitsFont">- (6)</font></li> means hide the original html of that li and append new html for ex. a span as i have written above...and if i clicked on second link the first li should get it's original html and appended html should get removed and get appended to current li bieng clicked..in this case output should look like... <li><a href="#" id='DataSheets' >Data Sheets</a><font class="leftNavHitsFont">- (1)</font></li> <li><span>ajksdfskaj</span></li> i tried to achieve this thing through variuos way...but could not find out the correct way.. please help me out guys.. Thanks in advance!!!!

    Read the article

  • Is it practical to have perfect validation score on HTML?

    - by Truth
    I was in a heated discussion the other day, about whether or not it's practical to have a perfect validation score on any HTML document. By practical I mean: Does not take a ridiculous amount of time compared to it's almost-perfect counterpart. Can be made to look good on older browsers and to be usable on very old browsers. Justifies the effort it may take to do so (does it come with some kind of reward on SEO/Usability/Accessibility that cannot be achieved in a simpler way with almost-perfect validation) So basically, is perfect validation score practical on any HTML document?

    Read the article

  • Do I have to learn html and javascript to create web applications?

    - by vainolo
    I am an experienced Java programmer, and I want to create a complex web application requiring dynamic pages, drawings, etc (take SO as an example). Do I have to learn javascript/html in order to create such an application? It is not that I don't want to learn another language (I've done this before), but technology on the javascript environment seems to change so fast that when you finish learning one framework it is already obsolete. I have checked a number of java framework for web development (spring, play), but not deeply. So can these frameworks (or other possible java frameworks that I'm not aware of) be used without learning html/javascript? I also have some python experience. So if I can do the app in python it is also an option.

    Read the article

  • chrome extension: get specific part of the current tab page in DOM object and display it in either popup.html or new html page?

    - by sandeep
    IS there any way so that i can convert any DOM object into HTML page within the script ? suppose I have dom object like this: content script.js chrome.extension.onRequest.addListener(function(request, sender, sendResponse) { if (request.method == "fromPopup") { console.log("got Request from Popup"); var myDivObj = document.getElementById("definition"); //sendResponse({data: "from Content Script to Popup"}); if ( myDivObj ) { sendResponse({data:myDivObj}); } else{ sendResponse({data:"Empty or No Tag"}); } console.log("sent Response1"); } else { sendResponse({}); // snub them. console.log("sent Response2"); } }); here is my popup.html <body> <Div>Searching..</Div> <Div id="output">Response??</Div> <script> console.log("Pop UP Clicked"); chrome.tabs.getSelected(null, function(tab) { chrome.tabs.sendRequest(tab.id, {method: "fromPopup", tabid: tab.id}, function(response) { console.log("got Response from Content Script"); document.getElementById("output").innerHTML=response.data; }); }); </script> </body> I know we can send onaly JSON type of data to the popup.html page.. am i right ? If yes is ther any way that I can creat HTML page with DOM Object( myDivObj ) which I collected.. Any alternative solution..? In short i want get only specific part of the current tab page in DOM object and display it in either popup.html or separate html page..

    Read the article

  • How to wrap Ruby strings in HTML tags

    - by Jason H.
    Hi all: I'm looking for help on two things. 1) I'm looking for a way for Ruby to wrap strings in HTML. I have a program I'm writing that generates a Hash of word frequencies for a text file and I want to take the results and place it into an HTML file rather than print to STDOUT. I'm thinking each string needs to be wrapped in an HTML paragraph tag using readlines() or something, but I can't quite figure it out. Then, once I've wrapped the strings in HTML 2) I want to write to an empty HTML file. Right now my program looks like: filename = File.new(ARGV[0]).read().downcase().scan(/[\w']+/) frequency = Hash.new(0) words.each { |word| frequency[word] +=1 } frequency.sort_by { |x,y| y }.reverse().each{ |w,f| puts "#{f}, #{w}" } So if we ran a text file through this and received: 35, the 27, of 20, to 16, in # . . . I'd want to export to an HTML file that wraps the lines like: <p>35, the</p> <p>27, of</p> <p>20, to</p> <p>16, in</p> # . . . Thanks for any tips in advance!

    Read the article

  • Left floated element and unordered lists (ul).

    - by superUntitled
    Hello, I am trying to indent the li elements of a ul. There is a left floated div with an image in it. The li element will indent only if I add left padding that is wider than the image itself. I you would like to look at a version irl, take a look. On this page, I have given the li a background color to demonstrate. <div class="left"> <p ><img src='image.jpg' alt='homepage.jpg' width="360" height="395" /></p> </div> <p> Est tincidunt doming iis nobis nibh. Ullamcorper eorum elit lius me delenit. </p> <hr /> <h3>Lorem</h3> <ul> <li>list element</li> <li>list element</li> <li>list element</li> </ul> The css: .left {float: left; } .left img {padding-right: 20px;} ul li { padding-left: 10px; background: blue; } thanks!

    Read the article

  • html in do_GET() method of a simple Python webserver

    - by Meeri_Peeri
    I am relatively new to Python but have been doing a lot of different things with it recently and I am liking it a lot. However, I ran into trouble/block with the following code. import http.server import socketserver import glob import random class Server(http.server.SimpleHTTPRequestHandler): def do_GET(self): self.send_response(200, 'OK') self.send_header('Content-type', 'html') self.end_headers() self.wfile.write(bytes("<html> <head><title> Hello World </title> </head> <body>", 'UTF-8')) images = glob.glob('*.jpg') rand = random.randint(0,len(images)-1) imagestring = "<img src = \"" + images[rand] + "\" height = 1028 width = 786 align = \"right\"/> </body> </html>" self.wfile.write(bytes(imagestring, 'UTF-8')) def serve_forever(port): socketserver.TCPServer(('', port), Server).serve_forever() if __name__ == "__main__": Server.serve_forever(8000) What I am trying to do here is grab a random image from multiple images in the directory and add it into the response to a web request. The code works fine but when I access the server via browser, the image is not displayed. The html of the page is as intended though. The permissions on the files are 755. Also I tried to create an index.html file in the do_GET method. That didn't work either. I mean the index.html was generated fine, but the response in the browser this time did not show anything (not even the hello world in the title). Am I missing anything very simple here? I was thinking should I overload the handle_request of the underlying SocketServer.BaseServer as the documentation says you should never override BaseHTTPServer's handle() method and should rather override the corresponding do_* method?

    Read the article

  • Moving checkmarks in checkbox lists after page reload - Firefox only

    - by DaveS
    I'm getting some strange behavior in Firefox whenever I put checkboxes inside a list (ol, ul, dl), and then dynamically insert buttons above the list. If I start with a something simple list like this: <dl class="c"> <dt><label for="a1"><input type="checkbox" id="a1" />one</label></dt> <dt><label for="a2"><input type="checkbox" id="a2" />two</label></dt> <dt><label for="a3"><input type="checkbox" id="a3" />three</label></dt> </dl> and add some jQuery like this: $(document).ready(function(){ var a = $('<button type="button">a</button>'); var b = $('<button type="button">b</button>'); $('<div/>').append(a).append(b).insertBefore($('.c')); }); ...then open it in Firefox, it looks fine at first. But check the first checkbox, reload the page, and the check-mark jumps to the second box. Reload again, and it jumps to the third. Reload yet again, and no checkboxes are left checked. If I leave out one of the buttons by dropping one of the append calls, it's fine. If I change the buttons to divs or something similar, it's fine. If I replace the dl tag with a div (and get rid of the dt tags), it's fine. But I need both buttons, and the checkboxes have to be in a list for what I'm trying to build. Does anybody know what's causing this?

    Read the article

  • Do I need to echo html inside included php file

    - by UmeRonaldo
    I just learned how to include php .Here's the index or main php file <!DOCTYPE HTML> <html> <head> </head> <body> <?php include 'header.php'; ?> </body> </html> now in header.php file which way is better to print html Way 1 directly use html without php <header> <h1>Header</h1> </header> Way 2 Using php and echo <?php echo ' <header> <h1>Header</h1> </header> ' ?> Another quick question. Will it work if I use .html for the base or index file ?? sorry for my bad english

    Read the article

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