In this code snippet i will show you how you can click a button after an input field wich creates a popup. This popup is actually a plain html page where you can enter data into a textarea. When the user is done editing text in the textarea, he can hit the save button and [...]
You can use this javascript function to resize the height of your iframe depending on the size of your parent page.
PLAIN TEXT
JAVASCRIPT:
<script language="JavaScript">
function iFrameHeight() {
if(document.getElementById && !(document.all)) {
h = document.getElementById('main').contentDocument.body.scrollHeight;
document.getElementById('main').style.height = h + 100;
}
else if(document.all) {
h = document.frames('main').document.body.scrollHeight;
document.all.main.style.height = h + 100;
}
}
If you want to limit the number of characters people can type in a textarea object. U should use a javascript because there is no such "maxlength" attribite as with a "normal" textbox.In the code below i use a small textbox (txtCounter) near the textarea to show the remaining characters.
Paste this code in the tag [...]
Javascript just offers a simple alert box without any customisation. With the code below u can call a VBscript function from javascript witch makes it possible to create your own alert box with or without an icon.
Javascript function
NS4 = (document.layers);
IE4 = (document.all);
ver4 = (NS4 || IE4);
function newAlert(title,mess,icon,mods) {
(IE4) ? makeMsgBox(title,mess,icon,0,0,mods) : alert(mess);
}
VBScript function
Function makeMsgBox(tit,mess,icons,buts,defs,mods)
butVal = [...]
| M | T | W | T | F | S | S |
|---|---|---|---|---|---|---|
| « Jun | ||||||
| 1 | 2 | 3 | 4 | 5 | ||
| 6 | 7 | 8 | 9 | 10 | 11 | 12 |
| 13 | 14 | 15 | 16 | 17 | 18 | 19 |
| 20 | 21 | 22 | 23 | 24 | 25 | 26 |
| 27 | 28 | 29 | 30 | 31 | ||