Slight prob with code tags.
Discussion
I notice that when I preview or post with the code tags the new colour scheme doesn't obey the formatting rules ie. post in "Big Blue" and the text between the code tags isn't formatted as you would expect, but it's lost it's green background.
It's not the end of the world, but it makes reading a post with code in a bit more tricky.
Any chance of having a look when you get a min.
It's not the end of the world, but it makes reading a post with code in a bit more tricky.
Any chance of having a look when you get a min.
Righty ho... Am I going mad or not?
The above is hand typed.
Now I'll paste in the code I had a prob with the other day:
{{{
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head>
<title>Untitled Page</title>
<script type="text/javascript">
function deleteRow(r)
{
var i=r.parentNode.parentNode.rowIndex;
document.getElementById('t1').deleteRow(i);
}
function appendRow()
{
var tbody = document.getElementById("t1").getElementsByTagName("tbody")[0];
var nr = 0;
for(nr = 0; nr < tbody.rows.length; nr++){
var row = document.createElement("TR");
var cell1 = document.createElement("TD");
cell1.innerHTML = (nr+1);
var cell2 = document.createElement("TD");
cell2.innerHTML = "<input type=\"text\" name=\"Loc[]\" />";
var cell3 = document.createElement("TD");
cell3.innerHTML = "<input type=\"text\" name=\"Event[]\" />";
var cell4 = document.createElement("TD");
cell4.innerHTML = "<input type=\"text\" name=\"Item[]\" />";
var cell5 = document.createElement("TD");
cell5.innerHTML = "<input type=\"button\" value=\"Delete\" onclick=\"deleteRow(this)\"> " + (nr+1);
}
row.appendChild(cell1);
row.appendChild(cell2);
row.appendChild(cell3);
row.appendChild(cell4);
row.appendChild(cell5);
tbody.appendChild(row);
}
</script>
</head>
<body>
<table id="t1" border="1">
<tr>
<th scope="col">Line Number </th>
<th scope="col">Location</th>
<th scope="col">Event</th>
<th scope="col">Item</th>
<th scope="col">Delete</th>
</tr>
<tr>
<td>1</td>
<td>Row1 cell1</td>
<td>Row1 cell2</td>
<td>Row1 cell4</td>
<td> </td>
</tr>
<tr>
<td>2</td>
<td>Row2 cell1</td>
<td>Row2 cell2</td>
<td>Row2 cell4</td>
<td> </td>
</tr>
</table>
<?php
$editFormAction = $_SERVER['PHP_SELF'];
if (isset($_SERVER['QUERY_STRING'])) {
$editFormAction .= "?" . htmlentities($_SERVER['QUERY_STRING']);
}
print_r ($_POST);
?>
<form name="form1" method="POST" action="<?php echo $editFormAction; ?>">
<input type="button" onclick="appendRow()" value="Append Row">
<input type="submit" name="Submit" value="Show Array" />
</form>
</body>
</html>
}}}
So in theory I'm not actually going mad in preview!
10 echo aargh
20 echo This is typed in by hand
30 goto 10
The above is hand typed.
Now I'll paste in the code I had a prob with the other day:
{{{
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head>
<title>Untitled Page</title>
<script type="text/javascript">
function deleteRow(r)
{
var i=r.parentNode.parentNode.rowIndex;
document.getElementById('t1').deleteRow(i);
}
function appendRow()
{
var tbody = document.getElementById("t1").getElementsByTagName("tbody")[0];
var nr = 0;
for(nr = 0; nr < tbody.rows.length; nr++){
var row = document.createElement("TR");
var cell1 = document.createElement("TD");
cell1.innerHTML = (nr+1);
var cell2 = document.createElement("TD");
cell2.innerHTML = "<input type=\"text\" name=\"Loc[]\" />";
var cell3 = document.createElement("TD");
cell3.innerHTML = "<input type=\"text\" name=\"Event[]\" />";
var cell4 = document.createElement("TD");
cell4.innerHTML = "<input type=\"text\" name=\"Item[]\" />";
var cell5 = document.createElement("TD");
cell5.innerHTML = "<input type=\"button\" value=\"Delete\" onclick=\"deleteRow(this)\"> " + (nr+1);
}
row.appendChild(cell1);
row.appendChild(cell2);
row.appendChild(cell3);
row.appendChild(cell4);
row.appendChild(cell5);
tbody.appendChild(row);
}
</script>
</head>
<body>
<table id="t1" border="1">
<tr>
<th scope="col">Line Number </th>
<th scope="col">Location</th>
<th scope="col">Event</th>
<th scope="col">Item</th>
<th scope="col">Delete</th>
</tr>
<tr>
<td>1</td>
<td>Row1 cell1</td>
<td>Row1 cell2</td>
<td>Row1 cell4</td>
<td> </td>
</tr>
<tr>
<td>2</td>
<td>Row2 cell1</td>
<td>Row2 cell2</td>
<td>Row2 cell4</td>
<td> </td>
</tr>
</table>
<?php
$editFormAction = $_SERVER['PHP_SELF'];
if (isset($_SERVER['QUERY_STRING'])) {
$editFormAction .= "?" . htmlentities($_SERVER['QUERY_STRING']);
}
print_r ($_POST);
?>
<form name="form1" method="POST" action="<?php echo $editFormAction; ?>">
<input type="button" onclick="appendRow()" value="Append Row">
<input type="submit" name="Submit" value="Show Array" />
</form>
</body>
</html>
}}}
So in theory I'm not actually going mad in preview!
HRG said:
Righty ho... Am I going mad or not?
The above is hand typed.
Now I'll paste in the code I had a prob with the other day:
{{{
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head>
<title>Untitled Page</title>
<script type="text/javascript">
function deleteRow(r)
{
var i=r.parentNode.parentNode.rowIndex;
document.getElementById('t1').deleteRow(i);
}
function appendRow()
{
var tbody = document.getElementById("t1").getElementsByTagName("tbody")[0];
var nr = 0;
for(nr = 0; nr < tbody.rows.length; nr++){
var row = document.createElement("TR");
var cell1 = document.createElement("TD");
cell1.innerHTML = (nr+1);
var cell2 = document.createElement("TD");
cell2.innerHTML = "<input type=\"text\" name=\"Loc[]\" />";
var cell3 = document.createElement("TD");
cell3.innerHTML = "<input type=\"text\" name=\"Event[]\" />";
var cell4 = document.createElement("TD");
cell4.innerHTML = "<input type=\"text\" name=\"Item[]\" />";
var cell5 = document.createElement("TD");
cell5.innerHTML = "<input type=\"button\" value=\"Delete\" onclick=\"deleteRow(this)\"> " + (nr+1);
}
row.appendChild(cell1);
row.appendChild(cell2);
row.appendChild(cell3);
row.appendChild(cell4);
row.appendChild(cell5);
tbody.appendChild(row);
}
</script>
</head>
<body>
<table id="t1" border="1">
<tr>
<th scope="col">Line Number </th>
<th scope="col">Location</th>
<th scope="col">Event</th>
<th scope="col">Item</th>
<th scope="col">Delete</th>
</tr>
<tr>
<td>1</td>
<td>Row1 cell1</td>
<td>Row1 cell2</td>
<td>Row1 cell4</td>
<td> </td>
</tr>
<tr>
<td>2</td>
<td>Row2 cell1</td>
<td>Row2 cell2</td>
<td>Row2 cell4</td>
<td> </td>
</tr>
</table>
<?php
$editFormAction = $_SERVER['PHP_SELF'];
if (isset($_SERVER['QUERY_STRING'])) {
$editFormAction .= "?" . htmlentities($_SERVER['QUERY_STRING']);
}
print_r ($_POST);
?>
<form name="form1" method="POST" action="<?php echo $editFormAction; ?>">
<input type="button" onclick="appendRow()" value="Append Row">
<input type="submit" name="Submit" value="Show Array" />
</form>
</body>
</html>
}}}
So in theory I'm not actually going mad in preview!
Phew... I wrote the parser and I think that stretches my parsing skills too far
10 echo aargh
20 echo This is typed in by hand
30 goto 10
The above is hand typed.
Now I'll paste in the code I had a prob with the other day:
{{{
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head>
<title>Untitled Page</title>
<script type="text/javascript">
function deleteRow(r)
{
var i=r.parentNode.parentNode.rowIndex;
document.getElementById('t1').deleteRow(i);
}
function appendRow()
{
var tbody = document.getElementById("t1").getElementsByTagName("tbody")[0];
var nr = 0;
for(nr = 0; nr < tbody.rows.length; nr++){
var row = document.createElement("TR");
var cell1 = document.createElement("TD");
cell1.innerHTML = (nr+1);
var cell2 = document.createElement("TD");
cell2.innerHTML = "<input type=\"text\" name=\"Loc[]\" />";
var cell3 = document.createElement("TD");
cell3.innerHTML = "<input type=\"text\" name=\"Event[]\" />";
var cell4 = document.createElement("TD");
cell4.innerHTML = "<input type=\"text\" name=\"Item[]\" />";
var cell5 = document.createElement("TD");
cell5.innerHTML = "<input type=\"button\" value=\"Delete\" onclick=\"deleteRow(this)\"> " + (nr+1);
}
row.appendChild(cell1);
row.appendChild(cell2);
row.appendChild(cell3);
row.appendChild(cell4);
row.appendChild(cell5);
tbody.appendChild(row);
}
</script>
</head>
<body>
<table id="t1" border="1">
<tr>
<th scope="col">Line Number </th>
<th scope="col">Location</th>
<th scope="col">Event</th>
<th scope="col">Item</th>
<th scope="col">Delete</th>
</tr>
<tr>
<td>1</td>
<td>Row1 cell1</td>
<td>Row1 cell2</td>
<td>Row1 cell4</td>
<td> </td>
</tr>
<tr>
<td>2</td>
<td>Row2 cell1</td>
<td>Row2 cell2</td>
<td>Row2 cell4</td>
<td> </td>
</tr>
</table>
<?php
$editFormAction = $_SERVER['PHP_SELF'];
if (isset($_SERVER['QUERY_STRING'])) {
$editFormAction .= "?" . htmlentities($_SERVER['QUERY_STRING']);
}
print_r ($_POST);
?>
<form name="form1" method="POST" action="<?php echo $editFormAction; ?>">
<input type="button" onclick="appendRow()" value="Append Row">
<input type="submit" name="Submit" value="Show Array" />
</form>
</body>
</html>
}}}
So in theory I'm not actually going mad in preview!


Gassing Station | Website Feedback | Top of Page | What's New | My Stuff





