Slight prob with code tags.
Slight prob with code tags.
Author
Discussion

HRG

Original Poster:

72,863 posts

268 months

Monday 4th August 2008
quotequote all
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.


RacingPete

9,196 posts

233 months

Monday 4th August 2008
quotequote all
One minute of testing smile


10 Print 'Hello'
20 Goto 10

RacingPete

9,196 posts

233 months

Monday 4th August 2008
quotequote all
Looking in Big Blue now and the above looks fine with the code in green.

Might be being a bit Monday stupid... but not sure what you mean? smile

HRG

Original Poster:

72,863 posts

268 months

Monday 4th August 2008
quotequote all
Righty ho... Am I going mad or not?


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>&nbsp;</td>
</tr>
<tr>
<td>2</td>
<td>Row2 cell1</td>
<td>Row2 cell2</td>
<td>Row2 cell4</td>
<td>&nbsp;</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!

PetrolTed

34,468 posts

332 months

Monday 4th August 2008
quotequote all
HRG said:
Righty ho... Am I going mad or not?


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>&nbsp;</td>
</tr>
<tr>
<td>2</td>
<td>Row2 cell1</td>
<td>Row2 cell2</td>
<td>Row2 cell4</td>
<td>&nbsp;</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 biggrintype

Silent1

19,762 posts

264 months

Monday 4th August 2008
quotequote all
and why isn't it perfect, everyone knows you have nothing better to do hehe

PetrolTed

34,468 posts

332 months

Monday 4th August 2008
quotequote all
Not my trainset any more... smile


Silent1

19,762 posts

264 months

Monday 4th August 2008
quotequote all
PetrolTed said:
Not my trainset any more... smile
Have you got the new hornby digital one now? Upgraded from the valve amp one?wink