Pen Settings

HTML

CSS

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URLs added here will be added as <link>s in order, and before the CSS in the editor. You can use the CSS from another Pen by using its URL and the proper URL extension.

+ add another resource

JavaScript

Babel includes JSX processing.

Add External Scripts/Pens

Any URL's added here will be added as <script>s in order, and run before the JavaScript in the editor. You can use the URL of any other Pen and it will include the JavaScript from that Pen.

+ add another resource

Packages

Add Packages

Search for and use JavaScript packages from npm here. By selecting a package, an import statement will be added to the top of the JavaScript editor for this package.

Behavior

Auto Save

If active, Pens will autosave every 30 seconds after being saved once.

Auto-Updating Preview

If enabled, the preview panel updates automatically as you code. If disabled, use the "Run" button to update.

Format on Save

If enabled, your code will be formatted when you actively save your Pen. Note: your code becomes un-folded during formatting.

Editor Settings

Code Indentation

Want to change your Syntax Highlighting theme, Fonts and more?

Visit your global Editor Settings.

HTML

              
                <!DOCTYPE html>
<html lang="en">

  <head>

    <!--  Meta  -->
    <meta charset="UTF-8" />
    <title>Some Project</title>

    <!--  Styles  -->
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/4.0.0-alpha.6/css/bootstrap.min.css">
    <link rel="stylesheet" href="styles/index.processed.css">
  </head>
  
  <body>
    <div class="container">
      <form name = codeForm>
        <div class="form-group">
          <label for="inputCode">Unstructured Call</label>
          <textarea  class="form-control" id="codeString" placeholder="Paste code here" rows=15 name = 'this'></textarea>
        </div>
      </form>
      
      <p>
        <button type="submit" class="btn btn-primary btn-lg" onclick="ProcessString()">Begin Parsing Process</button>
      </p>
      
      <p>
        <button type="button" class="btn btn-danger" onclick="ClearData()">Clear Results</button>
      </p>
      
    </div>
    
    <div id="users" class="container">
      
    </div>
    
  </body>
  
</html>
              
            
!

CSS

              
                
              
            
!

JS

              
                function ProcessString(){
  // capture text of what is in the form as a variable
  var formElements = document.forms['codeForm']['this'].value;
  
  // seperate string into array of key value pairs
  var myPairs = formElements.split('&');
  
  
  // clear table
  var usersDiv = document.querySelector("#users");
  usersDiv.innerHTML = "";
  
  //create table
  var table = document.createElement("table");
  // give table a bootsrap class
  var att = document.createAttribute("class");       // Create a "class" attribute
  att.value = "table table-hover";
  table.setAttributeNode(att);
  
  for (var parameter in myPairs){
    // split key value pair
    var newArray = myPairs[parameter].split('=');
	
    //console.log(newArray[0], decodeURIComponent(newArray[1]));
    // insert row into table
    var row = table.insertRow();
    // insert cells in the row
    var keyCell = row.insertCell();
    keyCell.innerHTML = newArray[0];
    
    var valueCell = row.insertCell();
    valueCell.innerHTML = decodeURIComponent(newArray[1]);
    //console.log(decodeURIComponent(newArray[1]))
  };
  // add table to div
  usersDiv.appendChild(table);
}

function ClearData(){
  // clear table
  var usersDiv = document.querySelector("#users");
  usersDiv.innerHTML = "";
}
              
            
!
999px

Console