discusmania
IS-IT--Management
Dear all...
anybody know how to check a condition before open a popup window. for example in for add.asp i have an input field called line_name and a button named "open popup". the onclick even handler for the button will open a popup window: I want the program to be able to check whether the line input box has value or not. if has value, proceed to open the popup, else prompt a message to user. here's the script without the condition:
<html>
<head><title>open popup with condition</title>
<!-- upload popup window -->
<SCRIPT LANGUAGE="JavaScript">
function popUp(URL) {
day = new Date();
id = day.getTime();
eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=1,width=250,height=180,left = 462,top = 334');"
}
// End -->
</script>
</head>
<body>
<INPUT TYPE="text" name="line_name"><p>
<INPUT TYPE="button" name="openpopup" value="Open Popup" onClick="javascriptopUp('
</body>
</html>
thanks for your help
NEW IN ASP
NOR
anybody know how to check a condition before open a popup window. for example in for add.asp i have an input field called line_name and a button named "open popup". the onclick even handler for the button will open a popup window: I want the program to be able to check whether the line input box has value or not. if has value, proceed to open the popup, else prompt a message to user. here's the script without the condition:
<html>
<head><title>open popup with condition</title>
<!-- upload popup window -->
<SCRIPT LANGUAGE="JavaScript">
function popUp(URL) {
day = new Date();
id = day.getTime();
eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=1,width=250,height=180,left = 462,top = 334');"
}
// End -->
</script>
</head>
<body>
<INPUT TYPE="text" name="line_name"><p>
<INPUT TYPE="button" name="openpopup" value="Open Popup" onClick="javascriptopUp('
</body>
</html>
thanks for your help
NEW IN ASP
NOR