Wrox Programmer Forums
| Search | Today's Posts | Mark Forums Read
Classic ASP Basics For beginner programmers starting with "classic" ASP 3, pre-".NET." NOT for ASP.NET 1.0, 1.1, or 2.0
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old January 25th, 2005, 02:12 AM
Authorized User
 
Join Date: Dec 2004
Location: , , .
Posts: 31
Thanks: 0
Thanked 0 Times in 0 Posts
Default Placing a function() or alert() in the program

Dear all, got a favour to ask as I have problems solving the algorithm of the program.

The test page is http://n.domaindlx.com/hayley/overalljobalert.asp

I wanna do an alert() such that when the program runs, ONLY when there are overdue dates then the window alert will pop up once to warn the user to check the overdue dates.
As it is in a while loop, when there are 3 overdues, the window pops up 3 times. I can't figure out how I can solve it. Any suggestions? Please help..Thanks so much in advance!

 
Old January 25th, 2005, 04:50 AM
Authorized User
 
Join Date: Aug 2004
Location: Calicut, Kerala, India.
Posts: 58
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I suppose you need to alert when the page is been loaded.
I will suggest to get the messages in a javascript array.

Such as

 <script language = "javascript">
  var arr_messages = array(1);
<%
  Dim i_count
  i_count = 1
 while not rs.eof
%>
  arr_messages.length = <%=i_count%>;
  arr_messages[<%=i_count-1%>] = " Your message";
<%
  rs.movenext
 wend
%>
</script>

After these things you can call this function from onload()

<script language = "javascript">
function func_messages()
{
   for(i=0;i< arr_messages.length;i++)
   {
      alert(arr_messages[i]);
   }
}
</script>

 You can employ any idea. This is just to explain how to interact between javascript and ASP.
 Hope it helps you.:)


Shibu Narayanan
Software Associates




Similar Threads
Thread Thread Starter Forum Replies Last Post
Placing Session variable KamalRaturi ASP.NET 2.0 Professional 3 September 13th, 2006 04:53 AM
Setup Project: Program not added in Start>Program arif_1947 VS.NET 2002/2003 2 March 31st, 2005 06:40 AM
One for the gurus - alert function icon badgolfer ASP.NET 1.0 and 1.1 Basics 3 September 9th, 2004 04:01 PM
alert function mahulda ASP.NET 1.0 and 1.1 Basics 5 April 9th, 2004 11:05 PM
Placing processes in the background ohwail C++ Programming 2 September 10th, 2003 11:47 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.