HTML

57K

Solutions

77

Articles & Videos

30K

Contributors

HTML (HyperText Markup Language) is the main markup language for creating web pages and other information to be displayed in a web browser, providing both the structure and content for what is sent from a web server through the use of tags. The current implementation of the HTML specification is HTML5.

Share tech news, updates, or what's on your mind.

Sign up to Post

Hi experts, I have some issue in my project where I need to use the button to calculate the two "input text" automatically upon pressing the button. Is it possible to activate any key function by filling it thru command  or function in a button? I tried to use onchange, onkeyup, onkeydown but they won't work. Please note that I need a solution base on the given codes below where the sequence is filling data thru commands and once the input text receive the date it will  trigger the function iCalulate. Any help please. Thank you!  

<!DOCTYPE html>
<html>
<head>
</head>
<body>
<input type="text" id="A1" onkeyup="return iCalulate()" readonly/>
<br/><br/>
<input type="text" id="A2" readonly/>
<br/><br/>
<input type="text" id="Sum" readonly/>
<br/><br>
<button onclick="return fillAll()">Go</button>

<script>
function iCalulate()
{
  var a = parseInt(document.getElementById("A1").value);
  var b = parseInt(document.getElementById("A2").value);
  
  document.getElementById("Sum").value = (a + b);
  //var c = (a + b);
  //alert(a + b)
}

function fillAll()
{
  document.getElementById("A1").value = "2"
  document.getElementById("A2").value = "3"
}
</script>
</body>
</html>

Open in new window

0
On Demand Webinar - Networking for the Cloud Era
LVL 8
On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

I have the following piece of code that is needed to build and add rows under the right headings in an html table.
var mileStoneHtml="";
		var typeArray = [];
		var headingName = "";
		for(var i =0; i < data.d.results.length; i++) 
		{	
			headingName = data.d.results[i].Milestone_x0020_Type;
			
			if (typeArray.indexOf(headingName) === -1){
				typeArray.push(headingName);
				
				
				tableRow = document.createElement("tr");
				tableRow.id=headingName;
				tableRow.style.backgroundColor = "#EEEEEE";
				tableCol = document.createElement("td");
				tableCol.colSpan = 5;
				tableCol.textContent = headingName;
				tableRow.appendChild(tableCol);				
				console.log(tableRow);
				tbl = document.getElementById("tblMilestone");
				console.log(tbl);
				console.dir(tbl);
				tbl.appendChild(tableRow);
			}
					mileStoneHtml = "<tr>"+
					"<td>"+data.d.results[i].MilestoneDescription+"</td>"+
					"<td>"+data.d.results[i].Planned_x0020_Date+"</td>"+
					"<td>"+data.d.results[i].Revised_x0020_Date+"</td>"+
					"<td>"+data.d.results[i].Actual_x0020_Date+"</td>"+
					"<td>"+data.d.results[i].Milestone_x0020_Type+"</td>"+
				"</tr>";		
				
				var newRow = $("#"+headingName).append(mileStoneHtml);
				console.log(newRow);
//				document.querySelector("#tblMilestone").appendChild(mileStoneHtml);					
		}													

Open in new window


It needs to look like this
correct rendering
but it looks like this
incorrect rendering
0
HI experts, codes below are able to calculate profit percentage. However, when it comes of writing comma "," in a number it will no longer calculate. For example, if i write 1,000.00 as the capital price (CP) and 1,200.00 as the selling price (SP), the solution will not work. However, if I write 1000.00 as the  (CP) and 1200.00 as the  (SP) the solution will answer. Any help please! Thank you.

<!DOCTYPE html>
<html>

<body>
<p>Capital Price</p>
<input type="text" id="A9" onkeypress="CalculateProfit()" onkeyup="CalculateProfit()"/>
<br/>
<p>selling Price</p>
<input type="text" id="A8" onkeypress="CalculateProfit()" onkeyup="CalculateProfit()"/>
<br/>
<p>result</p>
<input type="text" id="A10"/>

