[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x

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

say, when there is a label/span/anchor next to an image/icon , what is the best way them to align them vertically, so that both are centered vertically.
for example , I have anchor tag and a input type of button next to each other in a div, like below, how can i align them vertically centered?

<div>
    <a href="" ...>
     <input type =button....>
</div>
0
CompTIA Network+
LVL 12
CompTIA Network+

Prepare for the CompTIA Network+ exam by learning how to troubleshoot, configure, and manage both wired and wireless networks.

   <span class="text-light text-uppercase">Value<i id = "value" onclick="editDealDetails(this.id,<?=$v_item['CONTACT_NAME']?>);" style="margin-left:5px;" class="fa fa-wrench"></i></span>

Open in new window



Uncaught SyntaxError: missing ) after argument list

Open in new window


why am i getting this error with this line ?
0
At vultr.com I ne to lock UDP port 389... I guess they receive lots of static from hackers stealing information from there clients! I have the procedure to do this from Windows firewall but I want to use a 3rd party app. I need a xml script to change rules! I tried looking but everyone hates the block of MS's protocol but vultr loses money due to clients losing important information in the cache of the protocol. They want the port off...

I never wrote xml I have a layout for basic coding
<element>
 <![CDATA[-XML CODE HERE
 <script>a=1;</script>]]>
</element>

I have a convert from html to xml as well.
<element>
<xmltag><![CDATA[HTML CODE HERE]]></xmltag>
</element>

Email sent by vultr.com

Dear Customer,

Recent network security audits have detected some issues on your instances. Please review the following reports and help us to ensure the security of our network:




== Insecure LDAP servers ==
LDAP can be abused by attackers to conduct DDOS attacks against third party machines. We suggest that you not expose LDAP to the internet, and use a firewall to ensure that it cannot be accessed by third parties.

For Linux machines, please add firewall rules to block port 389 via UDP:

iptables -I INPUT 1 -m udp -p udp --dport 389 -j DROP

On Windows machines, we'd suggest adding a similar firewall rule to block port 389:
1) Click Start, type 'wf.msc'
2) Right click 'Inbound Rules', select 'Add Rule'
3) Select 'Port' and click Next
4) Select UDP, …
0
How do I have a table appear directly ontop of another table in browser after the user has clicked the submit button so only the resulting table is shown? I need to move the existing table from below only to appear after the submit button where the first table is situated.

EDIT: Am looking for solution where the resulting table appears after submit button. It cannot appear as a dialog/pop-up but only directly on the page. The resulting table is located in the same place where the first table is. Only resulting table must show.  

index.html
app.js
0
I try to automate some handling on a webpage. I have read all the articles I could find, but it just does not fit.

This is partial the webpage:

Transaction page
This is the HTML beneath:

<div class="rgWrap rgArrPart2">
<a title="Go to Next Page" href="javascript:__doPostBack('ctl00j','')">Volgende</a>
<input type="submit" name="ctl003" value=" " title="Next Page" class="rgPageNext" /> 
<a title="Go to Last Page" href="javascript:__doPostBack('ctl004','')">Laatste</a>
<input type="submit" name="ctl005" value=" " title="Last Page" class="rgPageLast" />

Open in new window

"Volgende" en "Laatste" are Dutch for "Next" and "Last".

The code which I try to build needs to click on the "Volgende" so I get the next page with records.

I have tried the following code:

GetElementById():
 
   IE.Document.GetElementById("ctl00j").Click()

    GetElementsByTagName() and filter by value:

    Set oInputs = IE.Document.GetElementsByTagName("input")
    For Each elm In oInputs
        If elm.Value = "Go to Next Page" Then
            elm.Click
            Exit For
        End If
    Next

Open in new window

   GetElementsByClassName():

    For Each elem In IE.Document.GetElementsByClassName("rgPageNext")
        If elem.innerText = "Go to Next Page" Then
            elem.Focus
            elem.Click
        End If
    Next

Open in new window

   GetElementsByTagName() and filter by class attribute:

    For Each a In IE.document.getElementsByTagName("a")
        If a.GetAttribute("class") = "rgPageNext" Then
            a.Click
            Exit For
        End If
    Next

