HTML markup
Want to add external HTML code to
your page, but really don't want to violate the rule: Thou shaw not open
notepad to do any HTML? Well, here's another way. The HTML
Markup option allows you to not only insert HTML, but also,
Javascript or any other external code to your FrontPage-made page. There's
also another good reason to insert code this way, that is, it keeps all
external code organized and tucked away in this neat little container. If you may wish to delete this external code in the future, it saves you a
lot of time and pain -you don't have to open notepad and dig through the
mess to delete it, and also, since everything within this yellow container
is independent of all other code, rest assured that if it ever occurs that
you're going to modify or delete it, no harm will come to your existing
webpage. (Unlike if you're unfamiliar with HTML, and tried to delete it in
notepad.) Ok, lets give two examples of "external" codes-An HTML
and a JavaScript code that you may wish to add to your page someday using
HTML Markup.
Lets say you want to add the HTML code
below that'll open another window when you click it. Here's the code:
<A HREF="http://my.akcecc.kiev.ua/nika/frpage"
TARGET="_top">Click here to open another window and go to
FrontPage Help Guide!</A>
If you want to add this code
(which opens
another window and takes you to cnn, do this: Position
the cursor to exactly where you want the code to be inserted.
Click insert, HTML markup. A box will pop up. Enter (cut
and paste) the code into the box, and click ok. When you view the page in
the browser, this is what you'll see right after the cursor position:
Click here to open another window and go to FrontPage Help Guide!
Just to make it clear that HTML isn't the only thing you can
insert using HTML Markup, lets add a JavaScript code,
which is what you're most likely insert for the most part, since there're
so many pre-made javascripts on the web which you can just cut and paste
into your page.
Here's a code that gives you the current time:
<SCRIPT
LANGUAGE="JavaScript"> <!-- Clock -- var timerID = null var
timerRunning = false
function
stopclock(){ if(timerRunning) clearTimeout(timerID) timerRunning
= false }
function
startclock(){ stopclock() showtime() } function
showtime(){ var now = new Date() var hours = now.getHours() var
minutes = now.getMinutes() var seconds = now.getSeconds() var
timeValue = "" + ((hours > 12) ? hours - 12 : hours) timeValue
+= ((minutes < 10) ? ":0" : ":") + minutes timeValue +=
((seconds < 10) ? ":0" : ":") + seconds timeValue += (hours
>= 12) ? " P.M." : " A.M." document.clock.face.value = timeValue
timerID = setTimeout("showtime()",1000) timerRunning =
true } //--> </SCRIPT> <BODY
onLoad="startclock()"> <!---------------------------> <form
name="clock" onSubmit="0"> <INPUT TYPE="text" NAME="face" SIZE=11
VALUE ="....Initializing...."> </form>
To add this code to your page, simply copy
this code into your clipboard, click insert HTML Markup,
and paste the whole thing into the box. You're done.
|