ch***************@gmail.com wrote:
Hi chang, can you put the html which ur working so that i can see what
exactly happening.
Sine the Web page was created by the ASP reponse.write, I include the
write out here as I grab from the view source
<htm>
...
<script language=javascript>
function checkRole(guest)
{
if (guest == 'guest') {
var val = document.Form1.Text1.value;
var win = window.open('otherPage.asp?val='+val, 'name');
win.close();
}
else (
//do something else
)
}
function addAddress()
{
var val = document.Form1.Text1.value;
var win = window.open('secondPage.asp?val='+val, 'name');
}
-->
</script>
<body>
<form name=Form1 >
<a href="#" onclick="addAddress();">Add Address</a>
<input type=Text name=Text1 value="myemail@hotmail;.."
onblur="checkRole('guest')>
<input type=Text name=Text2 value="" >
......
</form>
</body>
</html>
Above is the part that I have problem. The values in the Text1 and in
the function of checkRole(..) were entered by the Database return.
Basically, I tried to prevent user to change the old value in the input
field if they do not meet certain condition, after that user can either
click on the link (Add Address) to open an pop-up address book to do
something else or continue other input fields on the page. The page is
huge. However, if user meet the role, whatever user add extra value in
the text1 value field, the function call will open the otherPage.asp to
process the value. That is problem come in. because when user click on
the link first time, the process on the ohterpage is working and done (I
can see the a quick window open and close), So the secnodPage will not
open, until I click again on the link. I want to know how to avoid
that. Is the onafterupdate event available for the <input>? It is
mentioned in the Jscript reference. Thanks.
C Chang