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'm trying to implement JQuery here ($("Qty").change();) where I can be able to compute the result between the two fields upon adding  row on a table. My goal here is to have the result bet the two input, the id="Qty" and the id="rd". I want to have an auto answer to be filled in the result, id="utotal". The codes below won't work.., any help please! Thank you.

<!DOCTYPE html>
<html>
<style>
table,th,td {
  border : 1px solid black;
  border-collapse: collapse;
}
th,td {
  padding: 5px;
}
tfoot {color:red;}
</style>
<table id="Tab1">
<tr>
  <th>Quantity</th>
  <th>Price</th>
  <th>Total</th>
</tr>
</table>
<br/>
<button onclick="return AddNow()">Add row</button>

<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>

<script>
function AddNow() {
   var q = parseInt("2.00");
   var p = parseInt("2.50");
  
  var table = document.getElementById("Tab1");
  var row = table.insertRow(table.rows.length);
  
  var cell1 = row.insertCell(0);
  var cell2 = row.insertCell(1);
  var cell3 = row.insertCell(2);
  
  cell1.innerHTML = '<input type="text"  id="Qty" value="' + q + '"' + 'onchange="myRowTotalPOS(this.parentElement.parentElement)"/>';
  cell2.innerHTML = '<input type="text" id="rp"  value="' + p + '"' + ' readonly/>'; 
  cell3.innerHTML = '<input type="text" id="utotal" />';
}