<script>
function CalculateProfit()
{
	var 	sp = parseFloat(document.getElementById("A8").value);
			sp=sp.toFixed(2);
			sp=sp.replace(/\,/g,'');
			
	var 	uc = parseFloat(document.getElementById("A9").value);
			uc=uc.toFixed(2);
			uc =uc.replace(/\,/g,'');
			
	var 	prt = (sp /(.01 * uc) - 100);
	var 	n = prt.toFixed(2);
	
	document.getElementById("A10").value = n + "%";  
}

</script>
</body>
</html>

Open in new window

0
While designing for a sign-up process, I'd like to be able to show a progress indicator dictating how many steps are in the process, total. Right now, I'm using little dots across the top of the screen that "fill in" as you're making progress during the page-by-page sign-up.

My question is in regard to a particular step that could extend or contract the number of remaining steps because a step is added or taken away. It feels weird that, in the middle of a 4-step process, a choice made on Step 2 would then show 5 dots on the following page.

Is there an alternative method to make this feel less strange? Or is the idea for a progress indicator made null because of how this sign-up process works?
0
hi all
i want a line per ittem, please help

ObjSendMail.HTMLBody = "Nombre:" +" " + Request.Form("fname") & Chr(10) & "Email:" +" " + Request.Form("email") & Chr(10) & "Consultorio:" +" " + Request.Form("consultorio") & Chr(10) & "Comentarios:" +" " + Request.Form("message")

Open in new window


tsm
0
Hello I am new to asp and and trying to learn how to code properly however, I have a deadline to get this code to work on a clients website. My hosting company moved us to a new server that does not support FrontPage extensions and so i need to update my skills and update my websites I support.

I copied this code from one of the asp.net  sources and tweaked it with my variables but am still getting 5 errors when i debug it.

Error      1      Cannot implicitly convert type 'string' to 'System.Web.UI.WebControls.TextBox'      c:\users\melinda\documents\visual studio 2013\Projects\WebApplication1\WebApplication1\Test_form.aspx.cs      27      30      WebApplication1
Error      2      Cannot implicitly convert type 'string' to 'System.Web.UI.WebControls.Label'      c:\users\melinda\documents\visual studio 2013\Projects\WebApplication1\WebApplication1\Test_form.aspx.cs      34      26      WebApplication1
Error      3      Cannot implicitly convert type 'string' to 'System.Web.UI.WebControls.Label'      c:\users\melinda\documents\visual studio 2013\Projects\WebApplication1\WebApplication1\Test_form.aspx.cs      40      26      WebApplication1
Error      4      Property or indexer 'System.Net.Mail.MailMessage.To' cannot be assigned to -- it is read only      c:\users\melinda\documents\visual studio 2013\Projects\WebApplication1\WebApplication1\Test_form.aspx.cs      49      9      WebApplication1
Error      5      Cannot implicitly convert type 'System.Net.Mail.MailAddress' to 'System.Net.Mail.MailAddressCollection'      c:\users\melinda\documents\visual studio …
0
I added codeigniter 'table' to my project and i got desired outcome for view except for the fact that the way i had it before i was able to delete record by clicking on them since they were anchor tags, i would like to know how to recreate this in new table format. Thanks!
site_model.php
site.php
options_view.php
Capture2.PNG
Capture.PNG
0
Dear experts,
I am facing a request from a customer, who maintains about 500 product sheets to different products. So far all the data were kept in Word and PDF files were made manually. Th maintenance was a nightmare and publishing online was nearly impossible.

Now the product sheets will be saved in a database / XML so that with help of some CSS libraries/frameworks (bootstrap etc.) site nice layout can be achieved while keeping the simplicity of editing content in a database and displaying the sheets online. For better reading and design reasons the sheets will contain TWO columns on normal screen and paper and 1 column only on mobile devices. This all is doable. Somehow.

However the next requirement is to be able to generate PDFs out of the same source (database/xml) and the PDF shall, of course, keep the layout for DIN A4 paper - header, footer, two columns, which flow always on first page from left column to right column and then on next pages again from left to right column. Like when you load a text in indesign for example. So that the PDFs when printed can be red.

