Search Results

Search found 43671 results on 1747 pages for 'html form'.

Page 9/1747 | < Previous Page | 5 6 7 8 9 10 11 12 13 14 15 16  | Next Page >

  • 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

  • remove params from form request

    - by joe
    Hello folks, Upon user interaction, I need to remove certain input params from an HTML form before submission. Using javascript to remove the input fields from the DOM doesn't seem to actually remove the params from being sent through the request. Is there a way to delete or clear the actual request params?

    Read the article

  • HTML form to JSON without modern libraries

    - by Rok
    Does anyone know of a simple javascript library that serializes a form DOM object to JSON? I know jQuery has the serialize method but since I am writing an app for IE mobile, I can't use any of the new fancy libraries, must be oldschool simple javascript, as light as possible. Cheers

    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

  • HTML Form Upload PDF with other form contents using PHP

    - by Sev
    I have a HTML form with fields such as name, address, notes, etc. I also have a field to upload a PDF. The uploaded PDF get's stored on the file system. How can I accomplish this if possibly the PDF files are larger than 2 MBs? Also, for some reason, the uploading of the PDF (< 2 MBs) works fine in Chrome, but not in IE. In IE, the upload doesn't even begin, but in Chrome, it completes fine. Form header looks like: method='post' ENCTYPE='multipart/formdata' edit: the ini setting didn't help The HTML <input type='text' name='user' /> <input type='file' name='userfile' /> The basic PHP ( I do some preg matching above, that I haven't included) $uploaddir = 'uploads/'; $uploadfile = $uploaddir . basename($_FILES['userfile']['name']); if (move_uploaded_file($_FILES['userfile']['tmp_name'], $uploadfile)) { echo "File is valid, and was successfully uploaded.\n"; } else { echo "File uploading failed.\n"; }

    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

  • PHP form script error

    - by Alex
    Hi, I have created a rather larger html form and I would like the data to send to my email address. I am using the POST method and thought my PHP was up to snuff. However, I now get the following error upon submission: Parse error: syntax error, unexpected '}' in C:\www\mo\marinecforum\send_form_application.php on line 90. I am having a hell of a time with this. Beyond the error above, I wonder if there is a better way to approach this? Here is the PHP: http://pastebin.com/MKUcgihg Many thanks, Alex

    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

  • Submit HTML form with GET method with full action path

    - by Manny Calavera
    Hello. I am trying to submit a form with method GET and action "index.php?id=3". The problem is that it jumps to the url specified but it cuts off "?id=3" part. I need that so I can identify an user. Any ideas on how I could submit the whole url ? I don't want to change this method, by design is much complex than I told you here. It's a simple version. Any ideas ? Thanks.

    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

  • Defining Form Input with Dialog

    - by Workoholic
    Hi. I want my php application to allow the user to select a file from their computer. I then want to store the file's path, but I don't want to upload the file. With the <input type="file" />, the file is uploaded, which would take too long. Is there a way to do this? Maybe if I change the input's type to text with jquery right before the form is sent? I could just let the user type the path, but that is not very convenient...

    Read the article

  • My FORM problem issues

    - by Azzyh
    So i have this in my form: <textarea onfocus="javascript:clearContents(this);" rows="5" cols="40" id="comment" name="comment">Skriv hvorfor du vælger at stemme ja/nej. Skal indeholde detaljer, kritik/råd. Klik for at skrive</textarea><br /> Ja: <input type="checkbox" value="Y" id="SCvote" name="SCvote"> eller Nej: <input type="checkbox" value="N" name="SCvote"> Now onfocus (when you click on the box) it clears the text "Skriv hvorfor...", but if you dont write anything and still submit it, my php code thinks it contains something and inserts that text "Skriv hvorfor...". And another issue is the checkboxes. If i dont pick anything, it inserts "Y", even if i pick the other "N" it does "Y", and i dont want it to be possible that you can check both of them. how do i do?

    Read the article

  • jQuery.load and form elements

    - by Jez
    Is jQuery's .load() supposed to be able to load elements? Because it seems to be stripping them out. So I have some code like: var $dialogContents = $('<div></div>').load($link.attr('href') + ' #divDlgContent', function() { ... } and when the $dialogcontents loads, I return some content with a inside the DIV with the id 'divDlgContent'. Although the rest of the HTML is loaded, the tags are stripped out. Is this by design, and is there a way I can load elements this way?

    Read the article

  • Documents/links on preventing HTML form fiddling?

    - by larryq
    Hi everyone, I'm using ASP.Net but my question is a little more general than that. I'm interested in reading about strategies to prevent users from fooling with their HTML form values and links in an attempt to update records that don't belong to them. For instance, if my application dealt with used cars and had links to add/remove inventory, which included as part of the URL the userid, what can I do to intercept attempts to munge the link and put someone else's ID in there? In this limited instance I can always run a check at the server to ensure that userid XYZ actually has rights to car ABC, but I was curious what other strategies are out there to keep the clever at bay. (Doing a checksum of the page, perhaps? Not sure.) Thanks for your input.

    Read the article

  • HTML javascript form submitted when image input button

    - by DreamU
    I have a form that contains this single input field, which is nothing more than a button to Print the current web page: <div align="center"> <input type="image" src="../Images/print.jpg" value="Print" onclick="printpage();" /></div> </div> After the printing, the page re-submits itself (to itself). Why does it do this and can I stop it? If I just change the type to "input", this code does not re-submit itself after printing: <div align="center"> <input type="input" src="../Images/print.jpg" value="Print" onclick="printpage();" /></div> </div> Unfortunately, our style conventions require me to use that button image rather than the standard input button.

    Read the article

  • Spring Framework 3 and session attributes

    - by newbie
    I have form object that I set to request in GET request handler in my Spring controller. First time user enters to page, a new form object should be made and set to request. If user sends form, then form object is populated from request and now form object has all user givern attributes. Then form is validated and if validation is ok, then form is saved to database. If form is not validated, I want to save form object to session and then redirect to GET request handling page. When request is redirected to GET handler, then it should check if session contains form object. I have figured out that there is @SessionAttributes("form") annotation in Spring, but for some reason following doesnt work, because at first time, session attribute form is null and it gives error: org.springframework.web.HttpSessionRequiredException: Session attribute 'form' required - not found in session Here is my controller: @RequestMapping(value="form", method=RequestMethod.GET) public ModelAndView viewForm(@ModelAttribute("form") Form form) { ModelAndView mav = new ModelAndView("form"); if(form == null) form = new Form(); mav.addObject("form", form); return mav; } @RequestMapping(value="form", method=RequestMethod.POST) @Transactional(readOnly = true) public ModelAndView saveForm(@ModelAttribute("form") Form form) { FormUtils.populate(form, request); if(form.validate()) { formDao.save(); } else { return viewForm(form); } return null; }

    Read the article

< Previous Page | 5 6 7 8 9 10 11 12 13 14 15 16  | Next Page >