Browse Source

updated broken code

Akshit Tripathi 11 years ago
parent
commit
1b0fdd964b
2 changed files with 8 additions and 85 deletions
  1. 1 12
      index.html
  2. 7 73
      input.html

+ 1 - 12
index.html

@@ -7,18 +7,8 @@
 	<title>Web interface for GCC compiler</title>
 	<link rel="stylesheet" type="text/css" href="./style.css">
 </head>
-<<<<<<< HEAD
-<frameset rows="16%,84%">
-	<frame name="header" src="header.html">
-		<frameset cols="53%,47%">
-			<frame name="input" src="input.html">
-			<frame name="output" src="output.php">
-		</frameset>
-=======
-
-
 <!-- Create two horizontal frames of 20% and 80% height -->
-<frameset rows="20%,80%">
+<frameset rows="16%,84%">
 <!-- Load the header -->
 <frame name="header" src="header.html">
 <!-- Create two vertical frames of 53% and 47% width -->
@@ -28,6 +18,5 @@
     <!-- Load the output frame -->
     <frame name="output" src="output.php">
     </frameset>
->>>>>>> 993de84b2fbccdce0b2c1c76291839d38519b9cf
 </frameset>
 </html>

+ 7 - 73
input.html

@@ -1,35 +1,11 @@
 <!-- Code by Sunit Kumar Nandi -->
 
-<<<<<<< HEAD
 <!DOCTYPE html>
-<html lang="en">
-
-<head>
-	<meta charset="utf-8" script=>
-	<link rel="stylesheet" type="text/css" href="./style.css">
-</head>
-<body>
-	<form name="form1" method="post" target="output" action="output.php?saving=1">
-		<br/><br/>
-		<textarea name="textarea" onfocus="script.js" id="text-area" cols="80" rows="10" placeholder="Write your program here" spellcheck="false"></textarea>
-		<!-- Thanks to Emmet (http://stackoverflow.com/users/2749/emmett) for the tabbing js. -->
-		<script type="text/javascript">
-			document.getElementById("text-area").onkeydown = function(e) {
-				if (!e && event.keyCode == 9)
-				{
-					event.returnValue = false;
-					insertAtCursor(document.getElementById("text-area"), "	");
-				}
-				else if (e.keyCode == 9)
-				{
-					e.preventDefault();
-					insertAtCursor(document.getElementById("text-area"), "	");
-				}
-	    	    };
-=======
 <head>
 <!-- Inserting CodeMirror text editor -->
 <!-- Credit for the idea goes to Aditya Rajan -->
+<meta charset="utf-8" script=>
+<link rel="stylesheet" type="text/css" href="style.css">
 <link rel="stylesheet" href="assets/codemirror.css">
 <script src="assets/codemirror.js"></script>
 <script src="assets/matchbrackets.js"></script>
@@ -43,7 +19,7 @@
 Write your program here:
 <br>
 <!-- Accepting program code -->
-<textarea id="code" name="data" cols="80" rows="10">
+<textarea id="code" name="data" cols="100" rows="10">
 #include<iostream>
 using namespace std;
 
@@ -56,18 +32,18 @@ int main()
 <br><br>
 <!-- Accepting standard input -->
 Standard input:<br>
-<textarea name="stdin" cols="60" rows="10">
+<textarea name="stdin" cols="60" rows="10" placeholder="Standard input">
 </textarea>
 <br><br>
 <!-- Accepting command-line agruments -->
-Command line arguments: <input type="text" name="args">
+<input type="text" name="args" placeholder="Command-line arguments">
 <br><br>
 <!-- Submit button goes here -->
-<input type="submit" value="Run">
+<button type="submit">Run</button>
 </form>
 <br>
 <!-- Provide a link to text input option -->
-<a href="textinput.php" target="output">Click here to submit text file input</a>
+<button href="textinput.php" target="output">Submit a text file</button>
 
 <script>
 	var editor = CodeMirror.fromTextArea(document.getElementById("code"), {
@@ -79,47 +55,5 @@ Command line arguments: <input type="text" name="args">
 	mode: "text/x-c++src"
 	});
 </script>
-
-</body>
->>>>>>> 993de84b2fbccdce0b2c1c76291839d38519b9cf
-
-	        	//http://alexking.org/blog/2003/06/02/inserting-at-the-cursor-using-javascript#comment-3817
-	        	function insertAtCursor(myField, myValue) {
-					//IE support
-					if (document.selection) {
-						var temp;
-						myField.focus();
-						sel = document.selection.createRange();
-						temp = sel.text.length;
-						sel.text = myValue;
-						if (myValue.length == 0) {
-						sel.moveStart('character', myValue.length);
-						sel.moveEnd('character', myValue.length);
-					} else {
-						sel.moveStart('character', -myValue.length + temp);
-					}
-					sel.select();
-					}
-	   	       //MOZILLA/NETSCAPE support
-					else if (myField.selectionStart || myField.selectionStart == '0') {
-						var startPos = myField.selectionStart;
-						var endPos = myField.selectionEnd;
-						myField.value = myField.value.substring(0, startPos) + myValue + myField.value.substring(endPos, myField.value.length);
-						myField.selectionStart = startPos + myValue.length;
-						myField.selectionEnd = startPos + myValue.length;
-					} else {
-						myField.value += myValue;
-				}
-			}
-        </script>
-		<br/><br/><br/>
-		<input type="text" name="stdin" autocomplete="on" placeholder="Standard input" wrap="hard">
-		<br/><br/>
-		<input type="text" name="args" autocomplete="on" placeholder="Command-line arguments">
-		<br/><hr/><br/>
-		<button type="submit"> &#9654; Run</button>
-	</form>
-	<button href="textinput.php" target="output">Submit text file</button>
-		<!--<div style="padding:30px;"><a href="#" class="button">&#9654; Run</a></div>-->
 </body>
 </html>