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

Pretty basic question here.

What is the HTML and css to make a page 4 columns.  And switch to 2 columns on a cell phone.

Appreciate any help.

Thanks!

Rowby
0
Secure Your WordPress Site: 5 Essential Approaches
Secure Your WordPress Site: 5 Essential Approaches

WordPress is the web's most popular CMS, but its dominance also makes it a target for attackers. Our eBook will show you how to:

Prevent costly exploits of core and plugin vulnerabilities
Repel automated attacks
Lock down your dashboard, secure your code, and protect your users

I have a multiple choice quiz that is either correct or incorrect. Right now the code works so that correct or incorrect is shown, but I need to add logic that shows that the choice was correct because that was the right answer or if it was correct to not select it, or the choice was incorrect because that was the correct answer to choose.
Below is the code I am currently using and the HTML that has the question.
Any help or pointing in the right direction is appreciated.

Javascript
// JavaScript Document
//Function to show all explanations and tell if the user was correct. 
function show_all()
{  
  var 	
 answers = document.getElementsByClassName("explanation"),
		checkboxes = document.getElementsByName('field'),
		corrects = document.getElementsByClassName("correct"),
		incorrects = document.getElementsByClassName("incorrect");
		
		
  for(var i = 0; i < answers.length; i++)
  {
        
answers[i].style.display = 'block';
	
	// check the checkbox selection
	if (checkboxes[i].checked) {
		//If the answer and choice is incorrect
		if (checkboxes[i].getAttribute('value') === 'incorrect') {
			incorrects[i].style.display = 'block';
			
		}
		else {
			corrects[i].style.display = 'block';
		}
	}
	else {
		if (checkboxes[i].getAttribute('value') === 'correct') {
			corrects[i].style.display = 'block';
		}
		else {
			incorrects[i].style.display = 'block';
		}
	}
  }
 

} 

Open in new window


HTML
<form id="submitform">
    <div id="main" class="container-fluid">
 

Open in new window

0
Dear Sirs,
I have a web app rendering html and exposing at the same time some REST end points.
I have 2 two classes annotated with @ControllerAdvice:
1) A Class will manage all the errors generated on the web side of the application, and redirects to an Error view page
2) The other Class will manage all the errors generated on the REST side of the application and returns an ResponsEntity<Object>

I have some custom exceptions such as NotFoundException, AccessDeniedException, etc.. And there is a generic ExceptionHandler for the Class Exception.class in both the 2 @ControllerAdvice Classes: 1 for web side exception and 1  for REST side exception.

The confusion  I am seeing is that when the generic exception occurs, while I am consuming the REST end points, I will get an HTML error view instead of a Jackson string representing the ResponseEntity<Object> and vice-versa.

How can I handle this. Make @ControllerAdvice Class 1 only look at exceptions generated by all the classes annotated with @Controller, and @ControllerAdvice Class 2 only look at exceptions generated by all the classes annotated with @RestController.


Thanks a in advance
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
I have an input field of type checkbox. I would like to retain the check status after page reload/refresh. Below is my codes:
HTML
<input type="checkbox" title="Check/Uncheck to show or hide   your mobile number." id="mobile<?php echo $mobile; ?>"  class="mobile" name="<?php echo $mobile; ?>" value="<?php  echo $mobile; ?>" style="visibility:hidden">

Open in new window


JQUERY This one works. When I checked the checkbox, the .mobile class respond accordingly - it hide and show.

$(document).ready(function() {
    $('.mobile').change(function() {
        if (this.checked)
            $('.MobileIcon').hide('slow');
        else
            $('.MobileIcon').show('slow');

    });
});

Open in new window


The below line of code did not work

$(function() {
    $("input:checkbox").each(function() {
        if (localStorage.getItem(this.value) == 'checked') {
            $(this).attr("checked", "true")
        }
    })
$("input:checkbox").click(function() {
        if ($(this).is(':checked')) {
            localStorage.setItem(this.value, 'checked');
        } else {
            localStorage.removeItem(this.value);
        }
    });
});

Open in new window


This is not working. The checked disappear when I reload the page. I want the checkbox to remain checked even at page reload, so that my hide and show would also persist.
Please any help to get this working would be appreciated.
0
I have a Cold Fusion form with a contract number field that needs more than one label. Current code is:

<label for="Contract_Number">Contract Number:&nbsp;</label>

Open in new window


How do I add another id so I can use the same validation for that form field? Would this work:

<label for="Contract_Number" for="Contract_NumberZ">Contract Number:&nbsp;</label>

Open in new window


Or how do I add the 2: This doesn't seem to work:

label for="Contract_Number"|"Contract_NumberZ">