Open in new window

   GetElementsByTagName() and filter by title attribute:

    For Each a In IE.document.getElementsByTagName("a")
      If a.getAttribute("title") = "Go to Next Page" Then
        a.Click
        Exit For
      End If
    Next

Open in new window

The first approach gives this error message:

    Script: K:\temp\TT\mftt.vbs
    Line: 37
    Char: 2
    Error: Object required: 'IE.Document.getElementByID(...)'
    Code: 800A01A8
    Source: Microsoft VBScript runtime error

Open in new window

The other attempts are not giving error messages but also no reaction on the link to click. I'm missing here the OnClick event. With other links in this project the OnClick event was present. I can't change the HTML, so I'm stuck.

UPDATE1: I have added the script file so far. I have not attempt to build the logic. First aim is to read all the fields and click the right buttons. If that is successful I will build the iteration process,
UPDATE2: due to privacy reasons I can't give you access to the site. I have added the DOM from the page and removed any names.
mftt2.txt
DOM.txt
0
Hi,

Can someone assist please, i am having issues with trying to customize the this table. This table needs to be imported by a text file of shift timings, i got it to make the table but it looks abit grey.

Link: Table Design
Link: Example

The example shows both a short version and a bigger version, can you help to change the layout to look similar please? Also, how do i get the smaller version setup.

Index.php
<?php
header("Content-type: text/html");
echo "<html>
<body>";
 
$file = fopen("day.txt","r") or die("Error");
?>
 
<table border=“1”>
	<tr>
		<th>Date</th>
		<th>Monday</th>
		<th>Tuesday</th>
		<th>Wednesday</th>
		<th>Thursday</th>
		<th>Friday</th>
	</tr>
	
<?php
 
while(($row = fgets($file)) != false) {
	echo "<tr>";
	$col = explode(',',$row);
	
	foreach($col as $data) {
			echo "<td>". trim($data)."</td>";
	}
	echo "</tr>";
}
?>
 
</table>
</body>
</html>

Open in new window


Text file: day.txt
 ,  Sub1a |  Sub1b  , Sub2a | Sub2b , Sub3a |  Sub3b  , Sub4a | Sub4b ,  Sub5a |  sub5b   
01 , 07:00  | 13:00 , 08:00  | 12:00 , 09:00  | 15:00 , 10:00  | 13:00 , 012:00  | 13:00 
02 , 07:00  | 13:00 , 08:00  | 12:00 , 09:00  | 15:00 , 10:00  | 13:00 , 012:00  | 13:00 
03 , 07:00  | 13:00 , 08:00  | 12:00 , 09:00  | 15:00 , 10:00  | 13:00 , 012:00  | 13:00 
04 , 07:00  | 13:00 , 08:00  | 12:00 , 09:00  | 15:00 , 10:00  | 13:00 , 012:00  | 13:00 
05 , 07:00  | 13:00 , 08:00  | 12:00 , 09:00  | 15:00 , 10:00  | 13:00 , 012:00  | 13:00 

Open in new window

0
My web page has code that is reaching out to google server and I want to copy this CSS code and put it on my web server and change the code so that it now points to my server to get the CSS code.

This is the code:

<link href="http://fonts.googleapis.com/css?family=Source+Sans+Pro:200,300,400,600" rel="stylesheet" type="text/css">

I save the code to a .css file and put it on my server then i change the above code on my webpage to this:

<link href="css/google-font.css" rel="stylesheet" type="text/css">

the font on the page is not looking correctly at this point and i want to know how to fix this.

Thanks in advance.
0
Hi Guys,
I have a web application asp.net mvc.
I would like to know if is it possible to upload files automatically from source path on the hard drive:
Let me give you an example:

Lets say I have this these code:
and I return 3 paths of img source and created them on the dom:
 for (let i = 0; i < files.length; i++) {
            $("#ImagesReturn").append('<img style="display:none" src="' + files[i] + '"/>')
        }

Open in new window


Here I got the html on the dom:
 <img style="display:none" src="D:\FIles_test_for_new_viewer\AddPages\2.PNG">
