Here's how I implemented a javascript-based login page:
function imgError()
{ alert('Sorry, that is not correct.'); :-(
document.enter.password.value='';
}
function imgLoad() { window.location=this.password+'.html'; }); :-)
function tryit()
{ var I = new Image(1,1)
I.onerror=imgError...
I went one better than that... I defined a .write() method on the String.prototype object. You can see it at http://www.uuclb.org/Calendar.html (you'll find my navigable calendar component there too!).
Function writeFn(doc)
{
if(!doc)doc=document;
doc.write(this);
return (this);
}...
I have already implemented a javascript navbar component (among many, many others). You can see it at http://www.uuclb.org/Calendar.html in the horizontal orientation. (you'll find my navigable calendar component there too!)
Basically, you create an array -- just .split() a String -- and tack...
Use the Date object's .valueOf() function which returns the milliseconds elapsed since the base date.
(today.valueOf()-registered.valueOf())/(1000*60*60*24)
Once you have the millisecond difference between dates, convert it to days. Then you can Math.round() it if you want.
I've already created a navigable calendar component (in JavaScript) which accounts for the week-of-month. Take a look at http://www.angelfire.com/ca/redwards/Calendar.html and notice how easily you can select the "2nd Sunday" or "last Tuesday"
As you navigate the calendar...
Help! Help! I've created a solid cross-browser navigable calendar (http://www.angelfire.com/ca/redwards/Calendar.html), but the first button won't display in Netscape 4.7 !!?!
Everything else still works, but the Su (Sunday) button doesn't appear in Netscape 4.7 --- but I have tested it...
Thanks! Feel free to re- File|Save As... from http://www.angelfire.com/ca/redwards/Calendar.html onto your own system and play around with it. Let me know if you like it...
"Richard...
I have discovered that huge complex pages can be rendered by javascript, if invoked by a single .write() statement.
Consider my navigable cross-browser calendar component at http://www.angelfire.com/ca/redwards/Calendar.html
Once the supporting 26K dynamicHTML3.js library is cached, only (new...
I have revised my calendar component http://www.angelfire.com/ca/redwards/Calendar.html to include next/prev day/month/year. From your browser, you can do File|Save As... to play with it yourself. The relevant code is
(new Date()).calendar().write()
NEVERSLEEP: Per your suggestion, I added a "Today" button. I added prev/next day/month/year buttons too.
Take a look... http://www.angelfire.com/ca/redwards/Calendar.html
If you resave http://www.angelfire.com/ca/redwards/Calendar.html to your local file system, I think you'll find that it works (ENTER included) for all browsers (including IE6). I made two significant changes to dynamicHTML3.js
After .form(name) I inserted...
In your browser, save http://angelfire.com/ca/redwards/Calendar.html to your own local file system. Then if you are bold enough to edit dynamicHTML3.js, look for function calendarFn (this builds the calendar). At the bottom of this function, after the .form(name) I have inserted...
wullie: Thank you for your input (no pun intended). If I am not mistaken, the update I have on http://www.angelfire.com/ca/redwards/Calendar.html works under IE/NS/Op 4/5/6 [except for Op4] !!
I look forward to designing more sophisticated pages/sites using clientlets.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.