Unfortunately the HTML page does not respect the fixed length of a DIN A4 paper and when showing two columns, they flow till the bottom of the page "infinitely".  When I tried to play with bootstrap for example, I was able to accomplish the HTML part, but then I was unable to either print it to PDF or even while using some PDF library to generate A4 standalone pages.

I hope I am expressing …
0
I have a page that static-coded. Not part of Wordpress or anything. I just need to merge the first name from the URL params into the headline of the page. The url param looks like: "firstname=John".
0
<form method="post" action="contact.asp">
                        <b>Envíenos un mensaje</b> <span></span>
                        <input type="text" name="fname" id="fname" value="Nombre">
                        <input type="text" name="email" id="email" value="Dirección de Email">
                        <select name="Consultorio">
                            <option>Elija Consultorio...</option>
                            <option>Queretaro</option>
                            <option>San Miguel</option>
                        </select>
                        <textarea name="message" id="message" cols="30" rows="10">Escriba aquí su mensaje...</textarea>
                        <input type="submit"  name="send" id="send" value="Enviar Mensaje">
                    </form>

how do i set a input name in the select in order to asp read the select option?
regards
0
Free Tool: Site Down Detector
LVL 8
Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Is it possible to create a search bar like the one shown attached? I'm wanting it to look like one bar but actually have 2 input fields. If this is possible, can someone please draft out the html and css for this? I've tried every possible option to no avail.