<img style="display:none" src="D:\FIles_test_for_new_viewer\AddPages\1.PNG">
<img style="display:none" src="D:\FIles_test_for_new_viewer\AddPages\3.PNG"></div>

Open in new window


now what I want to do is to upload these 3 paths to the server automatically:
Like loop:
var listOffiles = $("#ImagesReturn img");
        for (let i = 0; i < listOffiles.length; i++) {
            //here I would like to get the [b]files[0][/b] like I click on <input type="file">
        }

Open in new window


There is a way to do something like that? if not please let me know your ideas.



Thank you.
0
hi..my name is massimiliano...i need to make and app in PHP that recives udp packet (form a third part application) and send it to another php or html file that print the data send in real time.

i create the server that it should receive an udp message and extract the content into the variable $output
<?php
             
       set_time_limit(0);   
        $socket = socket_create(AF_INET, SOCK_DGRAM, SOL_UDP);
        socket_bind($socket, "127.0.0.1", 16516);    
    
        for( ; ; ){
               socket_recvfrom($socket, $packet, 1500, 0, $from, $port);
               $output = "MSG Ricevuto : $packet "; 
               echo "$output " ;
               
                socket_sendto($fp1, $output, strlen ($output), 0, $from, $port);
               //i think taht whit socket_sendto(...) i can send the message to my other file
        }
       // close socket
        socket_close($socket);
?>

Open in new window

i try to make this file to print the data but it does not work..
<?php

 $fp1 = fsockopen("udp://127.0.0.1", 16516, $errno, $errstr);

 if (!$fp1) {
           echo "ERROR: $errno - $errstr<br />\n";
        }else{

        socket_recvfrom($fp1, $packet, 1500, 0, $from, $port);
        echo "stampa : $packet";
 }
?>

Open in new window


someone can help me to make the part that print the data on browser? i need that the data are update when arrive a udp packet from the server...my thirs part app send packet UDP every second

thaks to everyone

Massimiliano
0
Trying to add a right margin (to my first button) so as to present 2 buttons in a cleaner manner that have a pull-right bootstrap class on them ... the pull right seems to remove all margins is there a way around this?

<a href="rev_logout.php" 	class="btn btn-danger navbar-btn pull-right " 	role="button">Log Out</a>
	   <a href="inventory.php" 	class="btn btn-info navbar-btn pull-right" 		role="button">Home</a>

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.

Hi Experts,

onchange for select on jsx file fails.  see below the JSX code

export default class Results extends Component {
  constructor(props) {
     super(props);
     this.chooseSize = this.chooseSize.bind(this);
  }

chooseSize (e) {
    console.log("chooseSize  --> event fired");
    console.log("event value => " + e);
   this.props.actions.changeThumbnailSize(e.value)
  }


render () {
  return (
<div>
 <select value={this.props.thumbnailsize} onChange="chooseSize(this)">
                           <option value={0}>Descriptive</option>
                           <option value={.5}>Small</option>
                           <option value={.75}>Medium</option>
                           <option value={1}>Large</option>
                  </select>

</div>)};

Open in new window


Please help in resolving this issue.

I had tried using arrow function then it was throwing error like missing babel plugins choose properties.  Hence i made a simple javascript functions.  it not calling the function choose size.  Please help me in fixing this issue.

With Many thanks,

Bharath AK
0
www.magickitchen.com/catalog.html - I have this white space at the bottom of every page, and I can't figure out why. It doesn't bother anyone but me, but it bothers me a lot.

Why??
white-space.JPG
0
I created a modal dropdown form with four dropdown lists, with the fourth dropdown containing a link to a document to display once user clicks the submit button. All four dropdowns work fine, however when clicking the submit button the document does not display. The form simply continues to display, log indicates 'Cannot read property '0' of undefined'.. Any help is appreciated.

var selectedOptions = {};

        $('#link1').on('change', function () {
            var a = $(this).val();
            selectedOptions['1'] = a;
            selectedOptions['2'] = a;
            selectedOptions['3'] = a;
            if (a !== '') {
                for (var i = 0; i < dataSecondSelect[a].length; i++) {
                    $('#link2').append($("<option></option>")
                            .attr("value", dataSecondSelect[a][i])
                            .text(dataSecondSelect[a][i]));
                }
            }
        });

