|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Generate data entry and reporting .NET Web apps in minutes, straight from your database. Read our FREE whitepaper “Build Web 2.0 Applications Without Hand-Coding” Download now! |
|
#1
|
||||
|
||||
|
Code Tags Issue
Why the code wrapped inside code tags does not have vertical scrolling? The way it works in aspfree is great, so I wondered if there's any reason why it's different in here.
|
|
#2
|
||||
|
||||
|
I think it depends on how much code you've got. I think it might be a CSS thang ...
--Ax |
|
#3
|
||||
|
||||
|
ok, I'll test it a bit:
Code:
short code here two lines is not very much. Code:
much code below!!!
<script language="javascript">
function Request(key)
{
var strQueryString=QueryString();
if (strQueryString.length < 1)
return "";
arrTmp=strQueryString.split("&");
for (var i=0; i<arrTmp.length; i++)
{
var arrTmp2=arrTmp[i].split("=");
if (arrTmp2.length < 1)
continue;
var curKey=arrTmp2[0];
var curValue=(arrTmp2.length < 2)?"":arrTmp2[1];
if (curKey.toLowerCase() == key.toLowerCase())
return curValue;
}
return "";
}
function QueryString()
{
var strFullUrl=document.location+"";
var arrTmp=strFullUrl.split("?");
if (arrTmp.length < 2)
return "";
return arrTmp[1];
}
//alert(Request("aaa"));
</script>
<form><input type="text" name="aaa" /><input type="submit" /></form>
<BR><BR><BR>
<table id="MyTable111115" border="1">
<tr><td>first row first cell</td><td>first row second cell</td><td>first row third cell</td></tr>
<tr><td>second row first cell</td><td>second row second cell</td><td>second row third cell</td></tr>
<tr><td>third row first cell</td><td>third row second cell</td><td>third row third cell</td></tr>
</table><br />
<select onchange="document.getElementById( 'MyTable111115' ).rows[1].style.backgroundColor = this.value;">
<option value="">Select Color</option>
<option value="Blue">Blue</option>
<option value="Red">Red</option>
<option value="Yellow">Yellow</option>
<option value="Green">Green</option>
</select>
<BR><BR><BR>
<script language="javascript">
function A() {
alert("A");
}
function B() {
alert("B");
}
</script>
<button id="MyButton1" onclick="A();">Click Me</button>
<button onclick="document.getElementById('MyButton1').onclick = B;">Change</button>
<script language="javascript">
document.onkeypress=DocumentKeyPress;
function DocumentKeyPress(event) {
if ((typeof event == "undefined")||(!event))
event = window.event;
var keyCode=event.keyCode;
if (keyCode == 13)
document.forms[0].submit();
}
</script>
<BR><BR><BR>
<button type="button"><a href="mailto:myemail@ddress.com">Email me</a></button>
<form action="mailto:myemail@address.com">
<button type="submit">Email me</button>
</form>
<BR><BR><BR>
<script language="vbscript">
Function CloseMe
Set Window.Opener=Top
Call Window.Close()
End Function
</script>
<button onclick="vbscript: CloseMe">Close Me</button>
<BR><BR><BR>
<form>
<button type="submit" name="Submit">Do This</button> <button type="submit" name="Submit">Do That</button>
</form>
<BR><BR><BR>
<form>
<input type="radio" name="rad" value="1" />
<input type="radio" name="rad" value="2" />
<input type="radio" name="rad" value="3" />
</form>
<BR><BR><BR>
<button onclick="document.frames['HiddenFrame1'].location = 'hotscripts_25548.pdf';">Preview PDF</button><br />
<input type="file" onchange="document.frames['PreviewFrame'].location = this.value;" /><br />
<iframe name="PreviewFrame" id="PreviewFrame" src="about:blank" width="300" height="300"></iframe>
the same code in php tags: PHP Code:
|
|
#4
|
||||
|
||||
|
well, the scroll appear after very much code, it cause lots of scrolling in the page.
also the background color is the same as the message background, it's hard to distinguish between code and non code text. nothing fatal, but it can be improved IMO... |
|
#5
|
||||
|
||||
|
Have you tags on ASP for color coding. Here we have [php]tags but they tend to munge perl code, so I tend to discourage their use in the Perl forum. But you could try [php] tags around the big block of code above, and do a diff to see if any of the code is munged - it's quite close to PHP, so you couild be alright
HTH --Ax |
|
#6
|
||||
|
||||
|
the same code in aspfree code tags:
http://forums.aspfree.com/showpost....57&postcount=45 much smaller, different color and better indentation. |
|
#7
|
||||
|
||||
|
Quote:
it just adds color to the text itself. nice, however that's not what I meant. ![]() |
|
#8
|
||||
|
||||
|
I do like both the lighter background AND the colored text.
A smaller window makes the thread somewhat easier to read, but IMO the code itself benefits from the larger window. |
|
#9
|
||||
|
||||
|
Quote:
ok, each and his own taste, no problem... but I still wonder why it's different among the forums? who decide what design will be at each forum? is there different admins for the different devshed forums? |
|
#10
|
||||
|
||||
|
Might be better off having that discussion in the lounge
--Ax
__________________
--Ax without exception, there is no rule ... The great thing about Object Oriented code is that it can make small, simple problems look like large, complex ones ![]() 09 F9 11 02 9D 74 E3 5B D8 41 56 C5 63 56 88 C0 Some people, when confronted with a problem, think "I know, I'll use regular expressions." Now they have two problems. -- Jamie Zawinski Detavil - the devil is in the detail, allegedly, and I use the term advisedly, allegedly ... oh, no, wait I did ... |
|
#11
|
||
|
|