Javascript??? You want javascript.... here you go! This is off my personal/family web page that I wrote. It is not currently on the web now, but it was at one time.
Code: Select all
<script type="text/javascript">
function NextBit() {
if (WhichNext == 1) {
if (FormData.FUserName.value != "" && FormData.FUserMail.value != "") // both have data?
FormData.ContB.disabled = false;
}
if (WhichNext == 2) {
if (FormData.Who.selectedIndex > 0){
FormData.ContB.disabled = false;
document.getElementById("SelPer").innerHTML = FullName(FormData.Who.options[FormData.Who.selectedIndex].value);
}
}
if (WhichNext == 3) {
if (FormData.Sex[1].checked == true || FormData.Sex[0].checked == true){
FormData.FirstName.disabled = false;
FormData.MiddleName.disabled = false;
FormData.LastName.disabled = false;
FormData.BirthMonth.disabled = false;
FormData.BirthDate.disabled = false;
FormData.BirthYear.disabled = false;
if (FormData.Sex[0].checked == true)
FormData.Suffix.disabled = false;
else
FormData.Suffix.disabled = true;
// now is required info in?
if (FormData.FirstName.value != "" && FormData.LastName.value != "") // both have data?
FormData.ContB.disabled = false;
}
else {
FormData.FirstName.disabled = true;
FormData.MiddleName.disabled = true;
FormData.LastName.disabled = true;
FormData.BirthMonth.disabled = true;
FormData.BirthDate.disabled = true;
FormData.BirthYear.disabled = true;
}
}
if (WhichNext == 4) {
document.getElementById("PerInp").innerHTML = FormData.FirstName.value
if (FormData.Alive[1].checked == true || FormData.Alive[0].checked == true){
if (FormData.Alive[0].checked == true) { // Alive
document.getElementById("IsDead").style.display = "none"
document.getElementById("IsAlive").style.display = "inline"
}
else {
document.getElementById("IsAlive").style.display = "none";
document.getElementById("IsDead").style.display = "inline";
}
FormData.ContB.disabled = false;
}
}
if (WhichNext == 5) FormData.ContB.disabled = false; // may not know date of death!
if (WhichNext == 6) {
if (FormData.How.selectedIndex > 0)
FormData.ContB.disabled = false;
}
if (WhichNext == 7) {
document.getElementById("divButton").style.display = "none";
if (FormData.AddMore[1].checked == true || FormData.AddMore[0].checked == true)
FormData.SubmitB.disabled = false;
else
FormData.SubmitB.disabled = true;
}
}
function SaveAdd(FormData) {
var Num = 900, Count = 1;
if (CookieValue("NewPCount") != null){
Count = parseInt(CookieValue("NewPCount"),10)+1;
Num = Count+899;
}
var PerNameStr = FormData.FirstName.value + " ";
if (FormData.MiddleName.length != 0) PerNameStr += FormData.MiddleName.value + " ";
PerNameStr += FormData.LastName.value;
if (FormData.Sex[0].checked && FormData.Suffix.value != "") PerNameStr += ", " + FormData.Suffix.value;
SetCookie("AddP"+Num,PerNameStr,14,"days");
SetCookie("NewPCount",Count,14,"days");
PerNameStr = ((FormData.AddMore[0].checked) ? "Done" : "More");
SetCookie("AddPNext",PerNameStr,10,"minutes");
if (PerNameStr == "More") {
SetCookie("FUserName",FormData.FUserName.value,10,"minutes");
SetCookie("FUserMail",FormData.FUserMail.value,10,"minutes");
}
}
function CanCont() { // button click
document.getElementById("div"+WhichNext).style.display = "none"
WhichNext++;
document.getElementById("div"+WhichNext).style.display = "inline"
FormData.ContB.disabled = true; // disable button
setInterval("NextBit()",500);
}
var WhichNext = 1;
</script>
But note that I wish to call asp pages, which use VBScript to retrive data. At one time,
MANY years ago, my pages were in asp being hosted at my ISP.
Here is my program plan:
1. Init [of course]
2. open normal window
3. if user/me selects update stats
3a. open IE - invisible
3b. auto log in
3c. loop through array of asp pages to hit
3d. get/save data off each [Leaving IE invisible]
4. update main window
5. if wish to make changes, make IE visible.
6. while making changes, get the changes and update data
7. when end prg, close IE if already haven't
I have edited my previous post to note that the dll is not included in Vista.
IMO, I think that this is still my main problem. At least from what I have witnessed on my screen.
The dhCreateObject opens a completly blank window! Then the Navigate command, using the "& Chr(13)" opens a new browser window, and any more navigates opens new tabs, probably would open more windows if I didn't have tabbed browsing.