Nik's Technology Blog

Travels through programming, networks, and computers

BT Trials 'Midband' a step away from Broadband?

BT is testing what it has coined 'Midband'. It's primarily for homes in the UK that cannot at present receive BT Broadband. BT broadband currently covers 77% of BT's network, other areas are currently being upgraded where there is demand.

Midband will feature an always-on connection, and run at 128kbps.

Experts think they will probably use ISDN for this service, using ISDN's 16kbps D-Channel for the always-on connection, which can be used for receiving emails, and the 2 B-Channels (64kbps each) for simultaneous data and voice.

If this is the case then dialling up will be necessary, although ISDN dial-up is significantly faster than a traditional modem.

Adding Page Breaks to HTML Documents

Using the CSS style attribute "page-break-before" you can place page breaks within your document, enabling the web designer to control how the document prints.

For example you could add them to <hr> tags as an in-line style or as part of your external CSS document.

SYNTAX

INLINE STYLE

<hr style="page-break-before: always">

OR IN CSS

hr {page-break-before: always;}

Compatible with Internet Explorer 4 upwards and Netscape 6/Mozilla.

W3 Schools reference to "page-break-before"

Generic web form emailer using FOR EACH and CDONTs

The ASP code below will loop through all the requested form fields submitted to it and send a CDO email from your server to your email account with the values of all those fields.

PROCESS PAGE

<%

Dim cdoMail, Recipient, Subject, Redirect, Sender, item, MailText

Recipient = "my_account@nobody.com"

Subject = "Enquiry from website"

Redirect = "index.html"

Sender = "server@nobody.com"

  MailText = "Email received from my website"

for each item in request.form

  MailText = MailText & item & ": " & request.form(item) & vbcrlf

next

Set cdoMail = Server.CreateObject("CDONTS.NewMail")

  cdoMail.From = Sender

  cdoMail.To = Recipient

  cdoMail.Subject = Subject

  cdoMail.Body = MailText

  cdoMail.Send

Set cdoMail = Nothing

Response.Redirect Redirect

%>

For more information about the FOR EACH vbscript statement please see my previous post below.

Simple ASP Form Collection with FOR EACH

The code below shows how to grab form submitted data from a page by looping through all submitted form items using the FOR EACH vbscript code.

Note: The submit button does NOT have a NAME attribute, this is so it doesn't appear within the fields on the process page.

The code can be altered to loop through query string data aswell. Simply replace "for each item in request.form" with "for each item in request.querystring".

FORM PAGE

<html><head><title>Lazy Man's Form Collection using FOR EACH in ASP</title></head><body>

<form action="form_collection.asp" method="post"> <input type="text" name="Name">

<input type="text" name="Address">

<input type="text" name="Country">

<input type="text" name="Age">

<input type="submit" value="submit">

</form>

</body></html>

PROCESS PAGE

<html><head><title>Form Collection</title></head><body>

<%

for each item in request.form

response.write "<b>" & item & ":</b> " & request.form(item) & "<br>"

next

%>

</body></html>

BDO Bi-directional Override HTML Tag

The <bdo> HTML tag is used to override the default direction of text. This can be handy when a web page contains paragraphs of other languages such as Chinese.

Attributes for this tag include:

dir - Specifies the direction [ltr or rtl]

lang - Specifies Language Code (RFC 1766)

This is the only tag that will reverse the direction of text so far and is only supported by Internet Explorer 5 upwards.

RFC 1766 Language Codes

ACRONYMS and HTML

There are two different ways to define the meaning of an acronym within an HTML document, the ACRONYM tag and the ABBR tag. In practise they are very similar, although their compatibility varies with browsers.

Examples

<acronym title="Hypertext Markup Language">HTML</acronym>

<abbr title="Extensible Markup Language">XML</abbr>

<ABBR> is only compatible with Netscape 6 upwards (Mozilla) whereas <ACRONYM> is supported by Internet Explorer 4 upwards and Netscape 6 upwards. It's probably a better choice to opt with <ACRONYM> in light of this.

Website Spam Avoidance - Javascript Code

Use the following JavaScript if you want to display an email address on your website, but you don't want to receive spam mail. It will avoid getting picked up by Spammer's email collecting scripts.

<script language="JavaScript" type="text/javascript">

<!--

var LinkText = "click here";

var e1 = "mail";

var e2 = "to:";

var EmailPart1 = "yourname";

var EmailPart2 = "yourdomain";

var EmailPart3 = ".com";

document.write("<a h" + "ref=" + e1 + e2 + EmailPart1 + "@" + EmailPart2 + EmailPart3 + ">" + LinkText + "</a>")

//-->

</script>