Menu
I have two function being loaded on one onClick. The 2nd function is loaded
before the 1st one is completed. How can I get the 1st function to finish
loading before the 2nd function is loaded. Is there such a command call
sleep or pause that I can set up? I am not that skillful with java scripts.
Thank-u
Cindy
?
<td width="155" style="word-spacing: 0; border-left: 2px solid #FFFFFF;
border-bottom: 2px solid #FFFFFF; margin: 0">
<p style="text-align: center"><b>
<a title="Click here to clear Friends;"
onMouseOver="window.status='Click here to clear Friends';"
return false;
target="_top" href="index.html">2. Friends</a></b></td>
<br>
<br>
<td width="48%" style="word-spacing: 0; border-left: 2px solid #FFFFFF; margin: 0" valign="top" align="center">
<p style="margin-top: 0pt; margin-bottom: 0pt;"><font color="#000000">
<INPUT TYPE="button" value="John" name="Segments" title="Click Here to select this Friend;"
onClick="segement(this.form); var loadFunc2 = setTimeout('exercise(ths.form)', 100);"
onMouseOver="window.status='Click Here to select this Friend';
return true;"
style="word-spacing: 0; border: 1px solid #0066FF; margin: 0; background-color: #0066FF"></font> </p>
<i>
</i>function segement(frm) {
parent.I3.location='seg1/actions.html';//if the parent exists and this code
parent.pix.location='images/John.jpg';//executes then the whole thing will work
parent.info.location='seg1/message/John.htm'
exercise(frm)
}
function getSelectedButton(buttonGroup){
for (var i = 0; i < buttonGroup.length; i++) {
if (buttonGroup[i].checked) {
return i
}
}
return 0
}
function exercise(frm) {
var i = getSelectedButton(frm.gender)
if (frm.gender[i].value != "John" ) {
alert("You have not choosen any Processor Emulation.")
}else if (frm.gender[i].value == "John") {
alert("You choosen " + frm.gender[i].value + ".")
window.open("images/John.jpg", "sub", "HEIGHT=200,WIDTH=200")
}
}
//-->
</SCRIPT>
</head>
<body style="word-spacing: 0; margin: 0; background-color: #0066FF;
vertical-align:top" link="#FFFFFF" vlink="#FFFF00" alink="#00FF00">
<table cellpadding="0" cellspacing="0" style="border-collapse: collapse; word-spacing: 0; margin: 0" width="346" id="AutoNumber2">
<tr>
<FORM METHOD=POST ENCTYPE="text/plain" onReset="return allowReset()" style="text-align: left; word-spacing: 0; margin: 0">
<td width="189" style="word-spacing: 0; border-left-width: 1; border-right: 2px solid #FFFFFF;border-top-width: 1; border-bottom: 2px solid #FFFFFF; margin: 0">
<p>
<b><font color="#FFFFFF">
<INPUT TYPE="reset" size="10" value="1. Characters" style="color: #FFFFFF;font-weight: bold;word-spacing: 0; margin: 0; background-color: #0066FF; width:183;height:0; position:relative; float:left; left:0; top:0;" title="Click here to clear Character;"
onMouseOver="window.status='Click here to clear Characters';return true;"
onClick="hardReload()"></font></b></td>
<td width="155" style="word-spacing: 0; border-left: 2px solid #FFFFFF;border-bottom: 2px solid #FFFFFF; margin: 0">
<p style="text-align: center"><b>
<a title="Click here to clear Friends;"
onMouseOver="window.status='Click here to clear Friends';return false;"
target="_top" href="index.html">2. Friends</a></b></td>
</tr>
<tr>
<td width="189" style="word-spacing: 0; border-right: 2px solid #FFFFFF; margin: 0">
<INPUT TYPE="radio" NAME="gender" value="John"> John<br>
<INPUT TYPE="radio" NAME="gender" value="Josh"> Josh<br>
<INPUT TYPE="radio" NAME="gender" value="KatyBeth"> KatyBeth<br>
<INPUT TYPE="radio" NAME="gender" value="Johnny & Hazel"> Johnny & Hazel<br>
<INPUT TYPE="radio" NAME="gender" value="Sarah"> Sarah<br>
<INPUT TYPE="radio" NAME="gender" value="NoNoBite"> NoNoBite<br>
<INPUT TYPE="radio" NAME="gender" value="Banana"> Banana<br>
<INPUT TYPE="radio" NAME="gender" value="Grassy & Sally"> Grassy & Sally<br>
<br>
<br>
</p>
<td width="48%" style="word-spacing: 0; border-left: 2px solid #FFFFFF; margin: 0" valign="top" align="center">
<p style="margin-top: 0pt; margin-bottom: 0pt;"><font color="#000000">
<INPUT TYPE="button" value="John" name="Segments" title="Click Here to select this Friend;"
onClick="segement(this.form);"
onMouseOver="window.status='Click Here to select this Friend';return true;"
style="word-spacing: 0; border: 1px solid #0066FF; margin: 0; background-color: #0066FF"></font> </p>
0.1.9 — BETA 5.26