        $('#link2').on('change', function () {
            var a = $(this).val();
            selectedOptions['1'] = a;
            selectedOptions['2'] = a;
            selectedOptions['3'] = a;
            if (a !== '') {
                for (var i = 0; i < dataThirdSelect[a].length; i++) {
                    $('#link3').append($("<option></option>")
                            .attr("value", dataThirdSelect[a][i])
                            .text(dataThirdSelect[a][i]));
                }
            }
        });
        

Open in new window

0
Escaping a Character.  I have a database with the name: Ç in it. It is in a Turkish name.  That name will not return because I think the C is a special Character.  What Character is that and how do I find special HTML code for it?
0
I've created an accordion with anchor links, my issue is how can I trigger the javascript to open the active accordion panel when the anchor link is selected.

<script>

    $(function() {
    $('a[href*="#"]:not([href="#"])').click(function() {
    if (location.pathname.replace(/^\//,'') == 
    this.pathname.replace(/^\//,'') && location.hostname == this.hostname) {
      var target = $(this.hash);
      target = target.length ? target : $('[name=' + this.hash.slice(1) 
    +']');
      if (target.length) {
        $('html, body').animate({
          scrollTop: target.offset().top
        }, 1000);
        return false;
      }
    }
    });
    });
</script>

Open in new window


    <div class="Test">
        <a href="#Link 1st">A</a>
    </div>

   <button class="accordion"><strong><a id="Link 1st"></a>Link 1st</strong> 
   </button>

   <div class="panel"><br />
     <H4>Link 1</H4>
   </div>

Open in new window

0
Hey all I am using RFT in order to automate a page on a Pega website page. However, the automation doesn't seem to be able to fire off the change event of the input that I am inserting a string of text into. This input box seems to be located inside an iframe and perhaps this is the reason why its not firing the onchange event when losing focus on that input box?

RFT does use Selenium in their program to interact with the web page.

The html of the input box:

<input 
    data-id="204083727717650" 
    data-ctl="["TextInput"]" 
    id="BBOX" 
    maxlength="15" 
    validationtype="required" 
    value="" 
    name="$PpyWorkPage$pBBOX$pBBOX" 
    class="leftJustifyStyle" 
    data-change="[["refresh", 
                   ["otherSection",
                    "RecordInformation", 
                    "", 
                    "&amp;=", 
                    "", 
                    "BBOXOnChange,",
                    ":event",
                    "",
                    "pyWorkPage.BBOX"
                   ]
                 ]]" 
    type="text">

Open in new window


The Selenium code I have tried is this:

driver.switchTo().frame(driver.findElement(By.name("PegaGadget")));     

WebDriverWait wait = new WebDriverWait(driver, 10);
wait.until(ExpectedConditions.visibilityOfElementLocated(By.id("BBOX")));
final WebElement BBOXInputBox = driver.findElement(By.id("BBOX"));

BBOXInputBox.click();
BBOXInputBox.click();
Thread.sleep(2000);
BBOXInputBox.sendKeys("204083727717650");
Thread.sleep(2000);
BBOXInputBox.sendKeys(Keys.TAB);
Thread.sleep(2000);
BBOXInputBox.sendKeys(Keys.BACK_SPACE);
Thread.sleep(2000);
BBOXInputBox.sendKeys("1");
Thread.sleep(200);
BBOXInputBox.sendKeys(Keys.TAB);
Thread.sleep(2000);

Actions builder = new Actions(driver);
builder.moveToElement(driver.findElement(By.id("FirstName_U")), 5, 5).click().build().perform();

driver.findElement(By.id("FirstName_U")).sendKeys("something");

Open in new window


And I am trying my best to find this function above in their 30 or so of .js files for any one page.

So someone more knowledgeable than I in the area of this type of coding in JS please set up and let me know what I should be looking for in the .js source code so that I can fire this change event manually within code.

It seems when I click on the text box, input a few letters and then either tab or click on another input box on that same form it fires some type of event/function that populates a label on the page.

What I have been looking for within the .js source code would be a function called refresh(...) or something along the lines of refresh: function(...)... or _refresh: function(...)... but I haven't been able to find anything that resembles the parameters its sending to that function.
0
I have this code at the very end of a lengthy php program:

</form>
</div>
</div>
<? echo "nosumm = " . $_GET['nosumm'] . "<br>";
	if ($_GET['nosumm'] == "1") {
		header("Location: send_email_ls250.php?ddocs=" . $ddocs);
		exit;
	} else {
		header ("Location: summaryk.php?ddocs = " . $ddocs . "&nosumm=" . $_GET['nosumm'] . "&mv=Y");
		exit;
	}	
?>		
</body>
</html>

Open in new window


When it is run, it displays the page (see attached) with the echo at the bottom.

Why is the header to send_email_ls250.php?ddocs=" . $ddocs ignored?

FYI, I wasn't sure if $_GET['nosumm'] returns an integer 1 or a character "1", so I tried it both ways, same result.

The url is https://www.lakoshvac.com/summaryk.php?fr=proj&nosumm=1&ddocs=Y
wont_redirect_with_header.JPG
0
I've exported an excel spreadsheet to html and uploaded the file to my wordpress site however when I open the url the spreadsheet is not centered on the page. it is set to the far left. How do I center the pages. I'd also like to have the links on the bottom to the other sheets be at the top instead of the bottom but that's not a deal breaker.
0
I have a page with a number of images on. When these images are clicked this brings up a pop out (using bootstrap modal) that has a form on it. What I would like to happen is that when a certain image is clicked it selects a radio button on the form and also opens the modal box.

The link that selects a certain radio button might be on the page more than once so I cannot use ID.

Here is how I have the html