Thanks so much for your help!
Screen-Shot-2017-06-20-at-9.34.17-AM.png
0
I'm quite new to jquery.
I have a simple jquery function which takes the value from two html select inputs ( #number1 and #number 2), multiples the values together and assigned a string value to the DIV element (#total) according to what the calculated value(total) is.

Everything works fine except the if statements. I'm not too sure how best to do this in jquery?


 
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<script>
$(document).ready(function(){
    $("#number1, #number2").change(function(){
    var cons = $("#number1").val() || 0;
    var likely = $("#number2").val() || 0;
    
    var total = (cons * likely)
      
    if ((total == "0"))
     { var result = "N/A";}
    else if ((total >= "1") && (total <= "2"))
     { var result = "Low";}
    else if ((total >= "3") && (total <= "4"))
     { var result = "Medium";}
    else if ((total >= "6") && (total <= "9"))
     { var result = "High";}
    else if ((total >= "12") && (total <= "16"))
     { var result = "Immediate";}    
       
    
    $("#total").html(result);    
    });
});



</script>';

echo '<form><table class="my-table">
    <thead>
        <tr>
            <td>Type</td>
            <td>Consequence</td>
            <td>Likelyhood</td>
            <td>Total</td>
        </tr>
    </thead>
    <tbody>
        <tr data-row-num="1">
        <td>Risk Self</td>
        <td><select id="number1">
              <option value="1">1</option>
              

Open in new window

0
Please any code helpfull for a simply contact form in HTML that writes data on a sql db
regards!
0
Hi experts, The code below is able to export table to excel. However, I want to use a button .click function before the download starts. Any help please!
 
<!DOCTYPE html>
<html>
	<head>
		<title>jQuery Boilerplate</title>
		<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.2.4/jquery.min.js"></script>
		<script src="../dist/jquery.table2excel.min.js"></script>
	</head>
	<body>
    <button class="WinExcel">Export</button>
    
		<table class="table2excel" data-tableName="Test Table 1">
			<thead>
				<tr class="noExl"><td>This shouldn't get exported</td><td>This shouldn't get exported either</td></tr>
				<tr><td>This Should get exported as a header</td><td>This should too</td></tr>
			</thead>
			<tbody>
				<tr>
					<td>data1a with a <a href="#">link one</a> and <a href="#">link two</a>.</td>
					<td>data1b with a </td></tr>
				<tr>
					<td>data2a with a <input tyle="text" value="text value">.</td>
					<td>data2b with a <input tyle="text" value="second text value">.</td>
				</tr>
			</tbody>
			<tfoot>
				<tr><td colspan="2">This footer spans 2 cells</td></tr>
			</tfoot>
		</table>

		<script>
			$(function() {
				$(".table2excel").table2excel({
					exclude: ".noExl",
					name: "Excel Document Name",
					filename: "myFileName",
					fileext: ".xlsx",
					exclude_img: true,
					exclude_links: true,
					exclude_inputs: true
				});
			});
    
		</script>
    
	</body>
</html>

Open in new window

0
Hi, Please see this development site: http://fromthefuture.staging.wpengine.com/magickitchen/search-results.html

Then this page: http://dev2.magickitchen.com/search-results.html  you can use userid: pepe and pw: BobTheBuilder45!!

On the first page, when you scroll down, an arrow appears to take you back to the top. On the second page, the arrow is in the source code, but not appearing. Why? I must be missing a bit of javascript?

Thanks.
0
Hi experts, I'm trying to develop some codes that can avoid typing space on a input text. The codes below won't work. Help me please!

<!doctype html>
<html lang="en">
<head>

</head>
<body>
<input type="text" id="UserName"/>

<script>
$("input#UserName").on({
  keydown: function(e) {
    if (e.which === 32)
      return false;
  },
  change: function() {
    this.value = this.value.replace(/\s/g, "");
  }
});
</script>
</body>
</html>

Open in new window

0
Hi All,

Background:
I have written a script to grab the most common words in a page (with tags stripped etc.) It mostly works, however there is an occasional occurrence of the following happening: helloThisIsAnExampleOfTheAnomoly.

This occurs while grabbing certain HTML via a cURL based function, stripping tags and counting word frequency. It mostly appears to occur in menus and widgets.

What I'm looking for is an elegant/efficient solution to pop/push/unset values in the array with the values split.

To expand:
preg_replace('/(?<! )(?<!^)[A-Z]/',' $0', $words)

Open in new window


I'm using the above regular expressions to essentially split the values based on uppercase values occurring mid string/array element.

To summarise:
$array is currently something like this: ("This", "is", "okay", "this", "IsNotOkay")
What I want:
$array is going to look something like this ("This", "is", "okay", "this", "Is", "Not", "Okay")

Don't worry too much about the repeat values as I am utilising a "stop words" array to rid the ones I would not like to keep.

I've not got it working nicely yet so thought I'd turn to you for your expert input.

Thanks in advance.
Chris
0
Hi Experts

I need an htaccess rewrite rule to redirect from the following URL format:

xyz.com/ABC123

to the following URL format:

http://abc.com/parm?Search.Active=True&Search.SerialType=1&Search.SerialNumber=ABC123&%23=FIND+ASSET

Note that the part marked in bold is a variable that will change. It can contain one to three letters and/or one to three numbers and can be a minimum of 1 character in length and a maximum of 6 characters in length.

What is the rewrite rule that I need please?

Thanks
0
I have a simple html page that uses bootstrap grid.

Each page of the grid I've labelled as a section.

<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title></title>

	<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">

  </head>
  <body>

  <div class="container">

  	<div class="row">
  		<div class="col-md-4">Section 1</div>
  		<div class="col-md-4">Section 2</div>
  		<div class="col-md-4">Section 3</div>
  	</div>

  	<div class="row">
  		<div class="col-md-6">Section 4</div>
  		<div class="col-md-6">Section 5</div>
  	</div>

  </div>
 

    <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script>
   	<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
  </body>
</html>

Open in new window


Example data:

{
  "section": "section1",
  "position": "5"
}

Open in new window


What I want to do is to load the different grid parts by reading json data.

So basically, the page loads, reads the json data which contains the positions of the sections and then populates the website.
0
Why Off-Site Backups Are The Only Way To Go
Why Off-Site Backups Are The Only Way To Go

You are probably backing up your data—but how and where? Ransomware is on the rise and there are variants that specifically target backups. Read on to discover why off-site is the way to go.

Hi there,

I am trying to work on an Excel Macro that can generate a html/ htm page that lists the name of every tab name for every excel file in a folder.

For each listed tab name and file name when clicked on, it will hyper link directly to the file/ to the tab.

For example in the generate html page:

Excel File Name 1
 - Tab 1
 - Tab 2
 - Tab 3

Excel File Name 2
 - Tab A
 - Tab B
 - Tab C

Any advice on how do i write the vb code in the excel macro to generate such a page. Thanks!
0
Am am looking for either a library or some code to use that would allow me to add code snippets to my html pages with syntax highlighting.

What options do I have that will work with or on top of Bootstrap 3?
0
Hi experts, I'm trying to develop some codes that can call and print automatically to local printer (EPSON TM-U220 Receipt). Is this possible? I'm using google chrome and the codes below is printing but not directly. Any help please!

<html>
<head>

<body>


<button onclick="printData()">Print</button>
<script>
function printData()
{
    var d = "June 12, 2017";
    var a = "My first line";
    var b = "My second line";
    
    myWindow=window.open('','','width=200,height=100');
    myWindow.document.write(d);
    myWindow.document.write(a);
    myWindow.document.write(b);
    //myWindow.focus();
    myWindow.print();
   //EPSON TM-U220 Receipt
}
</script>
</body>
</html>

Open in new window

0
hi experts,

I have some html code and css3 animation for an alert box to pop up with an error for my email validation in php.

However I need to make the white cross on each box clickable and also make them disappear when clicked.

im nit sure how to do this in js and im not even sure if it can be embedded directly into php??

Thanks please see code below.

PHP & HTML

function validation_errors($error_message){ //Function for displaying validation errors

// HTML & CSS Alert Box
    
$error_message = <<< EOS

<style>
html,
body {
	height: 100%;
}

.container {
	display: flex;
	height: 10%;
	justify-content: center;
	align-items: center;
}

.rectangle {
	display: flex;
	align-items: center;
	justify-content: flex-start;
	positon: relative;
	width: 50px;
	height: 50px;
	background: #e74c3c;
	transform: scale(0);
	border-radius: 50%;
	color: white;
    margin-bottom: 10px; 
	opacity: 0;
	overflow: hidden;
	animation: scale-in .3s ease-out forwards,
		expand .35s .25s ease-out forwards;
}

.notification-text {
	display: flex;
	align-items: center;
	padding: 0 16px;
	font-family: 'Roboto', sans-serif;
	font-size: 14px;
	animation: fade-in .65s ease-in forwards;
}

@keyframes scale-in {
	100% {
		transform: scale(1);
		opacity: 1;
	}
}

@keyframes expand {
	50% {
		width: 350px;
		border-radius: 6px;
	}
	100% {
		width: 414px;
        height: 40px;
		border-radius: 4px;
		box-shadow: 0px 1px 3px 0px rgba(0,0,0,.2),
								0px 1px 1px 0px rgba(0,0,0,.14),
	

Open in new window

0
Hi experts, I'm looking for some codes who will disallow or detect any symbols in an input text. I want that in the input text, only numbers or letters is in there, that whenever there's a presence of any of them an alert message will pop-up. Any help please!  

<!DOCTYPE html>
<html>

<body>

<input id="idno" type="text"/>

<button onclick="OnlyWordsAndNumbers(document.getElementById('idno'))">Check</button>

<script>
function OnlyWordsAndNumbers(el) 
{
  //If el is compose of any symbols like @ # ? ! and many others then an alert woulb be..
  //Only letters and numbers are allowed in the box.
}
</script>
</body>
</html>

Open in new window

0
Can a pdf be used as an image on a web page?

Is there an easy, inexpensive way to convert a pdf to a jpg? Or png?

Thanks
0

HTML

57K

Solutions

77

Articles & Videos

30K

Contributors

HTML (HyperText Markup Language) is the main markup language for creating web pages and other information to be displayed in a web browser, providing both the structure and content for what is sent from a web server through the use of tags. The current implementation of the HTML specification is HTML5.