jhmoen
asked on
popup when condition is true
I have the following situation, but not sure of the syntax here. What I want to do is popup a browser window if the IF conditions are true.
<%
' IF TODAYS DATE IS > PROJECTED DATE OR NO RECORD RETURNED>>>>DISPLAY POPUP REMINDER
if Date() > (projectedRS.Fields.Item(" ProjectedD ate")) then
'load browser popup
<A HREF="javascript:window.op en('remind er.asp','r eminder',' scrollbars =yes,width =400,heigh t=400');" ></A>
else
if projectedRS.EOF or projectedRS.BOF then
'load browser popup
<A HREF="javascript:window.op en('remind er.asp','r eminder',' scrollbars =yes,width =400,heigh t=400');" ></A>
else
'do nothing stay here
end if
end if
The error I get is:
Expected Statement: on this line: <A HREF="javascript:window.op en('remind er.asp','r eminder',' scrollbars =yes,width =400,heigh t=400');" ></A>
%>
<%
' IF TODAYS DATE IS > PROJECTED DATE OR NO RECORD RETURNED>>>>DISPLAY POPUP REMINDER
if Date() > (projectedRS.Fields.Item("
'load browser popup
<A HREF="javascript:window.op
else
if projectedRS.EOF or projectedRS.BOF then
'load browser popup
<A HREF="javascript:window.op
else
'do nothing stay here
end if
end if
The error I get is:
Expected Statement: on this line: <A HREF="javascript:window.op
%>
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
good to know, that probably helps but I can't get the date compares line to work yet, so I don't even get there yet, but thanks.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
I am going with a javascript function with this, but my syntax is still wrong in comparing the dates:
<%
' IF TODAYS DATE IS > PROJECTED DATE OR NO RECORD RETURNED>>>>DISPLAY POPUP REMINDER
if Date() > (projectedRS.Fields.Item("
load browser popup
return submitForm()
else
if projectedRS.EOF or projectedRS.BOF then
'load browser popup
return submitForm()
else
'do nothing stay here
end if
end if
%>
AND my function is as:
function submitForm(){
var newwindow;
var objForm = document.forms['form1'];
newwindow=window.open('rem
objForm.action = "newwindow"
return true;
}
Can't get to my function yet, because of the dates problem...any ideas
UPED THE POINTS