HTML

59K

Solutions

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

I want to position an AJAX post in the context of a loop. The challenge is grabbing a value that's coming from the previous POST.

How could I pull that off?

Here's what I've got so far:

First off, on the main page, the user clicks on a button and that "gets" the hello.php page:

$(document).ready(function() {
	
	$('.print_forms').click(function() {
		var empID = $(this).data('empid');
		var hID=$(this).data('hid');
		var itemSel=$(this).data('item_sel');
		var cpID=$(this).data('cpid');
		var orderID=$(this).data('orderid');
		var quantity=$(this).data('quantity');
		var primeID=$(this).data('prime_id');
		var laps=$(this).data('laps');
		//alert(empID);
		$.get('hello.php?empID='+empID+'&hID='+hID+'&item_sel='+itemSel+'&cpID='+cpID+'&orderID='+orderID+'&quantity='+quantity+'&primeID='+primeID+'&laps='+laps,
		function(data) {
			$('.centered').show();	
			$('.centered').html(data);
		});
	});
		
});

Open in new window


The "hello.php" page has some minimal HTML that displays a loading graphic. At the bottom of that page is where I'm running into the challenge...

var laps=<?php echo $laps-1;?>;
		for(i=1;  i<=laps; i++)
		{
			setTimeout(function() {
				var out = {
				'empID': <?php echo $empID;?>,
				'hID' : <?php echo $hID;?>,
				'cpID' : <?php echo $cpID;?>,
				'orderID': <?php echo $orderID;?>, 
				'quantity':<?php echo $quantity;?>,
				'PrimeID': <?php echo $bob;?>, 
				'laps':<?php echo $laps-2;?>
				};
				$.post("hello_again.php?PrimeID=", out, function(data) {
					console.log(PrimeID);
					$('#gear_text').html(data);
				});
			},2000);

Open in new window


Can you smell what I'm cooking?

The idea is that I've got a known number of "laps" that I have to complete. Each lap goes out and "GETS" the next round of records based on the previous PrimeID.

THAT's my struggle!

How do I get the most recent PrimeID - the value that's arriving in the context of the "data" returning from my POST?

Any ideas?
0
Ultimate Tool Kit for Technology Solution Provider
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

Usage of Bootstrap

I have done some reading online about Bootstrap, it states that Bootstrap includes HTML and CSS, and makes the web forms generated in easy and faster way.
I am not sure what they mean by that. DO they mean that when we open Bootsrop text editor we can write HTML and CSS on the same page ?
Another thing that I want to know is How does Javascript interact with Bootstrap ?

Thak you
0
Hello,
I am creating a basic user authentication using nodejs, express.js and Passport.js.
I follow this example and it kind of works for me:
https://github.com/passport/express-4.x-local-example/blob/master/server.js

BUT, I would like to modify this demo to not have routes and not a template engine (ejs)

I have a folder with a bunch of static html files I would like to protect.
admin/
         /login.html
         /page1.html
         /page2.html
         /page3.html

I would like to password protect access to all html file under admin using basic authentication, but without routes.

In other words, I would like to access wepage.com/page2.html or any other html page and be redirected to login page, after logging in, I would like to be redirected back to page2.html and after that I could access the rest of the html pages without having to login. wepage.com/page4.html, wepage.com/page3.html, etc

The reason I don't want to have routes is because new html pages are added all the time and I don't want to keep creating routes for new ones or remove routes when deleting html pages.
Also, I don't really need a template engine since my pages are static html and I would like people to access the html directly. wepage.com/page1.html

The only requirements I have is nodejs, express.js and Passport.js.

Can someone please guide me or point me to an example to accomplish this?

Thanks
EMimi
0
I'm a mobile apps newbie. (but good on ADO, SQL)
I have a SQL Server online (Azure). I need to create a simple HTML5 phone app that can do (for demo purposes) the following.
  • Show a dropdown list of (say about 6 items) that a user can select from. The 6 items are populated from a table in the SQL Server with a SELECT statement. When click a Go button, the app sends a SQL UPDATE statement that includes the value of the selected item.
  • Show a textbox for entering a short message. Click Go button to send an INSERT statement.
I'm looking to do that as a Hello World (before I launch into deeper learning)
Thanks!
I have an iPhone 6s
0
Hello! I'm a newbie in programming and my first project it's an checkin system for a hotel. The system it's looking like this: first of all, the user will enter his name, check-in, check-out date,  the numbers of rooms that he wants to rent, number of people that will stay in a room, and the email address(all this done in the register.php page). After he'll enter this details, an email will be sent to him where he'll have a reservation number and the details about his reservation. After this, he'll go on an page(login.php) where he'll enter this reservation code and start the check-in process for each room, for example if he choosed 2 rooms, he'll make first the checkin for the first room then for the second(this should be done in the checkin.php page).If the checkin process was never made, it will start, otherwise an message will be shown that will say that the code was used or it's incorrect, it depends. What I want help it's with the login process and the starting of the checkin, I managed to send that email, generate that code but I can't login and start the checkin... I want to use only PostgreSQL, not MYSQL. Here it's the login.php:
<?php

	ob_start();
	 $error = false;
	// Errors reporting, used if needed
	error_reporting(E_ALL);
	ini_set('display_errors', 'on');

	// General configuration like base, used if needed
	include_once ('include/config.inc.php');

	// Mail functions
	include_once ('include/mail.functions.php');

	// Start session if needed
	

Open in new window

0
I have a table with rows that I hide and show using the jQuery functions show() and hide(). I have some css rules that display the table with alternating row colors by doing something similar to the following:

tr:nth-child(odd) {
    color: #000000 ;
    background-color: #F8F8F8 !important;
}

Open in new window


and something similar for the even rows.

My problem is that the style is applied to all rows even the hidden ones so as a result my table does not have alternating row colors when some of the rows are hidden. I have tried doing the following but that did not work:
]tr:visible:nth-child(odd) {
    color: #000000 ;
    background-color: #F8F8F8 !important;

Open in new window


I am hoping someone can help me with this
0
Please Help!!!

I have a page with a ComboBox.
I want to trigger a Postback when the ComboBox is updated.

Am I on the right track with the following code?

----------------------------------

 <Script> 
function ComboChange(obj) {
var comboValue = document.getElementById('MktReportSelectDate').value;
__doPostBack('MktReportSelectDate', comboValue);}
</Script> 


<TR>
   <TD  ALIGN="RIGHT">Reporting Period:&nbsp;&nbsp;</TD>
   <TD  ALIGN="LEFT"><SELECT NAME="MktReportSelectDate" ID="MktReportSelectDate" OnChange="ComboChange()" >
<OPTION VALUE="Custom Date Period" SELECTED>Custom Date Period
<OPTION VALUE="First Quarter">First Quarter
<OPTION VALUE="Second Quarter">Second Quarter
<OPTION VALUE="Third Quarter">Third Quarter
<OPTION VALUE="Fourth Quarter">Fourth Quarter
<OPTION VALUE="This Year">This Year
<OPTION VALUE="Last Year">Last Year
<OPTION VALUE="This Month">This Month
<OPTION VALUE="Last Month">Last Month
</SELECT>
</TD>

</TR>

Open in new window

----------------------------------

The ComboBox is displayed properly. But the Postback is not triggered when a new value is selected.

I am new to HTML and have a project that I need to complete ASAP. Any help would be greatly appreciated.

Many Thanks,

Nelson
0
Would like to create a vertical tab, as below only with CSS and HTML (no Js).

0
Hi, do you know how to make an offline dictionary to search faster? I am using offline dictionary in my website but when its searching for the meaning of a word, it takes too much time to find the meaning.

To clarify things, I did not obtain these from other offline dictionary softwares. Instead, I made the coding myself using HTML.
0
Can someone help me figure out how to use PowerShell to return the text string value of a P Style item in a web page?

The text string I'm trying to recover in the web page is within the p style class below.

<h3 class="ibm-h4 ibm-light ibm-padding-top-r1">Comment</h3>
<p style="white-space: pre-wrap;">In announce letter 915-238, all license part numbers were withdrawn from marketing effective March 10, 2016 for  Dxxxxxx and April 12, 2016 for Exxxxxx. The V6.4 media is still available for electronic download only.</p>

Open in new window


Using this PowerShell command I can retrieve the H3 Class Value right before it (i.e. the Comment text string), but for whatever reason I cannot figure out to get the P Style text value.

($HTML.ParsedHtml.GetElementsByTagName("h3") | Where{ $_.className -eq 'ibm-h4 ibm-light ibm-padding-top-r1' }).innerText

Open in new window


Capture.PNG
Really appreciate any help.
0
Get expert help—faster!
LVL 12
Get expert help—faster!

Need expert help—fast? Use the Help Bell for personalized assistance getting answers to your important questions.

I have a Hyper V server  with 3 guests.
The host only has one partition so hyper v is running on the local C: drive.

I'm going to do a one time backup just for disaster recovery purposes. In case the whole server goes.
Would it be beneficial to do a one time backup of the whole host using windows backup?
And then I could restore the virtual machines using image restore to the VM.


This customer uses Datto Backup for the guest servers.
0
We have a site that has some js that opens/closes panels in a bootstrap theme.   We want to be able to add to the script to post if the panel is opened or closed so that if the user comes back, it will be open or closed like it was when they were there last.

This is the code that is called in an external .js file.

jQuery(document).on('click', '.panel .tools .fa-chevron-down', function () {
        var el = jQuery(this).parents(".panel").children(".panel-body");
        if (jQuery(this).hasClass("fa-chevron-down")) {
            jQuery(this).removeClass("fa-chevron-down").addClass("fa-chevron-up");
            el.slideUp(200);
        } else {
            jQuery(this).removeClass("fa-chevron-up").addClass("fa-chevron-down");
            el.slideDown(200);
        }
    });

Open in new window


This is the html that is calling it

<div class="col-lg-6 column draggable" id="panel_id_1" data-column="#panel_id_1_col#" data-row="#panel_id_1_row#">

                      <section class="panel">
                          <header class="panel-heading panel-homes">
                              MY NOTIFICATIONS SINCE LAST LOGON					

                              <span class="tools pull-right">
                                <a href="javascript:;" class="fa fa-chevron-down chevwhite"></a>
                            </span>
                          </header>
</section>
</div>

Open in new window


I know I need to add an update to it (I think!) and pass the id variable - id: $(this).attr("id") and some sort of post but I have no idea where to put it, etc to call my script (that I have already written.    Can i get some guidance on where to add this new information to the current script?
0
I have a 900px wide div, #wrapper, positioned relatively.  There are 2 divs that are positioned absolutely, I would like them to lay directly over #wrapper.  The left div will hold text pulled from a database.  The right div will hold nothing, perhaps it doesn't even need to exist.  

The #left and #right divs lay beneath #wrapper, incorrectly, as you will see in my Pen.  My more pressing question, however, is... is it possible to use the blur CSS property to blur only the portion of the image contained in #wrapper (which is full-width of the page) that is behind/under the area covered by #left.  I want the site owner to be able to upload any full-width hero image, and have the left half of that image be blurred, so that the text laying over it will be more readable/visible.  So far this code is what I've come up with, but it only blurs what is actually IN the #left div, not what is underneath.  Not sure this is even possible.  Maybe I need to use a filter?

https://codepen.io/emilysbca/pen/GBRezJ
0
How to change the code below to improve the sorting procedure? I need to sort accurately those items listed in the dropdown content  but when I type letter b the word "About" will go first instead  of "Base" and "Blog". I attached the code below to let you (Experts) see the problem easily. I want here to sort perfectly as alphabetical order. Any help please!

<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1">
<style>
.dropbtn {
    background-color: #4CAF50;
    color: white;
    padding: 16px;
    font-size: 16px;
    border: none;
    cursor: pointer;
}

.dropbtn:hover, .dropbtn:focus {
    background-color: #3e8e41;
}

#myInput {
    border-box: box-sizing;
    background-image: url('searchicon.png');
    background-position: 14px 12px;
    background-repeat: no-repeat;
    font-size: 16px;
    padding: 14px 20px 12px 45px;
    border: none;
    border-bottom: 1px solid #ddd;
}

#myInput:focus {outline: 3px solid #ddd;}

.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-content {
    display: none;
    position: absolute;
    background-color: #f6f6f6;
    min-width: 230px;
    overflow: auto;
    border: 1px solid #ddd;
    z-index: 1;
}

.dropdown-content a {
    color: black;
    padding: 12px 16px;
    text-decoration: none;
    display: block;
}

.dropdown a:hover {background-color: #ddd;}

.show {display: block;}
</style>
</head>
<body>

<h2>Search/Filter Dropdown</h2>
<p>Click on the 

Open in new window

0
How to enable the movement of my html files in handlebars or .ejs? I have intended an html template in an .ejs file inside my node views and the slider does not move, another script that should move some numbers directly shows static without dynamism. How to solve this problem?



In my templating engine .ejs i can t see this 2 animations: (slider and animation numbers)

ejs slider

ejs animation
Hear is the code: https://github.com/casperverse/octoeffective/blob/tem/views/main/about.hbs

The slider and the animation numbers in html:

html slider and animation looks nice the move is great.

https://github.com/casperverse/octoeffective/blob/tem/public/about-us.html

I need use ejs this is the problem.
Somebody know how do this?
0
I' am writing a shell code to email my audit file produced at solaris 5.10.

Please let me know the mailx code to send the html file content as the email body.
0
I have an html form.
I have the following php script.
 
The  saveVisit function below is one record.
I could have 1 or up to 6 records.

I am executing php with ajax.
How do I create the html form fields to allow for easy handling of dynamic records?
Also the same applies for my php to allow for dynamically handling record in server.



        function processEachVisit(){
            //loop through each visit

            //execute saveVisit query

        };



        //function to save each visit.
        function saveVisit($dbconn, $providerID, $clientId, $visitStart, $visitEnd, $visitUnits, $visitMinutes, $visitActvities, $visitComments){
            $Query = 'INSERT INTO serviceRendered (clientId, visitStart, visitEnd) VALUES
                      ( $1, $2, $3 ) RETURNING id';

            $result = pg_query_params($dbconn, $Query, array(clientId, visitStart, visitEnd));

            $row = pg_fetch_row($result);

            return $row['0'];

        }

Open in new window

0
How can i save the coordinates in localstorage so that it shouldn't ask the users every time to allow GPS or Location and a button to clear the localstorage value so it can again ask for coordinates?

FYI: I am using Praytime JS Praytime JS to display Muslim prayer times but for each location i have to manually add latitude & longitude of that location.

Below is my code:
<script type="text/javascript" src="http://praytimes.org/code/v2/js/PrayTimes.js"></script>    
    
    <script type="text/javascript">
        function loadTable(position) {
            prayTimes.setMethod('MWL'); 
            var date = new Date(); // today
            var times = prayTimes.getTimes(date, [position.coords.latitude, position.coords.longitude]);
            var list = ['Fajr', 'Sunrise', 'Dhuhr', 'Asr', 'Maghrib', 'Isha', 'Midnight'];
    
            var html = '<table id="timetable">';
            html += '<tr><th colspan="2">'+ date.toLocaleDateString()+ '</th></tr>';
            for(var i in list)  {
                html += '<tr><td>'+ list[i]+ '</td>';
                html += '<td>'+ times[list[i].toLowerCase()]+ '</td></tr>';
            }
            html += '</table>';
            document.getElementById('table').innerHTML = html;
        }
    
        if (navigator.geolocation) {
            navigator.geolocation.getCurrentPosition(loadTable);
        }
    </script> 
    
    
    
    
    
    <script 

Open in new window

0
Paras as heading sections as main and sub levels

My input xml :

    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE topic
      PUBLIC "urn:pubid:doctypes:dita:topic" "topic.dtd">
    <topic id="topic_1" xml:lang="en-US" outputclass="Sec-Chapter">
      <title>Sec-Chapter</title>
      <body>
        <p outputclass="Title">Head Mapp</p>
        <p outputclass="A-Head">A-Head</p>
        <p>Some paragraph text</p>
        <p outputclass="B-Head">B-Head</p>
        <p>Some more paragraph text</p>
        <p outputclass="C-Head">C-Head</p>
        <p>Yet more paragraph text</p>
        <p outputclass="D-Head">D-Head</p>
        <p>Some creative paragraph text</p>
        <p outputclass="E-Head">E-Head</p>
        <p>Now, boing paragraph text</p>
        <p outputclass="F-Head">F-Head</p>
        <p>Finally, end</p>
      </body>
    </topic>

Open in new window


XSL template I have used for the heading level creation in DITA OT Epub plugin:

    <xsl:template match="*[contains(@class, ' topic/p ')]" name="topic.p">
    	<!-- To ensure XHTML validity, need to determine whether the DITA kids are 
    		block elements. If so, use div_class="p" instead of p -->
    	<xsl:variable name="topicatt">
    		<xsl:value-of select="@outputclass" />
    	</xsl:variable>
    	<xsl:choose>
    		<xsl:when test="$topicatt = 'A-Head'">
    			<h2><xsl:apply-templates /></h2>
    		</xsl:when>
    		<xsl:when test="$topicatt = 'B-Head'">
    			<h3><xsl:apply-templates /></h3>
    		</xsl:when>
    		<xsl:when test="$topicatt = 'C-Head'">
    			<h4><xsl:apply-templates /></h4>
    		</xsl:when>
    		<xsl:when test="$topicatt = 'D-Head'">
    			<h5><xsl:apply-templates /></h5>
    		</xsl:when>
    		<xsl:when test="$topicatt = 'E-Head'">
    			<h6><xsl:apply-templates /></h6>
    		</xsl:when>
    		<xsl:when test="$topicatt = 'F-Head'">
    			<h6><xsl:apply-templates /></h6>
    		</xsl:when>
    		<xsl:otherwise>
    			<p>
    				<xsl:call-template name="commonattributes" />
    				<xsl:call-template name="setid" />
    				<xsl:apply-templates />
    			</p>
    		</xsl:otherwise>
    	</xsl:choose>
    	<xsl:value-of select="$newline" />
    </xsl:template>

Open in new window


I am getting xhtml output using above template as:

    <!DOCTYPE html>
    <html xmlns="http://www.w3.org/1999/xhtml" xmlns:epub="http://www.idpf.org/2007/ops" xml:lang="en-us" lang="en">
    	<head>
    		<title>Heading</title>
    	</head>
    	<body class="Section" id="topic_1">
    		<section>
    			<p class="TitleTtl">Heading2</p>
    			<h2>A-Head</h2>
    			<p class="p">Some paragraph text</p>
    			<h3>B-Head</h3>
    			<p class="p">Some more paragraph text</p>
    			<h4>C-Head</h4>
    			<p class="p">Yet more paragraph text</p>
    			<h5>D-Head</h5>
    			<p class="p">Some creative paragraph text</p>
    			<h6>E-Head</h6>
    			<p class="p">Now, boing paragraph text</p>
    			<h6>F-Head</h6>
    			<p class="p">Finally, end</p>
    		</section>
    	</body>
    </html>

Open in new window


but I need output as `A-head` as `h2` main level section, `B-Head` as `h3` sub level section for `h2`, `C-Head` as `h4` sub level section for `h3`, `D-Head` as `h5` sub level section for `h4`, `E-Head` as `h6` sub level section for `h5`, `F-Head` as `h6` same level section as `h6` as shown below:


Open in new window

0
Cloud Class® Course: Python 3 Fundamentals
LVL 12
Cloud Class® Course: Python 3 Fundamentals

This course will teach participants about installing and configuring Python, syntax, importing, statements, types, strings, booleans, files, lists, tuples, comprehensions, functions, and classes.

how to click on F11 in javascript keyboard and mouse click,  focus set in F11.
0
Im wondering why the Meet Logo on the right of this page is overlapping the left text a little?  I have it set as img-responsive.

https://www.gopherstateevents.com/results/cc_rslts/cc_rslts.asp?sport=Nordic%20Ski&meet_id=454&rslts_page=overall_rslts.asp&show_indiv=n

Thanks!
0
I'm getting the console error: Failed to set referrer policy: The value '' is not one of 'no-referrer', 'no-referrer-when-downgrade', 'origin', 'origin-when-cross-origin', 'same-origin', 'strict-origin', 'strict-origin-when-cross-origin', or 'unsafe-url'. The referrer policy has been left unchanged.

I'm sorry I dont have an url to show but it is a private page.
0
I am using md-card in md-grid-list to show different flyers. I want to drag and drop these md-cards in grid. I am working on someone's code and unable to get the correct thing. I have tried to use HTML5's drag and drop but could not do it properly.

What I want to do is to drag and drop my one md-card from one place to another and same time another card should take that place.

Below is my code:

RasterComponent.html:

<md-grid-list class="default-grid" cols="3" rowHeight="300px" gutterSize="8px">
  <md-grid-tile *ngFor="let tile of this.tiles" [colspan]="tile.cols" [rowspan]="tile.rows" >
    <md-card *ngIf="tile.flyer == '-1'" class="default-card-add">
      <button md-mini-fab (click)="addNewFlyer()" id="create-button" [routerLink]="['/rullko/flyer/AddWerbedata']">
        <md-icon>add</md-icon>
      </button>
    </md-card>
    <md-card *ngIf="tile.flyer !== '-1'" class="default-card-flyers" draggable="true" (dragstart)="dragStart($event)" (dragover)="allowDrop($event)" (drop)="drop($event)">
      <div class="container">
        <div class="left">
          <h4> {{ this.flyers[tile.flyer].Filiale }}{{ this.flyers[tile.flyer].ArtNr }} </h4>
          <h5> {{ this.flyers[tile.flyer].Produktname }}</h5>
          <h5> {{ this.flyers[tile.flyer].Werbetext }} </h5>
          <h4> {{ this.flyers[tile.flyer].EUR_VK }} &euro;</h4>
          <h4> {{ this.flyers[tile.flyer].VK_Einheit }}</h4>
        </div>
        <div class="right">
          <img 

Open in new window

0
Hi all,

My code currently loops through my table and displays results of teachers in separate divs displayed across each page. Corresponding to each teacher, there is a send email button, which links to php mailer and also triggers off a progress bar. This is all done in a pop modal specific to each teacher.

My issue is that my progress bar is only working (i.e. increasing) for the entry (teacher) who is at the top of my table, and not working for any of the the other teachers in the table. The progress bar isn't actually linked to the php mailer function - I just set it to last the approximate length of time it takes to send an email via my server (bit of a cheat but hey ho..)

Can anybody think why the progress bar is only working for the first teacher within the table? Any help much appreciated.

Thanks,

I have attached my code here,

<?php 
	$i = 0; // sequence number to identify modal id
	?>

Open in new window



....

<!--// Modal start //-->
<div class="modal fade" id="exampleModal-<?php echo $i?>" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel-<?php echo $i?>" aria-hidden="true">
	<div class="modal-dialog" role="document">
		<div class="modal-content">
			<div class="modal-header">
				<h5 class="modal-title" id="exampleModalLabel-<?php echo $i?>">A Message to <?php echo h($teacher['firstname']); ?></h5>
				<button type="button" class="close" data-dismiss="modal" aria-label="Close">
					<span aria-hidden="true">&times;</span>
		

Open in new window

0
go to this link to see my project :D

Click Here


i need help to upgrade my project :(

you will see everything about my project in  the link :D
0

HTML

59K

Solutions

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.