	<a data-toggle="modal" data-target=".bs-example-modal-lg" class="option1"><img src="image1.jpg"> <h5>Name 1</h5></a>
	<a data-toggle="modal" data-target=".bs-example-modal-lg" class="option2"><img src="image2.jpg"> <h5>Name 2</h5></a>
	<a data-toggle="modal" data-target=".bs-example-modal-lg" class="option3"><img src="image3.jpg"> <h5>Name 3</h5></a>
	<a data-toggle="modal" data-target=".bs-example-modal-lg" class="option4"><img src="image4.jpg"> <h5>Name 4</h5></a>
	<a data-toggle="modal" data-target=".bs-example-modal-lg" class="option5"><img src="image5.jpg"> <h5>Name 5</h5></a>
	<a data-toggle="modal" data-target=".bs-example-modal-lg" class="option6"><img src="image6.jpg"> <h5>Name 6</h5></a>
		
	<a data-toggle="modal" data-target=".bs-example-modal-lg" class="option1"><img src="image1.jpg"> <h5>Name 1</h5></a>
	<a data-toggle="modal" data-target=".bs-example-modal-lg" class="option2"><img src="image2.jpg"> <h5>Name 2</h5></a>
	<a data-toggle="modal" data-target=".bs-example-modal-lg" class="option3"><img src="image3.jpg"> <h5>Name 3</h5></a>
	
