Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

IF ERROR FOUND IN THE WHILE LOOP HOW TO DISPLAY THE ERROR MESSAGE ON TOP THE LOOP

Posted on 2006-06-14
5
Medium Priority
?
266 Views
Last Modified: 2010-05-18
IF ERROR FOUND IN THE WHILE LOOP HOW TO DISPLAY THE ERROR MESSAGE ON TOP THE LOOP
0
Comment
Question by:mayachoy
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
5 Comments
 
LVL 9

Expert Comment

by:matthew016
ID: 16908951
Display a test print inside of the loop, u can't go back on top of it
0
 
LVL 3

Expert Comment

by:Kanti
ID: 16910123
Once you get into the loop you cannot go on top. You can try something like the below
<HTML>
 <HEAD>
  <TITLE>Using the for Statement</TITLE>
 </HEAD>

 <BODY>
  <H1>Using the for Statement</H1>
  <%
    int loopIndex;

    for (loopIndex = 1; loopIndex <= 10; loopIndex++) {
      out.println("This is iteration number "   + loopIndex + "<BR>");
    }
  %>
 </BODY>
</HTML>
0
 
LVL 35

Accepted Solution

by:
TimYates earned 200 total points
ID: 16911456
You can of course do:

<HTML>
 <HEAD>
  <TITLE>Using the for Statement</TITLE>
 </HEAD>

 <BODY>
  <div id="errors"></div>
  <H1>Using the for Statement</H1>
  <%
    int loopIndex;

    for (loopIndex = 1; loopIndex <= 10; loopIndex++) {
      out.println( "<script type=\"text/javascript\">document.getElementById( 'errors' ).innerHTML += 'This is iteration number' + loopIndex + '<BR>' ;" ) ;
    }
  %>
 </BODY>
</HTML>
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Working from home is a dream for many people who aren’t happy about getting up early, going to the office, and spending long hours at work. There are lots of benefits of remote work for employees.
Explore the ways to Unlock VBA Project Password Excel 2010 & 2013 documents. Go through the article and perform the steps carefully to remove VBA Excel .xls file.
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…
Please read the paragraph below before following the instructions in the video — there are important caveats in the paragraph that I did not mention in the video. If your PaperPort 12 or PaperPort 14 is failing to start, or crashing, or hanging, …

604 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question