Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Warn Pop-Up before continuing.... 1

Status
Not open for further replies.

JrClown

Technical User
Oct 18, 2000
393
US

Hello all, I need to know how to display a pop-up window with a warning as soon as the user clicks on it and before it processes the linked page.

Here's the scenario, the user click on a job and by clicking, the job get's assigned to her, but chances are they can go back and click on another link and pick up a second job which they are not suppossed to, and when they do pick up that second job the system locks up and I have to manually go into the access database and undo their mistake.
Please help... I'm trying to fix problems that other person setup before I came here for now.. Thanks

"The reward of one duty done is the power to fulfill another"
<%
Jr_Clown@Yahoo.com
%>
 
jrclown,

I use this on the same page that will do some processing for me.

<script language=&quot;javascript&quot;>
var clickok = window.confirm(&quot;This page will begin processing APPROVED Applicants.\n Click OK to continue. Click Cancel to stop.&quot;);

if (clickok == false) { document.location=&quot;myother.asp&quot;;}

</script>


fengshui_1998
 
that worked great FengShui1998, here's a follow-up question tho, When the user clicks on the link, I'm having an email sent to the sales person advising them the job has been picked up, my question is, would my email go out if they select &quot;Cancel&quot; on the pop-up ?? I could not test today because our server was being re-booted when you replied. Thanks in advance.

&quot;The reward of one duty done is the power to fulfill another&quot;
<%
Jr_Clown@Yahoo.com
%>
 

jrclown,

Once a job is complete, you might want to set a session variable,

Session(&quot;No_Jobs&quot;) = 1

In your ASP, you can check for the number of jobs and avoid them of seeing the code to pick the jobs again.

if Session(&quot;No_Jobs&quot;) = 0 then
... Pick your jobs here
else
... Go do something else.

end if

As far as the email is concerned, you can place the javascript code after either before or after you send the email in the ASP page. That's up to you.

fengshui_1998
 
I am doing a session where checks if a user already has a job and it's working fine. The problem is the users mental freeze that because they can see the pick up job here screen they accidently pick up another one (^&%$#@*).

Before a week ago, they could not access the &quot;pick up a job here&quot; page but the dept supervisor requested to make it viewable to everyone, so I did. Anyway bud, thanks for your contribution.

&quot;The reward of one duty done is the power to fulfill another&quot;
<%
Jr_Clown@Yahoo.com
%>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top