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

Hello all,

Since the <center> tag is considered obsolete in HTML, I am wondering how to then align a set of radio buttons with a <table> document. I have tried using CSS here with the following:

radiobutton
{
text-align: center;

}

But instead got a result of the click-section centered themselves, but not the labels that precede the buttons. The radio-buttons themselves are associated with an id tag. Should I align them using the tag-reference instead?

What are your suggestions?
0
JavaScript Best Practices
LVL 12
JavaScript Best Practices

Save hours in development time and avoid common mistakes by learning the best practices to use for JavaScript.

I have a relatively simple page that renders differently depending on whether the page is located on the web server or on the browsing system as a local file.  The HTML file being rendered is identical in both cases.  The problem appears to occur only in Firefox.  IE renders correctly for both situations.

While it is true that embedding styles in a link is not considered "best practice", the only links where this particular styling are desired are at the bottom of the page.

The server is Apache, and I have checked that the HTML being received (appears to be) the same as the HTML file on the host.

What is the issue causing this rendering difference?

 Rendering difference
<HTML>
<HEAD>
</HEAD>
<BODY BGCOLOR="#FFFFF0">

<!-- Site subsection and site global nav table -->

<TABLE WIDTH="100%" BGCOLOR="DDAA77" BORDER="0" CELLSPACING="0" CELLPADDING="2">
 <TR><TD COLSPAN="3">
   <CENTER>
     <FONT FACE="ARIAL,HELVETICA,SWISS,VERDANA"><A HREF="index.html" style="text-decoration:none; border-bottom: 1px solid #DDAA77; color: #000000">This Page</A></FONT>
   </CENTER>
  </TD></TR>
 <TR>
  <TD WIDTH="33%">
   <CENTER>
        <FONT FACE="ARIAL,HELVETICA,SWISS,VERDANA"><A HREF="index.html" style="text-decoration:none; border-bottom: 1px solid #DDAA77; color: #000000">That Page</A></FONT>
   </CENTER>
  </TD>
  <TD WIDTH="34%">
   <CENTER>
    <FONT FACE="ARIAL,HELVETICA,SWISS,VERDANA"><A HREF="index.html" style="text-decoration:none; border-bottom: 1px solid 

Open in new window

1
On our website we have a common footer for all pages. So the footer is defined once and called in each html page. The code for this is given below.
Now my question is will googlebot consider the contents of footer ? Because when I checked in serach consol and tried to fetch as google, it did not show me the contents.


**Footer opt1**
=================================================== -->
        <div id="footer_offer"></div>

        <!-- Scroll to top -->
        <a href="#" class="scroll-top"><i class="fa fa-angle-up" aria-hidden="true"></i></a>

        <!-- jQuery first, then Popper.js, then Bootstrap JS -->
        <script src="js/jquery.min.js"></script>
        <!-- Header - Footer Script -->
        <script>
                  $("#header").load("includes/header.html");
            $("#footer_offer").load("includes/footer.html");
        </script>
1
I am using the script below to verify that the user enters the correct information on a registration page. Everything works FINE per individual field, and it displays an error message if there was an error entering the field information. The problem is that there are 5 different INPUT FIELDS, and the user might enter 3 correct and 2 incorrect, BUT IF THE USER GOES BACK AND CORRECT 1 FIELD (OF THE PREVIOUSLY 2 INCORRECT), and then submit the form THE FORM IS SUBMITTED WITH 1 FIELD ERROR.  How can I solve this issue NOT TO BE ABLE TO SUBMIT FORM IF AN ERROR ON FORM