	<div 

Open in new window

0
Determine the Perfect Price for Your IT Services
Determine the Perfect Price for Your IT Services

Do you wonder if your IT business is truly profitable or if you should raise your prices? Learn how to calculate your overhead burden with our free interactive tool and use it to determine the right price for your IT services. Download your free eBook now!

I'm creating a restaurant menu.  I would like the entree name in one font/color and the price on the same line with a different font/color.
I'm using a table but the problem is after the entree name, the price drops to the 2nd line.

This is the code in question:
<table id="Appps" border="0" cellspacing="0" cellpadding="2" width="100%" style="height: 25px;">
	<tr>
	<td>
	<div id="Green_Text" align ="center">
    Appetizers and Soups
	</div>
	</td>
	</tr>
<tr>
	<td width = 50%><div id = "Entree">Millie's Chili</div><div "Price"> crock 6 </div>
    Topped with chopped onions & melted pepper jack cheese, served with Nacho chips
  </td> 

Open in new window


The css is
#Entree
{
 	font-size: 18px;
	color: #BF5940;
}

#Price
{
 	font-size: 18px;
	color: #FFFFFF;
}

Open in new window


Only other question is how do I bold the price?

Thanks
0
I have an asp.net page with a panel (with scroll bars) inside a panel with an update panel.  The button (MstrQLst) used for making the popup visible requires 2 clicks to work.

Can someone help?

Thanks,

<asp:Table ID="Table1" runat="server" Width="100%" CellPadding="0" CellSpacing="0"
            Height="25px">
            <asp:TableRow ID="TableRow2" runat="server" Width="100%" BackColor="#336699" Height="100%">
                <asp:TableCell ID="TableCell2" runat="server" Width="90%" HorizontalAlign="Left"
                    Height="100%">
                                                            <asp:Button ID="MstrQLst" runat="server" Text="Master Question Library" Font-Names="Arial" Font-Size="10"
                        Font-Underline="True" ForeColor="#FFFFCC" BackColor="Transparent" BorderStyle="None"
                        Font-Bold="True" CausesValidation="False" OnClick="MstrQLst_Click" />&nbsp;
                                                       </asp:TableCell>
                            </asp:TableRow>
        </asp:Table>
<asp:Panel ID="CoreQuest2" runat="server" Width="40%" Visible="False" ViewStateMode="Enabled"
            BackColor="#E9E9E9" BorderColor="#999999" BorderStyle="Inset" BorderWidth="1"
            HorizontalAlign="Center" Height="50%">
            <asp:Table ID="Table6" runat="server" Width="100%" BorderColor="#003366" BorderStyle="Inset"
                BorderWidth="1" Height="30px" ViewStateMode="Enabled" 

Open in new window

0
Hi Experts,

I am not able set  fixed width and height for a card image in bootstrap.  I want all in same height and width for all the images.  Please see the below image.

tosend.png
I had tried setting min-width:100% height:40vh and object-fit:cover but not able to resolve this issue.   Please find below the debugger window details

tosend.JPG
Please see the below code

 return (
          <div  key={i.id} className={`card paper ${this.props.selected == i.id ? ' selected': ''}`}
                 style={{width:dimension, height:dimension+50}} onClick={() => this.props.actions.viewItem(i)}>

              {!i?.source?.brand ? null :
               <img src={i.source.brand} className="card-img-top img-fluid "  alt={i.source}/>
              }
              <img src={thumbnail} alt={i.title} className="card-img-top img-fluid" style={{width:"100%!important", 'min-width':"100%",height:"15rem", 'object-fit':'cover'}}/>
            <div className="card-body">
               <p class="card-text"> {i.title} {' '} <span style={{color: '#777'}} > {date} </span></p>
            </div>
         </div>);
         });

Open in new window


Please help me in resolving this issue.

With many thanks,
Bharath AK
0
I am trying to adjust the height of input type in bootstrap 4, which has following sample markup.

is there a quick way to do just the input types?

 <div class="form-group">
    <label for="exampleInputPassword1">Password</label>
    <input type="password" class="form-control" id="exampleInputPassword1" placeholder="Password">
  </div>
0
Hi all, I am not sure i have the right search for the examples of code I want.

What I want:
click on a (smaller) image, and then it enlarges onto the same webpage, and then can scroll through some other pictures with having some info

the page I want to do this to is:
http://dev.gptouring.com.au/home.asp?c=104&p=1&d=80

The image I want to do this to is the Picture of the F1 cars.

If anyone can please help me find the right code and implement it, that would be amazing (as this is an unknown area for me)
0
I have added a bootstrap 4 panel. how can I add a right arrow after the anchor tag , when it is collapsed and add a down arrow on expand?  

<div class="panel-group">
  <div class="panel panel-default">
    <div class="panel-heading">
      <h4 class="panel-title">
        <a data-toggle="collapse" href="#collapse1">Collapsible panel</a>
      </h4>
    </div>
    <div id="collapse1" class="panel-collapse collapse">
      <div class="panel-body">Panel Body</div>
      <div class="panel-footer">Panel Footer</div>
    </div>
  </div>
</div>
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.