Search Results

Search found 42998 results on 1720 pages for 'html input'.

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

  • HTML form never calls Javascript

    - by user1205577
    I have a set of radio buttons defined in HTML like so: <input type="radio" name="group" id="rad1" value="rad1" onClick="doStuff(this.id)">Option 1<br> <input type="radio" name="group" id="rad2" value="rad2" onClick="doStuff(this.id)">Option 2<br> Just before the </body> tag, I have the following JavaScript behavior defined: <script type="text/javascript"> /*<![CDATA[*/ function doStuff(var id){ alert("Doing stuff!"); } /*]]>*/ </script> When I run the program, the page loads as expected in my browser window and the radio buttons allow me to click them. The doStuff() function, however, is never called (I validated this using breakpoints as well). I also tried the following just to see if inline made the difference, but it seems the JavaScript is never called at all: <script type="text/javascript"> /*<![CDATA[*/ alert("JavaScript called!"); main(); function main(){ var group = document.getElementsByName('group'); for(var i=0; i<group.length; i++){ group[i].onclick = function(){ doStuff(this.id); }; } } /*]]>*/ </script> My question is, is there something special I need to do using HTML and JavaScript in this context? My question is not whether I should be using inline function calls or whether this is your favorite way to write code.

    Read the article

  • How to embed functionality into HTML email?

    - by Crashalot
    We want to let users click a thumbs up or thumbs down button from an HTML email, without causing the clicking to open a browser window. Is there a way to essentially embed limited web functionality (i.e., clicking an icon, showing confirmation) within HTML emails? Thanks!

    Read the article

  • HTML email: tables or divs?

    - by j-man86
    Does the HTML/CSS for an html email newsletter need to be in table format, or can I use DIVs with equal assurance it will display well cross email-client? I've downloaded a number of templates to see how they're done, upon which to base my own, and they all seem to use tables. Any insight much appreciated, thanks!

    Read the article

  • parsing HTML on the iPhone

    - by Ben Alpert
    Can anyone recommend a C or Objective-C library for HTML parsing? It needs to handle messy HTML code that won't quite validate. Does such a library exist, or am I better off just trying to use regular expressions?

    Read the article

  • Using the HTML 'label' tag with radio buttons

    - by GlenPeterson
    Does the label tag work with radio buttons? If so, how do you use it? I have a form that displays like this: First Name: (text field) Hair Color: (color drop-down) Description: (text area) Salutation: (radio buttons for Mr., Mrs., Miss) I'd like to use the label tag for each label in the left column to define its connection to the appropriate control in the right column. But If I use a radio button, the spec seems to indicate that suddenly the actual "Salutation" label for the form control no longer belongs in the label tag, but rather the options "Mr., Mrs., etc." go in the label tag. I've always been a fan of accessibility and the semantic web, but this design doesn't make sense to me. The label tag explicitly declares labels. The option tag selection options. How do you declare a label on the actual label for a set of radio buttons? UPDATE: Here is an example with code: <tr><th><label for"sc">Status:</label></th> <td>&#160;</td> <td><select name="statusCode" id="sc"> <option value="ON_TIME">On Time</option> <option value="LATE">Late</option> </select></td></tr> This works great. But unlike other form controls, radio buttons have a separate field for each value: <tr><th align="right"><label for="???">Activity:</label></th> <td>&#160;</td> <td align="left"><input type="radio" name="es" value="" id="es0" /> Active &#160; <input type="radio" name="es" value="ON_TIME" checked="checked" id="es1" /> Completed on Time &#160; <input type="radio" name="es" value="LATE" id="es2" /> Completed Late &#160; <input type="radio" name="es" value="CANCELED" id="es3" /> Canceled</td> </tr> What to do?

    Read the article

  • Tip: Replacing Html.Encode Calls With New Html Encoding Syntax

    Like the well disciplined secure developer that you are, when you built your ASP.NET MVC 1.0 application, you remembered to call Html.Encode every time you output a value that came from user input. Didnt you? Well, in ASP.NET MVC 2 running on ASP.NET 4, those calls can be replaced with the new HTML encoding syntax (aka code nugget). Ive written a three part series on the topic. Html Encoding Code Blocks With ASP.NET 4 Html Encoding Nuggets With ASP.NET MVC 2 Using AntiXss as the default...Did you know that DotNetSlackers also publishes .net articles written by top known .net Authors? We already have over 80 articles in several categories including Silverlight. Take a look: here.

    Read the article

  • Formatting HTML lists using CSS

    - by pwaring
    I'm trying to recreate list in HTML which has clauses and subclauses like this: 1. Main Clause (a) Sub clause (b) Sub clause 2. Another main clause (a) Sub clause The problems I'm running into are: If I use the existing HTML elements (ol and li) there doesn't seem to be a list style for (a) - I can have a. b. c. or A. B. C. but not (a) (b) (c). If I don't use the existing HTML elements and start using span tags, then if a subclause runs beyond the end of the line it appears underneath the clause number, rather than being indented. Like so: (a) Very long subclause which goes over one line when what I really want is the behaviour from lists, which is: (a) Very long subclause which goes over one line Is there any way to get round these two problems at the same time? I'd prefer to use semantic HTML and CSS for styling, but having the clauses spaced correctly is more important than doing things 'the right way'. I may need subsubclauses at some point (i.e. (i), (ii) etc.), so I can't assume that (a) will be the maximum clause depth.

    Read the article

  • Why is HTML/Javascript minification beneficial

    - by Channel72
    Why is HTML/Javascript minification beneficial when the HTTP protocol already supports gzip data compression? I realize that Javascript/HTML minification has the potential to significantly reduce the size of Javascript/HTML files by removing unnecessary whitespace, and perhaps renaming variables to a few letters each, but doesn't the LZW algorithm do especially well when there are many repeated characters (e.g. lots of whitespace?) I realize that some Javascript minification tools do more than just reduce size. Google's closure compiler, for example, also tries to improve code performance by inlining functions and doing other analyses. But the primary purpose of Javascript minification is usually to reduce file size. I also realize there are other reasons you might want to minify aside from performace, such as code obfuscation. But again, that reason is not usually emphasized as much as performance gain and file size reduction. For example, Closure Compiler is not advertised as an obfuscation tool, but as a code size reducer and download-speed enhancer. So, how much performance do you really gain from Javascript/HTML minification when you're already significantly reducing file size with gzip compression?

    Read the article

  • HTML Parsing for multiple input files using java code [closed]

    - by mkp
    FileReader f0 = new FileReader("123.html"); StringBuilder sb = new StringBuilder(); BufferedReader br = new BufferedReader(f0); while((temp1=br.readLine())!=null) { sb.append(temp1); } String para = sb.toString().replaceAll("<br>","\n"); String textonly = Jsoup.parse(para).text(); System.out.println(textonly); FileWriter f1=new FileWriter("123.txt"); char buf1[] = new char[textonly.length()]; textonly.getChars(0,textonly.length(),buf1,0); for(i=0;i<buf1.length;i++) { if(buf1[i]=='\n') f1.write("\r\n"); f1.write(buf1[i]); } I've this code but it is taking only one file at a time. I want to select multiple files. I've 2000 files and I've given them numbering name from 1 to 2000 as "1.html". So I want to give for loop like for(i=1;i<=2000;i++) and after executing separate txt file should be generated.

    Read the article

  • Html.LabelFor and Html.TextBoxFor generate empy html code

    - by Ceridan
    I'm writing my first ASP.NET MVC application and there is one big problem for me. I want to make a control which will represent a form, but when I try to generate labels and textboxes it returns to me empty page. So, this is my model file (MyModel.cs): namespace MyNamespace.Models { public class MyModel { [Required(ErrorMessage = "You have to fill this field")] [DisplayName("Input name")] public string Name{ get; set; } } } This is MyFormControlView.ascx file with my control: <%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<MyNamespace.Models.MyModel>"%> <div> <% using (Html.BeginForm()) { Html.LabelFor(m => m.Name); Html.TextBoxFor(m => m.Name); Html.ValidationMessageFor(m => m.Name); } %> </div> And this is my Index.aspx file where I render the control: <%@ Page Language="C#" MasterPageFile="~/Views/Shared/Main.Master" Inherits="System.Web.Mvc.ViewPage<System.Collections.IEnumerable>" %> <asp:Content runat="server" ID="MainContent" ContentPlaceHolderID="MainContent"> This is my control test! <%Html.RenderPartial("MyFormControlView", new MyNamespace.Models.MyModel { Name = "MyTestName"}); %> </asp:Content> So, when I run my application the result is lonely caption: "This is my control test!" and there are no label or textbox on the generated page. If I inspect the source code of the generated page I can see my block, but it's inner text is empty. Please, could you help me?

    Read the article

  • Using embedded standard HTML forms with ASP.NET

    - by RM
    I have a standard aspx page with which I need to add another standard HTML form into and have it submit to another location (external site), however whenever I press the submit button the page seems to do a post back rather than using the sub-forms action url. A mock up of what the form relationships is below. Note in the real deployment the form will be part of a content area of a master page layout, so the form needs to submit independantly from the master page form. <html xmlns="http://www.w3.org/1999/xhtml" > <head runat="server"> <title>Untitled Page</title> </head> <body> <form id="form1" runat="server"> <div> <form id="subscribe_form" method="post" action="https://someothersite.com" name="em_subscribe_form" > <input type="text" id="field1" name="field1" /> <input id="submitsubform" type="submit" value="Submit" /> </form> </div> </form> </body> </html>

    Read the article

  • How do I extract HTML content using Regex in PHP

    - by gAMBOOKa
    I know, i know... regex is not the best way to extract HTML text. But I need to extract article text from a lot of pages, I can store regexes in the database for each website. I'm not sure how XML parsers would work with multiple websites. You'd need a separate function for each website. In any case, I don't know much about regexes, so bear with me. I've got an HTML page in a format similar to this <html> <head>...</head> <body> <div class=nav>...</div><p id="someshit" /> <div class=body>....</div> <div class=footer>...</div> </body> I need to extract the contents of the body class container. I tried this. $pattern = "/<div class=\"body\">\(.*?\)<\/div>/sui" $text = $htmlPageAsIs; if (preg_match($pattern, $text, $matches)) echo "MATCHED!"; else echo "Sorry gambooka, but your text is in another castle."; What am I doing wrong? My text ends up in another castle.

    Read the article

  • Jquery .html() function returns html out of nested order

    - by forcripesake
    I have a method which returns a persisted html template from a database. The template is of the format: <div id="item_collection"> <div id="item_x"> <p id="item_x_headline"><h2>Some Headline</h2></p> <p id="item_x_excerpt>Some text here</p> </div> <div id="item_x+1"> <p id="item_x+1_headline"><h1>Some Headline</h1></p> <p id="item_x+1_excerpt>Some text here</p> </div> ...and so on. </div> However after I run the following: alert(data); //check that the template is in order. It Is. $('#template_area').html(data); the Html is now: <div id="item_collection"> <div id="item_x"> <p id="item_x_headline"></p> <!--Note The Lack of Nesting --> <h2>Some Headline</h2> <p id="item_x_excerpt>Some text here</p> </div> <div id="item_x+1"> <p id="item_x+1_headline"></p> <!--Note The Lack of Nesting --> <h1>Some Headline</h1> <p id="item_x+1_excerpt>Some text here</p> </div> ...and so on. </div> So what gives? Is there a better way to replace the empty template_area's content than the .html() method?

    Read the article

  • Copying content on webpages in safari. To HTML

    - by Carl Smith
    Hi, is there an easier way to copy and paste website content in html? Want to copy and look like this. Product Information: Length: S / M / L Material: Polyester and Elasthane Brand: Roxana Exclusive Style: Basque But when i paste it into my content box it looks like this- Product Information Length: S / M / L Material: Polyester and Elasthane Brand: Roxana Exclusive Style: Basque Then i need to edit it in the html editor to rearrange it. Is the some sort of app or plugin that i can get so i can turn the text of the page into html so it looks right straight away when i copy it into my content box? If that makes any sense? Thanks Carl Smith :-)

    Read the article

  • Benefit of using Data URI to embed images within HTML document and its cross-browser compatibility

    - by Manoj Agarwal
    I want to embed an image using Data URI within HTML document so that we don't need image as a separate attachment, we get just one HTML file that contains the actual image. What are its advantages and disadvantages? Does IE10 supports it? Is it useful to have such an implementation? I am working on an application, where we have html documents that link towards images stored in some location. If I use tiny online editor, as images are saved somewhere in the server, while editing the document, i can provide a link towards that image, but can't preview the final document with images from within tiny editor. If I chose to download the file locally, then i will need to download the images from server side. It looks a bit overkill, so I thought if Data URI could be used in such a situation.

    Read the article

  • Why no client-side HTML include tag?

    - by Xepoch
    I had a question posed to me the other day by another programmer. I remember (a very long time ago) wondering the very same. Why was a browser-side include tag never considered? Or was it? Specifically with a tag that instructed the browser to include additional HTML from other sources. e.g. <include src="http://server/foo/bar.html">. Many folks will make javascript calls and fill innerHTML to accomplish the same, when the same outside a the javascript engine could be accomplished by the browser. It would have been painful to have nested <HTML>s <BODY>s (i.e.) but we have to consider that aspect anywhere anyway.

    Read the article

  • Joomla 1.5.26 won't let me insert html

    - by Arthur
    I am using the following code to try to embed chat in to an article in Joomla 1.5.26: <iframe src="http://xxxxxxx.com/welcome/visichat/" width="100%" height="550px" frameborder="0" scrolling="no"></iframe> Whenever I hit save, the code disappears. Actually, it seems that any html code I try to save disappears. I am trying with the toggle editor tab and the insert html button. Does anyone know why Joomla won't let me embed html? I am trying to get the chat to load with the site navigation still in place. I'd also be interested in hearing other ways to accomplish this.

    Read the article

  • Script to embed image and CSS data in HTML files

    - by andreas-h
    I have a HTML page which references external stylesheets and shows some images. I'm looking for an easy way to include all referenced external resources in the HTML file directly, so that it doesn't have any external references any more. (Images should be included in the HTML file using the <img src="data:image/jpg;base64,[...] method). EDIT: I want to do this so that my web proxy can deliver a nice-looking error page if the backend is down, so I have to assume all my webservers cannot deliver the static content which would normally be linked to from my websites (CSS, images).

    Read the article

  • I upgraded from win 7 to ubuntu 12.04 and know my html codes dont work

    - by user171010
    Hello i just started using Ubuntu the other day i never used Linux or anything else besides windows before. I started learning HTML on windows 7 before switching to Ubuntu and know my HTML images are not working even after i made new images on Ubuntu and put the correct path and made sure the images are .png. After all that the site does not load the new images and the coeds are just fine i put my HTML files on cloud storage before switching to Ubuntu so its not the codes. Also i am using Mozilla Fire Fox.

    Read the article

  • Beginning HTML and CSS [closed]

    - by romani
    My goal of learning HTML and CSS is to be able to modify popular scripts such as Wordpress, vBulletin, Drupal, etc. I haven't started yet learning CSS and HTML or XHTML. I see many, many books and tutorials out there so it is difficult to make a choice. I think most of web designers were like me in the past and have read many books. So, could you tell me about 1 good book for HTML and 1 good book for CSS? and if I should read the book from cover to cover or only learning the basics is enough for modifying Wordpress, for example!

    Read the article

  • Nicest way to map rgb colors from html to led

    - by back_ache
    I have attached an rgb led to a color picker on a webpage and have hit the obvious problem that though the led is 8-bit like html the color rendition is very different so with the more subtle shades the led values for the color are wildly different to the html values. The brute-force method would be for me to have a lookup-table on the webserver to map the two sets of values but would ideally like to do it more elegantly Before I start listing all my 101 ideas for doing this I wondered if anyone else had come across the issue, the end-game would be to be able to abstract the color-rendition of different leds and make it available as a webservice (html value and device id in, led value out)

    Read the article

  • Best practice for managing dynamic HTML modules?

    - by jt0dd
    I've been building web apps that add and remove lots of dynamic content and even structure within the page, and I'm not impressed by the method I'm using to do it. When I want to add a section or module into a position in the interface, I'm storing the html in the code, and I don't like that: if (rank == "moderator") { $("#header").append('<div class="mod_controls">' + // content, using + to implement line breaks '</div>'); } This seems like such a bad programming practice.. There must be a better way. I thought of building a function to convert a JSON structure to html, but it seems like overkill. For the functionality of the apps I'm using: Node.js JS JQuery AJAX Is there some common way to store HTML modules externally for AJAX importation?

    Read the article

  • HTML to XAML Conversion, Display HTML in RichTextBox

    - by Erika
    Hi, unfortunately im REALLY stuck on this and was wondering in anyone knows how to work around this. I have some html text which i want displayed in a WPF RichTextBox. At the moment, i'm using some helper APIs found http://blogs.msdn.com/wpfsdk/archive/2006/05/25/606317.aspx to convert HTML to XAML. So at the moment i have a xaml data string, but i cant see to find a way to display this correctly within the richtextbox :s i have been trying the following: string xamlData = HTMLConverter.HtmlToXamlConverter.ConvertHtmlToXaml(sBody,true); FlowDocument result = XamlReader.Load(new System.Xml.XmlTextReader(new StringReader(xamlData))) as FlowDocument; but this is crashing on the XamlReader.. Any other way will do, i just need to display an HTML string in this RichTextBox or something else! Please Help!

    Read the article

  • HTML parsing - fetch and update data from the .html file

    - by Amit Jain
    I have a form in a .html files where input/select box looks like this <input type="text" id="txtName" name="txtName" value="##myName##" /> <select id="cbGender" name="cbGender"> <option>Select</option> <option selected="selected">Male</option> <option>Female</option> </select> I would need to remove '##' value textbox and also update them with different values if needed be in the textbox/checkbox/ selectbox. I would know the id of the input types. The code is to be written in groovy. Any ideas?

    Read the article

  • How to change SMP affinity of an IRQ on Ubuntu domU inside Xen XCP?

    - by Alexander Gladysh
    I'd like to change IRQ SMP affinity for reasons, outlined in this question: CPU0 is swamped with eth1 interrupts But I can't — I see Input/output error when I try to write to /proc/irq/*/smp_affinity. Please point me to the HOWTO on the matter. (A formal reference on /proc/irq/*/ would be cool as well.) Gory details: Note that this is a VM inside an Ubuntu-based Xen XCP host. $ uname -a Linux MYHOST 2.6.38-15-virtual #59-Ubuntu SMP Fri Apr 27 16:40:18 UTC 2012 i686 i686 i386 GNU/Linux $ lsb_release -a No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 11.04 Release: 11.04 Codename: natty $ sudo cat /proc/irq/*/smp_affinity 01 01 01 01 01 80 80 80 80 80 80 40 40 40 40 40 40 20 20 20 20 20 20 10 10 10 10 10 10 08 08 08 08 08 08 04 04 04 04 04 04 02 02 02 02 02 02 01 01 01 01 01 01 Update. The error details: $ N=$(grep -c processor /proc/cpuinfo) $ echo $N 8 $ printf %x $((2**N-1)) ff $ printf %x $((2**N-1)) | sudo tee /proc/irq/*/smp_affinity fftee: /proc/irq/288/smp_affinity: Input/output error tee: /proc/irq/289/smp_affinity: Input/output error tee: /proc/irq/290/smp_affinity: Input/output error tee: /proc/irq/291/smp_affinity: Input/output error tee: /proc/irq/292/smp_affinity: Input/output error tee: /proc/irq/293/smp_affinity: Input/output error tee: /proc/irq/294/smp_affinity: Input/output error tee: /proc/irq/295/smp_affinity: Input/output error tee: /proc/irq/296/smp_affinity: Input/output error tee: /proc/irq/297/smp_affinity: Input/output error tee: /proc/irq/298/smp_affinity: Input/output error tee: /proc/irq/299/smp_affinity: Input/output error tee: /proc/irq/300/smp_affinity: Input/output error tee: /proc/irq/301/smp_affinity: Input/output error tee: /proc/irq/302/smp_affinity: Input/output error tee: /proc/irq/303/smp_affinity: Input/output error tee: /proc/irq/304/smp_affinity: Input/output error tee: /proc/irq/305/smp_affinity: Input/output error tee: /proc/irq/306/smp_affinity: Input/output error tee: /proc/irq/307/smp_affinity: Input/output error tee: /proc/irq/308/smp_affinity: Input/output error tee: /proc/irq/309/smp_affinity: Input/output error tee: /proc/irq/310/smp_affinity: Input/output error tee: /proc/irq/311/smp_affinity: Input/output error tee: /proc/irq/312/smp_affinity: Input/output error tee: /proc/irq/313/smp_affinity: Input/output error tee: /proc/irq/314/smp_affinity: Input/output error tee: /proc/irq/315/smp_affinity: Input/output error tee: /proc/irq/316/smp_affinity: Input/output error tee: /proc/irq/317/smp_affinity: Input/output error tee: /proc/irq/318/smp_affinity: Input/output error tee: /proc/irq/319/smp_affinity: Input/output error tee: /proc/irq/320/smp_affinity: Input/output error tee: /proc/irq/321/smp_affinity: Input/output error tee: /proc/irq/322/smp_affinity: Input/output error tee: /proc/irq/323/smp_affinity: Input/output error tee: /proc/irq/324/smp_affinity: Input/output error tee: /proc/irq/325/smp_affinity: Input/output error tee: /proc/irq/326/smp_affinity: Input/output error tee: /proc/irq/327/smp_affinity: Input/output error tee: /proc/irq/328/smp_affinity: Input/output error tee: /proc/irq/329/smp_affinity: Input/output error tee: /proc/irq/330/smp_affinity: Input/output error tee: /proc/irq/331/smp_affinity: Input/output error tee: /proc/irq/332/smp_affinity: Input/output error tee: /proc/irq/333/smp_affinity: Input/output error tee: /proc/irq/334/smp_affinity: Input/output error tee: /proc/irq/335/smp_affinity: Input/output error Update. irqbalance is running: $ sudo service irqbalance status irqbalance start/running, process 560

    Read the article

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