Search Results

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

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

  • Question about char input

    - by DomX23
    This is what I'm trying to do... char input[4]; cin >> input; cout << "Input[0]: " << input[0] << "Input[1]: " << input[1] << "Input[2]: " << input[2] << "Input[3] " << input[3]<< "Input[4] " << input[4] <<endl; However, when I enter "P F" I get an out of this: Input[0]:P Input[1]: Input[2]: Input[3] Input[4] Why do I get that weird character instead of F?

    Read the article

  • Count number of empty input boxes in table row

    - by Daniel Brink
    How do you calculate the number of input boxes with no value in a table row using jquery? example: <table id="table1"> <tr class="data" id="row5"> <td><input type="text" value="20%" /></td> <td><input type="text" value="10%" /></td> <td><input type="text" value="" /></td> <td><input type="text" /></td> </tr> <table> I'm looking for answer = 2

    Read the article

  • Stop an input field in a form from being submitted

    - by Acorn
    I'm writing some javascript that will insert some input fields into a form on a website. The thing is, I don't want those input fields to affect the form in any way, I don't want them to be submitted when the form is submitted, I only want my javascript to have access to their values. Is there some way I could add some input fields into the middle of a form and not have them submitted when the form is submitted? Obviously the ideal thing would be for the input fields to not be in the form element, but I want the layout of my resulting page to have my inserted input fields appear between elements of the original form.

    Read the article

  • change value of input element!

    - by Lina
    is it able to "override/overwrite" an input element fixed value using javascript and/or jquery? i.e. if i have an input element like this: <div id="myDiv"> <input type="text" name="inputs" value="someValue" /> </div> is it possible to make a jquery object of that element and then change its value to something else then rewrite the jquery object to the dom?? i'm trying but obviously i haven't got good results! i've been trying something like this: $('input').val("someOtherDynamicValue"); var x = $('input'); $("#myDiv").html(x);

    Read the article

  • Unobtrusive Maximum Input Lengths with JQuery and FluentValidation

    - by Steve Wilkes
    If you use FluentValidation and set a maximum length for a string or a maximum  value for a numeric property, JQuery validation is used to show an error message when the user inputs too many characters or a numeric value which is too big. On a recent project we wanted to use input’s maxlength attribute to prevent a user from entering too many characters rather than cure the problem with an error message, and I added this JQuery to add maxlength attributes based on JQuery validation’s data- attributes. $(function () { $("input[data-val-range-max],input[data-val-length-max]").each(function (i, e) { var input = $(e); var maxlength = input.is("[data-val-range-max]") ? input.data("valRangeMax").toString().length : input.data("valLengthMax"); input.attr("maxlength", maxlength); }); }); Presto!

    Read the article

  • Make all text EXCEPT <input> unselectable in Internet Explorer? [migrated]

    - by Ashli
    I have a website where I want to disable users from selecting content EXCEPT for input areas. I currently have some CSS to disable user-select: -webkit-user-select: none; -khtml-user-select: none; -moz-user-select: none; -o-user-select: none; user-select: none; However, this does NOT cover Internet Explorer; thus, I need to implement some JavaScript: <body onselectstart="return false;"> Through CSS and JavaScript, I can make all content unselectable across all popular browsers. BUT, this code also makes areas unselectable, which is a major case of poor usability. I use CSS to make input areas selectable: -webkit-user-select: text; -khtml-user-select: text; -moz-user-select: text; -o-user-select: text; user-select: text; .. and as you might have expected, this does not cover Internet Explorer, since I used JavaScript to disable all content from being selectable. What can I do to make all content unselectable except for input areas?

    Read the article

  • search form in html/php via ajax

    - by fusion
    i've a search form wherein the database query has been coded in php and the html file calls this php file via ajax to display the results in the search form. the problem is, i would like the result to be displayed in the same form as search.html; yet while the ajax works, it goes to search.php to display the results. search.html: <!DOCTYPE html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <script src="scripts/search_ajax.js" type="text/javascript"></script> </head> <body> <form id="submitForm" method="post"> <div class="wrapper"> <div class="field"> <input name="search" id="search" /> </div><br /> <input id="button1" type="submit" value="Submit" class="submit" onclick="run_query();" /><br /> </div> <div id="searchContainer"> </div> </form> </body> </html> if i add action="search.php" to the form tag, it displays the result but on search.php. i'd like it to display on the same form [i.e search.html, and not search.php] if i just add the javascript function [as done above], it displays nothing on search.html

    Read the article

  • C# program that generates html pages - limit image dimensions on page

    - by Professor Mustard
    I have a C# program that generates a large number of html pages, based on various bits of data and images that I have stored on the file system. The html itself works just fine, but the images can vary greatly in their dimensions. I need a way to ensure that a given image won't exceed a certain size on the page. The simplest way to accomplish this would be through the html itself... if there was some kind of "maxwidth" or "maxheight" property I could set in the html, or maybe a way to force the image to fit inside a table cell (if I used something like this, I'd have to be sure that the non-offending dimension would automatically scale with the one that's being reduced). The problem is, I don't know much about this "fine tuning" kind of stuff in html, and it seems to be a tough thing to Google around for (most of the solutions involve some sort of html specialization; I'm just using plain html). Alternatively, I could determine the width and height of each image at runtime by examining the image in C#, and then setting width/height values in the html if the image's dimensions exceed a certain value. The problem here is that is seems incredibly inefficient to load an entire image into memory, just to get its dimensions. I would need a way to "peek" at an image and just get its size (it could be bmp, jpg, gif or png). Any recommendations for either approach would be greatly appreciated.

    Read the article

  • Styling an Input Field

    - by John
    Hello, How can I give the input field below the characteristics listed below? Characteristics: -Text typed into the field starts in the upper left corner and starts on another line (wraps?) when the right border of the field is reached. -A scroll bar appears if the text is more than what can fit into the field. -The text is in Courier font. Thanks in advance, John echo '<form action="http://www...com/sandbox/comments/comments2.php" method="post"> <input type="hidden" value="'.$_SESSION['loginid'].'" name="uid"> <input type="hidden" value="'.$submissionid.'" name="submissionid"> <input type="hidden" value="'.$submission.'" name="submission"> <label class="addacomment" for="title">Add a comment:</label> <input class="commentsubfield" name="comment" type="comment" id="comment" maxlength="1000"> <div class="commentsubbutton"><input name="submit" type="submit" value="Submit"></div> </form> '; Some relevant CSS: .commentsubfield {margin-left: 30px; margin-top: 30px; width: 390px; height: 90px; border: 1px solid #999999; padding: 5px; }

    Read the article

  • Why "alt" attribute for <img> tag has been considered mandatory by the HTML validator .. ?

    - by infant programmer
    Is there any logical or technical reason (with the W3C validation) for making alt as required attribute .. This is my actual problem:though my page is perfect enough with respect to W3C validation rules .. Only error I am getting is line XX column YY - Error: required attribute "ALT" not specified I know the significance of "alt" attribute and I have omitted that where it is unnecessary .. (to be more elaborate .. I have added the image to increase the beauty of my page and I don't want alt attribute to show irrelevant message to the viewer) getting rid of the error is secondary .. rather I am curious to know whether is it a flaw with validation rules .. ?? I thank stackOverflow and all the members who responded me .. I got my doubt clarified .. :-)

    Read the article

  • how to find the height of html content

    - by ganapati hegde
    Hi, I am trying to display 10 html pages as a single document,with 10 chapters. I am using Webkitgtk+ engine to render the HTML pages. I am getting the content of each html files and concatenating all of them to create a single 'char *content' and using webkit_web_view_load_html_string(WebKitWebView *web_view, const gchar *content, const gchar *base_uri); this function to load all the HTML files, as a document. Now i am trying to build a 'table of contents(toc)' for this document, which displays all the chapter names in order. My requirement is, when i click on a particular chapter in toc, the document should scroll to that point. For that i need to know height of each chapter ( height of each html file content). The point to be noted here is, the width of the document can changed and as HTML is reflowable, as width increases height decreases and vice-versa. So each time when height changes i need to find out the current height of each HTML page(or chapter) and hence calculate the distance to be scrolled. How can i find out the height of content of HTML page dynamically ? Thank you for the answer....

    Read the article

  • Replacing specific HTML tags using Regex

    - by matthewpe
    Alright, an easy one for you guys. We are using ActiveReport's RichTextBox to display some random bits of HTML code. The HTML tags supported by ActiveReport can be found here : http://www.datadynamics.com/Help/ARNET3/ar3conSupportedHtmlTagsInRichText.html An example of what I want to do is replace any match of <div style="text-align:*</div> by <p style=\"text-align:*</p> in order to use a supported tag for text-alignment. I have found the following regex expression to find the correct match in my html input: <div style=\"text-align:(.*?)</div> However, I can't find a way to keep the previous text contained in the tags after my replacement. Any clue? Is it me or Regex are generally a PITA? :) private static readonly IDictionary<string, string> _replaceMap = new Dictionary<string, string> { {"<div style=\"text-align:(.*?)</div>", "<p style=\"text-align:(.*?)</p>"} }; public static string FormatHtml(string html) { foreach(var pair in _replaceMap) { html = Regex.Replace(html, pair.Key, pair.Value); } return html; } Thanks!

    Read the article

  • HTML include statement

    - by iMaster
    I'm just trying to do a simple include statement in HTML. I have no clue why its not working. My file setup is basically index.php in the root and then a file called "includes" with a file "header.html" inside. So here's my code: <!DOCTYPE html> <html lang="en"> <html> <head> <title>Title</title> <link type="text/css" href="style/style.css" media="screen" rel="stylesheet"> <script src="scripts/jquery.js" type="text/javascript"></script> <script src="scripts/code.js" type="text/javascript"></script> <meta http-equiv="content-type" content="text/html; charset=UTF-8" /> </head> <body> <div id="wrapper"> <!--#include virtual="/includes/header.html" --> ...blah blah blah </div> </body> </html> I've verified that the file is there so I'm not sure what else the problem could be. Thanks!

    Read the article

  • Line Text with Nav Bar in HTML

    - by Eric
    I have a navbar right under the title to the site, but I want to be line up the first and last items in the navbar with the beginning and end of the Title. I don't have a live preview, but I attached an image. I can get it to line up in one browser, but when I open it in the other, its off again. Is there an easy way to line the text up so it works for everything? thank you HTML: <body onload="play()"> <div class="heading">UPRISING</div> <div class="container_12"> <div id="topnav" align="center"> <ul id="list-nav"> <li><a href="home.html">HOME</a></li> <li><a href="about.html">ABOUT</a></li> <li><a href="trailer.html">TRAILER</a></li> <li><a href="stills.html">STILLS</a></li> <li><a href="news.html">NEWS</a></li> <li><a href="contact.html">CONTACT</a></li> <!-- <li><a href="distribution.html">DISTRIBUTION</a></li> --> </ul> </div> <!-- START OF CONTAINER --> <div class="trailer"> <img id="imgHolder" /> </div> </div> <!-- END OF CONTAINER 12 --> CSS: #topnav li { margin-right: 110px; } #topnav li:nth-last-child(1) { margin-right: 0px; }

    Read the article

  • How to define cell width for 2 HTML tables with different column counts?

    - by DaveDev
    If I have 2 tables: <table id="Table1"> <tr> <td></td><td></td><td></td> </tr> </table> <table id="Table2"> <tr> <td></td><td></td><td></td><td></td> </tr> </table> The first has 3 columns, the second has 4 columns. How can I define a style to represent both tables when I want Table1's cell width to be 1/3 the width of the full table, and Table2's cells are 1/4 the width of the table?

    Read the article

  • Prevent Text Input expanding in IE

    - by Caroline
    Hi, I am having a problem with an input field in IE. The code is for a portlet and widths need to be dynamic as the user can place the portlet on any of the three columns in the page which all have different widths. As always it works fine in FF but not in IE. In order to make the width dyanaic I have set width="100%". Data to populate the text input comes from a DB. When the page is rendered if there is a long URL the text input expands to fill the contents in IE but in FF it just stays the same width (ie 100% of the TD that it lives in). How can I stop IE from changing the width in order to fit the contents. Setting the width to a fixed width of 100px fixes the issue but I need to have the width as a percentage in order to accommodate the layout of the portlet wherever it is put in on the page. I have tried overflow:hidden and word-wrap:break-word but I cant get either to work. Here is my input code and style sheets <td class="right" > <input type="text" class="validate[custom[url]]" value="" id="linkText" name="communicationLink" maxlength="500" maxsize="100" /> </td> .ofCommunicationsAdmin input { font-family: "Trebuchet MS"; font-size: 11px; font-weight:normal; color:#333333; overflow:hidden; } .ofCommunicationsAdmin #linkText { overflow:hidden; width:100%; border:1px #cccccc solid; background:#F4F7ED top repeat-x; } .ofCommunicationsAdmin td.right { vertical-align: top; text-align: left; }

    Read the article

  • Horizontal histogram won't accept input after the first input

    - by vincentbelkin
    So I'm making a program which is supposed to print a horizontal histogram of the lengths of words in its input. I don't know if most of it is OK since the main problem is it won't accept any input after the first one. Oh I also put comments on the parts I'm having some trouble with, like how to print "-" multiple times in order to represent histogram. I've tried making other versions of the code but I couldn't check if I'm close to getting it because again it won't accept another input after the first input. /*Write a program to print a histogram of the lengths of words in its input. It is easy to draw the histogram with the bars horizontal*/ #include <stdio.h> #define MAX 30 #define IN 1 #define OUT 0 int main() { int a,c,i,k,state,word[MAX]; a=0; k=0; state=OUT; for(i=0;i<MAX;i++) word[i]=0; while((c=getchar())!=EOF) { if(c==' '||c=='\t'||c=='\n') state=OUT; else state=IN; while(state==IN) a++; if(state==OUT) { word[i]=a; i++; } /*This part is hard for me, I don't know how to print X multiple times!*/ if((c==getchar())&&c==EOF) { for(i=0;i<MAX;i++) { for(i=0;i<=word[i];i++) putchar('-'); putchar('\n'); } } } }

    Read the article

  • jquery events on input submit fields

    - by dfilkovi
    I have a problem with jquery submit button onclick and default event. What I want to do is replace an click event on submit button if it has one, and get an dialog box to show up, on clicking yes the dialog should start that default onclick event if submit button has one defined, if it hasn't than the default event should happen (button submits form), .submit() function does not work for me in any case cause I need to send this button also through a form and if button wasn't clicked .submit() sends form data without submit data. Bellow code has a problem, alert('xxx') is always called and it shouldn't, and on clicking yes button alert and dialog creation is called again, also if I remove alert button, I cannot call default submit button event (form submitting with a button). $('input.confirm').each(function() { var input = this; var dialog = document.createElement("div"); $(dialog).html('<p>AREYOUSHURE</p>'); $(input).click(function(event) { event.preventDefault(); var buttons = {}; buttons['NO'] = function() { $(this).dialog("close"); }; buttons['YES'] = function() { $(input).trigger('click'); $(this).dialog("close"); }; $(dialog).dialog( { autoOpen: false, width: 200, modal: true, resizable: false, buttons: buttons }); $(dialog).dialog('open'); return false; }); }); <form method="post" action=""> <input type="hidden" value="1" name="eventId" /> <input type="submit" value="Check" name="checkEvent" class="confirm" onclick="alert('xxx');" /> </form>

    Read the article

  • Removing HTML from Pidgin conversations

    - by George
    Hi Everyone I'm using Pidgin 2.5.5 with SIPE for talking to MS Communicator user at work. The MS Communicator was just now upgraded and I'm seeing HTML markup with messages. Are there any plugins to interpret HTML and apply the styles or parse it out ? Thanks -G EDIT1: I'm running this on Windows EDIT2: my convos look like person@address (time) no

    Read the article

  • wget: Turn Off Forced .html Retreival

    - by Mike B
    When performing a recursive download, I specify a pattern via the -R parameter for wget to reject, but if this file is a HTML file, wget downloads the file regardless of whether or not it matches the pattern. e.g. wget -r -R "*dynamicfile*" example.com still retrieves files such as example.com/dynamicfile1.html Is there a way to prevent this?

    Read the article

  • HTML and PHP simple contact form.

    - by user317128
    I tried to make a simple contact form via HTML and PHP but the form doesnt seem to submit. it stays on the HTML page and doesnt post to the php form. would love someone to look over the code, thanks in advanced. simple_form.html cdoe <!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>Simple Feedback Form</title> </head> <body> <form action="send_simpleform.php" method="post"> <p>Your name<br /> <input name="sender_name" type="text" size="30" /></p> <p>Email<br /> <input name="sender_email" type="text" size="30" /></p> <p>Message<br /> <textarea name="message" cols="30" rows="5"></textarea></p> <input name="submit" type="button" value="Send This Form" /> </form> </body> </html> send_simpleform.php code <? if (($_POST[sender_name] == "") || ($_POST[sender_email] == "") || ($_POST[message] == "") { header("Location: simple_form.php"); exit; } $msg = "Email sent from wwwsite\n"; $msg .= "Sender's Name:\t $_POST[senders_name]\n"; $msg .= "Sender's E-mail:\t $_POST[senders_email]\n"; $msg .= "Sender's Message:\t $_POST[message]\n"; $to = "[email protected]"; $subject = "Website feedback message"; $mailheaders = "From: My web site <www.testwebsite.com>\n"; $mailherders .= "Reply to: $_POST[sender_email]\n"; $mail($to, $subject, $msg, $mailheaders); ?> <!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>Simple Feedback Form Sent</title> </head> <body> <h1>The following email has been sent</h1> <p>Your Name:<br /> <? echo "$_POST[sender_name]"; ?> <p>Your Email Adress:<br /> <? echo "$_POST[sender_email]"; ?> <p>Message:<br /> <? echo "$_POST[message]"; ?> </p> </body> </html>

    Read the article

  • innter.HTML not working after submit button is clicked

    - by user1781453
    I am trying to get the innerHTML to change to what is in the end of the function "calculate" but nothing happens once I hit submit. Here is my code: Pizza Order Form .outp {border-style:solid;background-color:white; border-color:red;padding:1em; border-width: .5em;} .notes {font-size:smaller;font-style:italic;} p {margin-left: 15%; width: 65%;} textarea {resize : none;} </style> function calculate(){ var type; var newline=""; var sum=0; var toppings=""; if( document.getElementById("small").checked==true){ type="Small Pizza"; sum+=4; } if( document.getElementById("medium").checked==true){ type="Medium Pizza"; sum+=6; } if( document.getElementById("large").checked==true){ type="Large Pizza"; sum+=8; } if( document.getElementById("pepperoni").checked==true){ toppings=toppings+"pepperoni, "; sum+=0.75; } if( document.getElementById("olives").checked==true){ toppings=toppings+"olives, "; sum+=0.6; } if( document.getElementById("sausage").checked==true){ toppings=toppings+"sausage, "; sum+=0.75; } if( document.getElementById("peppers").checked==true){ toppings=toppings+"peppers, "; sum+=0.5; } if( document.getElementById("onions").checked==true){ toppings=toppings+"onions, "; sum+=0.5; } if( document.getElementById("cheese").checked==true){ toppings=toppings+"Cheese Only, "; } var length = toppings.length; toppings = toppings.slice(0,length-2); document.getElementById("opta").innerHTML = type+newline+"Toppings:"+newline+toppings+newline+"Price - $"+sum; } Joe's Pizza Palace On-line Order Form <p id = "op" class = "outp" > <b /> Select the size Pizza you want: &nbsp;&nbsp; <input type="radio" name = "size" id="small" value = "small"> Small - $4.00 <b /> <input type="radio" name = "size" id="medium" value = "medium"> Medium - $6.00 <b /> <input type="radio" name = "size" id="large" value = "large"> Large - $8.00 <b /> </p> <p id = "op1" class = "outp" > <b /> Select the toppings: &nbsp;&nbsp; <input type="checkbox" name = "size" id="pepperoni" value = "pepperoni"> Pepperoni ($0.75) <b /> <input type="checkbox" name = "size" id="olives" value = "olives"> Olives ($0.60) <b /> <input type="checkbox" name = "size" id="sausage" value = "sausage"> Sausage ($0.75) <b /> <br /> <input type="checkbox" name = "size" id="peppers" value = "peppers"> Peppers ($0.50) <b /> <input type="checkbox" name = "size" id="onions" value = "onions"> Onions ($0.50) <b /> <input type="checkbox" name = "size" id="cheese" value = "cheese"> Cheese Only <b /> To obtain the price of your order click on the price button below: <br /><br /> <input type="button" align = "left" onclick="calculate();" value="Price (Submit Button)"/> <input type="reset" align = "left" value="Clear Form"/> <br /><br /> <textarea class="outp3" id="opta" style="border-color:black;" rows="6" cols="40" > </textarea>

    Read the article

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