Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP 3 Classic ASP Active Server Pages 3.0 > Classic ASP Basics
Password Reminder
Register
| FAQ | Members List | 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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
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!

Reply With Quote
  #2 (permalink)  
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
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


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



All times are GMT -4. The time now is 09:24 PM.


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