JSFiddle - React, Tailwind, and code Playground
by tsdexter
HTML
<!DOCTYPE html>
<!-- saved from url=(0066)http://twitter.github.com/bootstrap/examples/starter-template.html -->
<html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta charset="utf-8">
<title>Web Service Testing - Georgian College</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="">
<meta name="author" content="">
<!-- Le styles -->
<link href="css/bootstrap.css" rel="stylesheet">
<style>
body {
padding-top: 60px; /* 60px to make the container go all the way to the bottom of the topbar */
}
</style>
<link href="css/bootstrap-responsive.css" rel="stylesheet">
<!-- HTML5 shim, for IE6-8 support of HTML5 elements -->
<!--[if lt IE 9]>
<script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
<body>
<div class="navbar navbar-inverse navbar-fixed-top">
<div class="navbar-inner">
<div class="container">
<a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</a>
<a class="brand" href="index.php">Georgian Web Service - Testing</a>
<div class="nav-collapse collapse">
<ul class="nav">
<li><a href="programs-list.php" class="active">Program List</a></li>
<li><a href="#">Articulations</a></li>
</ul>
</div><!--/.nav-collapse -->
</div>
</div>
</div>
<div class="container">
<h1>Programs List <small>Automated Testing</small></h1>
<div class="row-fluid">
<div class="span12" id="msgs">
</div>
</div>
<div class="row-fluid">
<div class="span12">
<h3>Step One: <small>Add XML Sources to...
JavaScript
jQuery(document).ready(function(){
//remove any errors msgs still showing
jQuery('#errors').empty();
//Send Registrar XML to PHP to turn into table
jQuery('#btnRegistrarXML').live('click', function(){
var xml;
if (jQuery('#txtRegXML').val() == ""){
AddMsg('You must paste XML from the excel export into the textarea.', 'error');
} else {
jQuery.post('registrar-xml-to-table.php', {xml:escape(jQuery('#txtRegXML').val())}, function(data){
jQuery('#regXMLasTable').empty();
jQuery('#regXMLasTable').append(data);
});
}
displayMsgs();
});
//Send Web Service XML to PHP to turn into table
jQuery('#btnWebXML').live('click', function(){
var xml;
displayMsgs();
});
});
var msgs = [];
function AddMsg(msg, type) {
msgs.push('<p class="alert alert-' + type + '">' + msg + '<a class="close" data-dismiss="alert" href="#">×</a></p>');
}
function displayMsgs(){
jQuery.each(msgs, function(index, value){
jQuery('#msgs').append(value);
jQuery('#msgs p').delay(3000).fadeOut();
});
msgs = [];
}