Tnx, I have been trying to figure this for 5 days already :-(
I thought of a hidden field with value 0 for correct or 1 for incorrect, but that wouldn't solve the problem according to my previous example

I am using HTML and an external PHP to verify values

<script type="text/javascript">
    function ajaxFunction(disp_div) {
        var httpxml;
        try {
            // Firefox, Opera 8.0+, Safari
            httpxml = new XMLHttpRequest();
        } catch (e) {
            // Internet Explorer
            try {
                httpxml = new ActiveXObject("Msxml2.XMLHTTP");
            } catch (e) {
                try {
                    httpxml = new ActiveXObject("Microsoft.XMLHTTP");
                } catch (e) {
                    alert("Your browser does not support AJAX!");
                    return false;
                }
            }
        }

        function stateChanged() {
    

Open in new window

0
I want to create a standard menu of options as it were, so that by clicking on a specific area, number, phrase on the menu, that it will trigger a .bat or powershell script to run.
I was hoping for something simple I could copy and paste on any computer, with the expectation that the paths to run the .bat or powershell scripts will have standard locations.
Perhaps and html file (like a web page file), where I could run each script would work, where I could manually add any new scripts etc..
0
Hello

I think I need an old fashioned table to do this.  It's for a website that is NOT responsive.  They need a very structured two column list of  faculty members.  All lined up right and left as in the attached pdf.

So basically it look as if it will be a table (not div) that has two columns -- but broken with headers that span both columns.

I don't want to get complicated with this and use any css tricks  to create the two colums or fancy html.  I think a table will do it. But am looking for your advice and suggestions.  I WILL need css to style the text and headers, though...

Thanks for your help, suggestions and solution.

Rowby
School-EE-a.pdf
0
I have a regular html page with some JavaScript on a button click event.

This is my current code on my page:

<!DOCTYPE html>
<html>
<head>
	<title>Test Page</title>    
    <style type="text/css">
        body {
            padding: 30px;
            font-family: Arial;
        }
    </style>
   <script type="text/javascript">
                  
       function TestFunction() {

           // fiscalstartvar is 07/01/FiscalYear-1
           // fiscalendvar is 06/30/FiscalYear

           // save value of fiscalyear hidden field in variabl
           var fiscalyearvar = 2019;
           var vartodaysdate = "09/16/2018";
           var fiscalyearminusonevar = fiscalyearvar - 1;
           var fiscalstartvar = "07/01/" + fiscalyearminusonevar;
           var fiscalendvar = "06/30/" + fiscalyearvar;

           if (fiscalstartvar <= vartodaysdate && fiscalendvar >= vartodaysdate) {
               var iscurrentfiscalyearvar = "true";
           }
           else {
               var iscurrentfiscalyearvar = "false";
           }
           // display on div
           document.getElementById("DivIsCurrentFiscalYearVar").innerHTML = iscurrentfiscalyearvar;
       }       
    </script>
</head>
<body>
    <input id="Button1" type="button" value="Button1" onclick="TestFunction();"/>  
    <br /> 
    <Div id="DivIsCurrentFiscalYearVar"></Div>
</body>
</html>

Open in new window



When I click the button, In the if statement this, variable iscurrentfiscalyearvar  currently returns "false"
but when FiscalYear is 2019 it should return true.

I think i need  my issue is in this line.
if (fiscalstartvar <= vartodaysdate && fiscalendvar >= vartodaysdate) {

Since those variables hold strings that are dates in order to do a less than equal to comparison do i have to convert them to datetype somehow.
Anyone know the syntax or how I fix my example?
0
I need some HTML guidance - probably very simple to fix what I am doing wrong.  I am trying to format an email in Microsoft Flow and have the following scenario:

In Flow, I calculate the difference between two numeric fields to send out in the email.  If the difference is negative, i want to format the fields by enclosing it in parenthesis but also want it to be in red, otherwise green.  The email formats a table of both fields and calculated values.  The table has two columns, the left for a description and the right for values.

i know that the detection of negative values works fine as the display was easy to format with () and it is showing up that way.  However, I cannot get the color to appear.

Flow details - if the value is negative, I do a substring() to add () but then set a string variable - let's call it colorname - to red else green if the value is positive.  The HTML code then looks like this (modified for this question):

<tr>
<td>Description of value</td>
<td align=right> valuestring</td>
</tr>

Ant that works perfectly without the color.  If I modify the td to add color it fails

<td align=right; color=colorname> valuestring</td>    I get neither color nor right alignment. I also tried these variants

<td {align:right; color:colorvale;} valuestring</td>
<td align;right; color:colorvalue;} valuestring</td>
<td {text-align:right; color:colorvalue;} valuestring</td>

and probably some others I am forgetting.  Mostly the results have been …
0
https://puls.com/tv-mounting/select-tv-size

do u know where I can purchase the template like above website ?
0
I am using 3rd party Search and I have more than 1000 HTML pages. The full HTML content is saved in database in separate rows.
In search results I display the page title from a Db field and some HTML content of 200 words. Everything works fine.

The Problem:
Some HTML pages (stored in db) have inline CSS and JS code like below:

<div class="content">
    <div class="field field-name-body field-label-hidden"><div class="field-items"><div class="field-item even"><style>
                        #dropBox {
                          border: 3px dashed #0087F7;
                          border-radius: 5px;
                          background: #F3F4F5;
                          cursor: pointer;
                        }

                        #dropBox {
                          min-height: 150px;
                          padding: 54px 54px;
                          box-sizing: border-box;
                        }

                        #dropBox p {
                          text-align: center;
                          margin: 2em 0;
                          font-size: 16px;
                          font-weight: bold;
                        }

                        #fileInput {
                          display: none;
                        }
                      </style>
					  
					  
  <script type="text/javascript">
    jQuery(document).ready(function(){
	
	 if (jQuery(&#039;#myline-check&#039;).is(":checked")) {
                    

Open in new window

0
Big Business Goals? Which KPIs Will Help You
Big Business Goals? Which KPIs Will Help You

The most successful MSPs rely on metrics – known as key performance indicators (KPIs) – for making informed decisions that help their businesses thrive, rather than just survive. This eBook provides an overview of the most important KPIs used by top MSPs.

Hello experts, can someone help me to find a solution for my problem

I have used fpdf to create a pdf file. I used html write function to style my text. However, i cannot justify my text like how multicell do when it breaks to new line. I have stuck for this problem for a few days and need a solution immediately .

Can someone look up for my code:

function WriteHTML($html)
    {
		
		//$this->Write(5,stripslashes(txtentities($e)),'FJ');
        //HTML parser
        $html=str_replace("\n",' ',$html);
        $a=preg_split('/<(.*)>/U',$html,-1,PREG_SPLIT_DELIM_CAPTURE);
        foreach($a as $i=>$e)
        {
            if($i%2==0)
            {
                //Text
                if($this->HREF)
                    $this->PutLink($this->HREF,$e);
                elseif($this->ALIGN=='justify')
                    $this->Cell(0,5,$e,0,1,'C');
                else
                    $this->Write(5,$e);
            }
            else
            {
                //Tag
                if($e[0]=='/')
                    $this->CloseTag(strtoupper(substr($e,1)));
                else
                {
                    //Extract properties
                    $a2=explode(' ',$e);
                    $tag=strtoupper(array_shift($a2));
                    $prop=array();
                    foreach($a2 as $v)
                    {
                        if(preg_match('/([^=]*)=["\']?([^"\']*)/',$v,$a3))
                            

Open in new window

0
Hi,

I wanted html page to be open in excel in browser or downloadable.

Below code placed in html head tag is not working.
 <meta http-equiv="content-type" content="application/vnd.ms-excel;" charset="UTF-8">

Please advise.

Regards,
Dinesh Bali
0
Hello,
I am trying to create popups from image maps somewhat like the solution described here:
https://www.experts-exchange.com/questions/21436174/Javascript-popup-window-from-Image-Map.html#a14077290

...except
  • I don't want a browser title bar and URL to display - I want it to be more like a tooltip in appearance and positioning, except able to display the contents of a referenced .htm file.
  • I want the window to close when I click off of it
  • I want the window to be resizeable

I am a tech writer, not a coder, so I'm sorry if these things seem easy and obvious. I have found many sets of instructions for making image maps on the web, but they are usually for "jump" links, not for popups; or if they do use popups, the popup text is very short and included in the image map instead of in another .htm file and referenced.

Ideally, I would like the image map to be responsive as well ...I've been having the same problem with searching for this topic - I've found lots of info on making responsive image maps, but not image maps with popups that reference separate .htm files. :)
Thanks in advance.
0
Dear experts

I would like to export the result below to a html format is this possible? Would like to know how. Thanks alot

select A.*, DataFileSizeMB + LogFileSizeMB as TotalSize
from (
SELECT
    DB.name,
    SUM(CASE WHEN type = 0 THEN MF.size * 8 / 1024 ELSE 0 END) AS DataFileSizeMB,
    SUM(CASE WHEN type = 1 THEN MF.size * 8 / 1024 ELSE 0 END) AS LogFileSizeMB
FROM
    sys.master_files MF
    JOIN sys.databases DB ON DB.database_id = MF.database_id
GROUP BY DB.name
) as A
ORDER BY DataFileSizeMB DESC

Open in new window

0
I am running a Python CGI script from web browser to collect some data from a network device and at the moment the network device ip address is static.

  <ul>
          <li><a href="http://172.17.0.2/cgi-bin/info.cgi" target="_blank">Device Facts</a></li>
          <li><a href="http://172.17.0.2/cgi-bin/arp.cgi" target="_blank">Device Arp Table</a></li>
          <li><a href="http://172.17.0.2/cgi-bin/mac.cgi" target="_blank">Switch MAC Table</a></li>
          <li><a href="http://172.17.0.2/cgi-bin/lldp.cgi" target="_blank">lldp Neighbors</a></li>
         </ul>

Open in new window


Here is the CGI script

#!/usr/bin/python
print "content-type: json\n\n"
import json
from napalm import get_network_driver
driver = get_network_driver('ios')
hub2 = driver('10.0.0.120', 'admin', 'admin')
hub2.open()

ios_output = hub2.get_facts();
print json.dumps(ios_output, indent=5);
hub2.close()

Open in new window


Now i want the ip address to be user input, which then used as a variable in above mentioned python code. as an ip address.

Thank you
0
How to invoke the JavaScript function from code behind (c# / controller)?

In MVC, Controller - I will have to enable or disable the text box in the Controller.

In c#, i will have to fetch the HTML element id.

Then based on the condition result loaded from database, I will have to enable or disable the Textbox element id.

if ($("input:radio[name='RadioButtonSelection']:checked").length > 0) 
{
            var isChecked = document.getElementById("RadioButtonSelectionYes").checked;

            if (isChecked == true)
            {
                document.getElementById('ShowTextBox').disabled = false;
                
            } else if (isChecked == false)
            {
                document.getElementById('ShowTextBox').checked = true;
                document.getElementById('ShowTextBox').disabled = true;
            }
}

Open in new window

0
BBpress is squishing the replies from an SMF import.  Which seems to be confined to the initial questions in a thread only - Here is a screenshot

https://gyazo.com/6931713e036a97cad6fac7f29a8689ba

Please help me to un-squish the initial question and still be able to see this on a tablet and a smartphone.

Thanks
0
We need to access our Azure Website through a html file located locally on client computers. The html file is located in specific folder with a unique-named subfolder on each computer running the html file.

But we get a cross browser error..

How can we setup Azure CORS to allow this, to access Azure from a local file on a dynamic changing URL? (this path is different from each computer)
So this has to work with a wildcard, because the subfolder names vary.

At the moment we have set CORS to allow all origins (*) which is not the best solution.
0
In a SharePoint list, I have fields that are hyperlinks to images stored in SharePoint as well.  I am using Microsoft Flow to format emails and want to see those images in the email (the images are essentially icon shapes).

When i look at the SharePoint list, they all display as correct images.  However, I can't seem to get that image to display properly in the HTML formatted email.

Let's say the field name is imagename.  If I use that name in the email, a text URL displays.  So I tried <img src="imagename"..> and i got an image alright, but it could not be displayed.  Is this possible a permissions error because of no access to SP or something in the HTML formatting, and how can I tell?

What is another way to accomplish this?
0
Angular Fundamentals
LVL 12
Angular Fundamentals

Learn the fundamentals of Angular 2, a JavaScript framework for developing dynamic single page applications.

I am formatting HTML email within Microsoft Flow.  I have fields from a SharePoint list that are currency fields, but Flow doesn't support currency and the fields have float type.  I can easily get them to an integer which truncates the two decimals or to a string which displays way too many.

My question is how to do this using HMTL code?  CSS and java script look like they may work but I don't want to depend on recipients to have it set up properly/.  Ideally I want to round to two decimal places (optional for currency fields), then format in US$.  

One thought was to multiply the value by 100, convert to type integer, then use substring() to chop it up into whole number and decimal pieces, then concatenate with $ but that woudn't handle comma delimiters.  And I have about ten such fields to email, so it's a lot of Flow code if not HTML code to accomplish.

Hope you have some suggestions.
0
I have checkboxes that i want to align properly as you can see in pic attached i have 2 checkboxes not lining up the "DDS" & "RDH", I would like them to line up even when screen changes size.
Capture3.PNG
checkbox_css.txt
checkboxes.txt
0
How to get the table Dynamically ?

<?xml version="1.0" encoding="utf-8" ?>
<j:jelly trim="false" xmlns:j="jelly:core" xmlns:g="glide" xmlns:j2="null" xmlns:g2="null">
<div >
<TABLE id="storage_file_share"  BORDER="0" ></TABLE>
</div>
<g:evaluate var="jvar_user" expression="gs.getUserID();" />
<input id="sysparm_user_id" type="hidden" value="${jvar_user}" />
	
<!--	<g:evaluate var="jvar_user_role" expression="gs.hasRole('admin');" />   //Earlier exclude only admins.
-->
	
<g:evaluate var="jvar_user_role">
	// Exclude admins and ITIL users.
		var user_role = '';
		if(gs.hasRole('admin') || gs.hasRole('itil')) 
		  user_role = true;
		else
		user_role = false;
		user_role;
	</g:evaluate>
	<input id="sysparm_user_role" type="hidden" value="${jvar_user_role}" />
<br/>
<table align="center">
    <tr align="center">
       <td><button onclick="addMain()">OK</button></td>
    </tr>
</table>

</j:jelly>

Open in new window

0
In this example I try to read and save the textarea data with HTML content (tables) the code saves text for example: "Ok" this text if it is saved but it contains HTML tables the changes of the editor are not saved inside the database.

I think the problem is to send HTML content with tables by POST and save it as special characters.

The example is simple, show text in the editor with tables, edit and save the changes in the database.


///////////////// SCRIPTS

<script> ///////////////// SAVE DATA
	$(document).on('ready',function(){
	$('#btn-send').click(function(){
       var content = tinyMCE.activeEditor.getContent({format : 'raw'});
       $('input[name=datatext]').val(content);
       tinyMCE.triggerSave();
		var url = "update.php";                                      
		$.ajax({                        
		   type: "POST",                 
		   url: url,                    
		   data: $("#form").serialize(),
		   success: function(data)            
		   {
                        M.toast({html: data})
		   }
	       });   
	  });
	});
</script>

<script> ///////////////// LOAD DATA ON EDITOR
    document.addEventListener('DOMContentLoaded', function() {
    var elems = document.querySelectorAll('select');
    var instances = M.FormSelect.init(elems, options);
  });
    $(document).ready(function(){
    $('select').formSelect();
    $('body').on('change', '#menu_template', function() { 
	       $('input[name=templates_id]').val($(this).val());
	       

Open in new window

0
Hi,

I am developing an html5 map that has regions, which I would describe as irregular polygons. It is a country map with provinces as regions. I would like to achieve a zoom effect which I am finding difficulty with:
I would like to implement a zoom effect on the map, such that when I click on a province, the map zooms into the province, and the province now fills the entire canvas/area that the country occupied. I believe that means I need to find the furthest top, bottom, left & right vertices/coordinates of the selected province, find their distances from the edge of the canvas in order to calculate the zoom proportion and redraw the selected province to scale. That is the procedure I used with Adobe Flash (ActionScript). But I now need to redo this using HTML5 & JavaScript.

I can find the selected map (region), but I cannot find a way to find the vertices so that I can work out the scale with which to redraw the region.

Thanks
0
I have implemented the solution to call the c# function at the client side by doing the embed of the c# dll in <object>

It was working fine. But, gives run time error while trying to access from the new system.

The object call is: window.<Object Name Defined in the html script>.<Funtion / Method Name in the .dll>

Getting the following error;

0x800a01b6 - JavaScript runtime error: Object doesn't support property or method

The implementation done initially in VS2010 and later upgrated to VS2015.


Thanks in advance.
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.