Open in new window


thanks
0
How do you find out in programming ASP.NET pages what version of html is being used?
Is there a setting in Visual Studio?

What trigger my question was I read the following:

The width attribute of <td> is not supported in HTML5. Use CSS instead.
CSS syntax: <td style="width:100px">

https://www.w3schools.com/tags/att_td_width.asp
0
Hi,
Can you please suggest some world class HTML Email Campaigns vendor, we need to contact anyone on urgent bases.

Many thanks,
Naresh
0
Hi how do i insert an image in a form that i send via email
ObjSendMail.HTMLBody ="Nombre:" +" " + Request.Form("fname") & Chr(10) & "<br>Email:" +" " + Request.Form("email") & Chr(10) & "<br>Consultorio:" +" " + Request.Form("consultorio") & Chr(10) & "<br>Comentarios:" +" " + Request.Form("message")

Open in new window


thats the text, i want to insert an image in the top of that

<img src="images/Oncdelbajiologo.png"

regards
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
Free Tool: IP Lookup
LVL 8
Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

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.

I'm writing structured data code for my breadcrumb and ran into a question about the position number of the item.

For Seattle:
1. US-->2. WA--->3. King County--->4. Seattle    

This is my breadcrumb for Seattle, which is in position 4.  The numbers are not displayed to the users of course, but in the code behind for structured data, the numbers are required by Google.  
"itemListElement": [{
    "@type": "ListItem",
    "position": 1,

Open in new window



However Canada doesn't have counties for their cities.  So on my Calgary page, the breadcrumb naturally will not show a "county" level.  but when it comes to the structured data code behind, which is appropriate, is calgary in position 3 or position 4?  

1.  Canada-->2. AB-->4. Calgary  

1.  Canada -->2. AB -->3. Calgary


Since all the US cities have the city at the fourth position, I wondered if I should "skip" a level for my pages on Canadian cities, but I'm not sure what the best practice is.  Should I code my structured data to put canadian cities in position 4, or position 3?
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 attached files, i am trying to display results in a table, i am new to codeigniter is there a way to do this? what would be the best way to implement this? i have read about codeigniter tables but i am not sure how to apply to my code. Any guidance will be appreciated.
Thank You!
site.php
site_model.php
options_view.php
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
how do i get the form fill send  to an email

i got it stored in the database, but i want those send request to email me


sql="INSERT INTO comentarios (nombre, email, producto, comentario)"
sql=sql & " VALUES "
sql=sql & "('" & Request.Form("fname") & "',"
sql=sql & "'" & Request.Form("email") & "',"
sql=sql & "'" & Request.Form("consultorio") & "',"
sql=sql & "'" & Request.Form("message") & "')"

on error resume next
conn.Execute sql,recaffected
if err<>0 then
  Response.Write("No update permissions!")
else
  Response.Write("<h3>" & recaffected & " Nos pondremos en contacto con usted cuanto antes</h3>")
end if
conn.close

thats to the database, how to email me that info
regards
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
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

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
I have an application running in classic ASP coding with HTML pages and in one .asp page the client requested for a button. This button when clicked, it must export whatever the data present in Table of Access database (already in use) to an excel sheet. Kindly help as i have been searching for this sort of code everywhere.
0
Hi experts, I need to upgrade high version of excel to export html table to excel. The codes below are able to export from table to excel, How can i upgrade it to high version of excel with an extension .xlsx  ? 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="Stocks32">
          <tr>
            <td>Erwin M. Malalis 500</td>
          </tr>
        </table>
<script>
	$(function() {
		$("button.WinExcel").click(function(){
			$(".Stocks32").Stocks32({
				exclude: ".noExl",
				name: "Excel Document Name",
				filename: "Prolist",
				//fileext: ".xls",
				exclude_img: true,
				exclude_links: true,
				exclude_inputs: true
			});
		 });
	});
</script>  
	</body>
</html>

Open in new window


!function(a,b,c,d){function e(b,c){this.element=b,this.settings=a.extend({},k,c),this._defaults=k,this._name=j,this.init()}function f(a){return a.filename?a.filename:"Stocks32"}function g(a){var b=/(\s+alt\s*=\s*"([^"]*)"|\s+alt\s*=\s*'([^']*)')/i;return a.replace(/<img[^>]*>/gi,function(a){var c=b.exec(a);return null!==c&&c.length>=2?c[2]:""})}function h(a){return a.replace(/<a[^>]*>|<\/a>/gi,"")}function i(a){var b=/(\s+value\s*=\s*"([^"]*)"|\s+value\s*=\s*'([^']*)')/i;return 

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

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.