function myRowTotalPOS( row )
    {
		Qty = row.cells[0].firstChild.value;
		if( Qty != '' && Qty != null ) Qty = Qty.replace( ',', '' ); 
      

Open in new window

0
Independent Software Vendors: We Want Your Opinion
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

HI experts, I'm having trouble with my code below where I need to get the date of the day and put it in an input text. The code below will not show the correctly - the date will always lesser than one day than our local dates. However, The alert message i put will display the correct dates. Any help please! Why the alert message shows the correct date and in an input text will not.

<!DOCTYPE html>
<html>
<head>

</head>
<body>
<input type="date" id="date1"/>
<button onclick="NowDate()">Check Date</button>

<script>
function NowDate()
{
  var myDate = new Date();
  alert(myDate);
  document.getElementById("date1").valueAsDate = myDate;
}
</script>

</body>
</html>

Open in new window

0
Hi Guys,
I have aspx page that have textbox controller and listbox controller in my page:
<asp:TextBox ID="txtObject" onfocus="this.select();" runat="server" AutoPostBack="True" CssClass="form-control"></asp:TextBox>
<asp:ListBox Style="border: none; min-height: 350px;" Width="100%" ID="lstTracked" runat="server"></asp:ListBox>

Open in new window


Now, when I type some text on the textbox and enter it is inserting the text to the lstbox and so on, but in some point after I enter 3 4 and sometimes 10 entries I'm getting error:

Here is the error:
Source:      System.Web
Description:      Invalid postback or callback argument. Event validation is enabled using in configuration or <%@ Page EnableEventValidation="true" %> in a page. For security purposes, this feature verifies that arguments to postback or callback events originate from the server control that originally rendered them. If the data is valid and expected, use the ClientScriptManager.RegisterForEventValidation method in order to register the postback or callback data for validation.
Source:      Void ValidateEvent(System.String, System.String)
Data:      at System.Web.UI.ClientScriptManager.ValidateEvent(String uniqueId, String argument) at System.Web.UI.Control.ValidateEvent(String uniqueID, String eventArgument) at System.Web.UI.WebControls.ListBox.LoadPostData(String postDataKey, NameValueCollection postCollection) at System.Web.UI.WebControls.ListBox.System.Web.UI.IPostBackDataHandler.LoadPostData(String postDataKey, …
0
I need to write a rule in my apache htaccess file to redirect:

/insurance-plans/year/schools/international-student-plans-2015?s=136&l=5000
to:
http://%{SERVER_NAME}/insurance-plans/year/schools/international-student-plans-2017?s=136&l=7000

The rule I wrote is as follows, but it does nothing:

RewriteRule ^insurance-plans\/year\/schools\/international-student-plans-2015?s=136&l=5000$		http://%{SERVER_NAME}/insurance-plans/year/schools/international-student-plans-2017?s=136&l=7000	[R=301,L,NC,NE]

Open in new window


I'd be grateful if someone would show me the correct htaccess code to implement my redirect.

Thanks,
Jon
0
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
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
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
On Demand Webinar: Networking for the Cloud Era
LVL 8
On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

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
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
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 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
Hi experts, I'm looking for a sample code that could view a report on my simple Html page like viewing employees. Any guide please! I used crystal report in my vb6 programming, and have no idea for html. Thank you!
0
Hello
I need htaccess code to make permalinks and redirect them on a single file
like i need example.com/a
example.com/b
example.com/c
example.com/anything
these urls to show my index file
0
Respected Sir/Mam
I Had Two Different Site In Different C Panel I Decided To Add Them Together in One C panel through addon domain feature let my first site name be 123.com and second one be abc.com ,Now I aaded abc.com to 123.com's c apnel through addon domain feature now directory for domain abc.com was >>> Home/123.COM/Public_Html/abc.com and i transfer all public html content of abc.com to Ths Directory Home/123.COM/Public_Html/abc.com  After That index file for domain be..Home/123.COM/Public_Html/abc.com/index.php
But Whenevr i open my homepage for Abc.com instead of opening it started downloading the page, By The way 123.com is working Fine..
Please Help!!! Thanxx In Advance.
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.

I didn't understand the sample Html you provided.  Do I copy and paste the export from firefox bookmarks to html  after your sample?
0
hi experts,

I am trying to embed some html into a string like this $passErr = "<p class='error'>" . "Please enter your password" . "</p>";

I have tried this in so many different ways but it always outputs as plain text with the tags like so : <p class='error'>" . "Please enter your password" . "</p>

I really need to fix this asap if anyone can help I would highly appreciate it. Please see the details below

PHP CODE

<?php 
$usernameErr = $passErr = "";
$username = $password = "";
$hasError = false;
$username = 'Username';
$password = 'Password';

if ($_POST) {
    if (empty($_POST["username"])) {
        $usernameErr =  "Please enter your username";
        $username = $usernameErr;
        $hasError = true;
    } else {
        $username = test($_POST["username"]);
        if (!filter_var($username, FILTER_VALIDATE_EMAIL)) {
            $usernameErr = "<p class='error'>Invalid email format</p>"; 
            $hasError = true;
        }
    }
    if (empty($_POST["password"])) {
        $passErr = "<p class='error'>" . "Please enter your password" . "</p>";
        $password = $passErr;
        $hasError = true;
    } else {
        $password = (test($_POST["password"]));
    } 
 }
function test($data) {
    return $data;
}
?>

Open in new window


IMAGE OF OUTPUT
Screen-Shot-2017-06-15-at-22.54.19.png
0
Occasionally, a user will enter spaces in our HTML5 validated form to avoid entering a name, such as a competitor checking out the form. How do we use html5 validation to require at least 3 characters and/or not more than one space? I am not a coder, but I think it is something like
input:invalid [ | ] for disallowing two consecutive spaces, but that's all I know.
0
I am having a SOAP API project in which I send the request in XML while calling the API from SOAP UI to create the account on portal. In return, I get the response in XML.

Now I want to change it to Web UI (Don't want to use SOAP UI). To do that I want to use HTML form which will have input fields like v1:type,company name etc (Currently, I pass the fields in XML request using SOAP UI) and while submitting the form, API should be triggered and parse the XML response to display on Web UI.

Note : I am also having the certificate (jks) for API in SOAP UI. where that certificate will I configure?

Please help me as I am very new in this area.

Below is the request and response.

Request

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:v="abc.com" xmlns:v1="abc.com">
   <soapenv:Header>
      <v:vfExtendedHeader>
         <v1:traceIdentifier>
            <v1:applicationId>VSDM_PROVISIONING</v1:applicationId>
            <v1:serviceId>ARI_sis_${=new java.text.SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss'Z'").format(new Date())}</v1:serviceId>
            <v1:serviceInterfaceVersion>2.0</v1:serviceInterfaceVersion>
            <v1:timestamp>${=new java.text.SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss'Z'").format(new Date())}</v1:timestamp>
            <v1:referenceId>ARI_rid_${=new java.text.SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss'Z'").format(new Date())}</v1:referenceId>
            <v1:correlationId>NULL</v1:correlationId>
      

Open in new window

0
I'm building a form to do a quick search for real estate listings. There is something wrong with the formatting with the very last set of 'select options' however and i can't figure it out. I use WordPress so i'm new to forms anyway. I do know that the city values and property type values are correct. MLS ids are correct.

It's got to be something simple i just can't fix it.
works.txt
breaks-the-site.txt
codes-put-together.txt
0
Hello,

I'm making a website on godaddy in website builder 7...i want to: when i mouse over an image, the image became bigger in that same page..

Plz help me...
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.