473,776 Members | 1,572 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Do Until Loop

Hello,
I am wondering if a Do until loop can be used in Javascript. I have an
array and want to fill the array 10 times with the users details until
it reaches 10 or if they press cancel. I'm using window.prompt to get
user info. Any suggestions.

Do {
//ask user to input their details
} while (myairline !=10);

Nov 25 '05
15 51856
In article <21************ ****@PointedEar s.de>, Thomas 'PointedEars'
Lahn <Po*********@we b.de> writes

<snip>
do
{
alert('as long as condition applies') // But do it once even if the condition is initially false }
while (condition);

<snip>

John
--
John Harris
Nov 26 '05 #11
Thomas 'PointedHead' Lahn said the following on 11/25/2005 5:54 PM:
Randy Webb wrote:

Thomas 'PointedEars' Lahn said the following on 11/25/2005 4:46 PM:
[My previous posting containde pseudo-code, I wanted to post script code]
Then why didn't you post script code this time?

I did, read again.

The code itself is exactly the same.

It is not, read again.


Ahh yes, the brackets are in the second. Hmmm, condition is undefined.
When correcting yourself, you should reply to yourself.

No, you should not. There are three prudent ways when this happens
(I think we agree that it should not happen in the first place.)

A) Supersede the article to be corrected so that the new article
will be posted and the old article be canceled automatically
by the news server because of the Supersedes header it contains,
specifying the old article via its Message-ID.


Theory: A post will be cancelled when it is Superseded.
Reality: It doesn't happen that way.
B) Cancel the old article and repost it. Virtually the same as A),
however it is supported by news servers that support the Cancel
control message and not the Supersedes header. (However, both
are specified in Son-of-RFC-1036, the quasi-standard Usenet is
based on.)
Theory: A post will be cancelled when it is Cancelled.
Reality: It doesn't happen that way.
C) Reply to the erroneous article. Only necessary on very large
postings where little is to be corrected and a complete repost
would waste bandwidth. Since the advent of Usenet spam, there
should not be one _public_ news server or Web interface out
there that disregards Cancel control messages, even though they
are only part of the quasi-standard.
C) Is the best option, even though you failed to realize it.
I did A), using my newsreader's built-in feature that works perfectly
since the old article was indeed canceled. What is your excuse?
It was cancelled? Then how do you suppose I read it? Are you saying I
have ESP? Yippeeeeeee.

BULLSHIT.

<URL:
http://groups.google.com/group/comp....cc4f20ec68b6e6
Theory: Thomas's warped view of the world.
Reality: You are wrong.
Top-posting is *never* acceptable. Even when correcting oneself.

I was _not_ top-posting, read again!


You should learn what top-posting is.
Let me quote the wikipedia that you seem to be so fond of:

<quote cite="http://en.wikipedia.or g/wiki/Top_posting">
Top-posting means replying to a message above the original message.
</quote>

Well guess what? The very first line of your post was new content. That
is top_posting you moron. Learn the difference.
And learn to understand the concept of submitter's note,
unless you want to make a complete fool of yourself here.
I have been attacked by a lot better than you, so take your best shot.
PointedHead


Take your mistakes with a grain of salt like everybody else.

--
Randy
comp.lang.javas cript FAQ - http://jibbering.com/faq & newsgroup weekly
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
Nov 26 '05 #12

Randy Webb wrote:
Thomas 'PointedHead' Lahn said the following on 11/25/2005 5:54 PM:
Randy Webb wrote:

Thomas 'PointedEars' Lahn said the following on 11/25/2005 4:46 PM:

[My previous posting containde pseudo-code, I wanted to post script code]

Then why didn't you post script code this time?

I did, read again.

The code itself is exactly the same.

It is not, read again.


Ahh yes, the brackets are in the second. Hmmm, condition is undefined.
When correcting yourself, you should reply to yourself.

No, you should not. There are three prudent ways when this happens
(I think we agree that it should not happen in the first place.)

A) Supersede the article to be corrected so that the new article
will be posted and the old article be canceled automatically
by the news server because of the Supersedes header it contains,
specifying the old article via its Message-ID.


Theory: A post will be cancelled when it is Superseded.
Reality: It doesn't happen that way.
B) Cancel the old article and repost it. Virtually the same as A),
however it is supported by news servers that support the Cancel
control message and not the Supersedes header. (However, both
are specified in Son-of-RFC-1036, the quasi-standard Usenet is
based on.)


Theory: A post will be cancelled when it is Cancelled.
Reality: It doesn't happen that way.
C) Reply to the erroneous article. Only necessary on very large
postings where little is to be corrected and a complete repost
would waste bandwidth. Since the advent of Usenet spam, there
should not be one _public_ news server or Web interface out
there that disregards Cancel control messages, even though they
are only part of the quasi-standard.


C) Is the best option, even though you failed to realize it.
I did A), using my newsreader's built-in feature that works perfectly
since the old article was indeed canceled. What is your excuse?


It was cancelled? Then how do you suppose I read it? Are you saying I
have ESP? Yippeeeeeee.

BULLSHIT.

<URL:
http://groups.google.com/group/comp....cc4f20ec68b6e6
>


Theory: Thomas's warped view of the world.
Reality: You are wrong.
Top-posting is *never* acceptable. Even when correcting oneself.

I was _not_ top-posting, read again!


You should learn what top-posting is.
Let me quote the wikipedia that you seem to be so fond of:

<quote cite="http://en.wikipedia.or g/wiki/Top_posting">
Top-posting means replying to a message above the original message.
</quote>

Well guess what? The very first line of your post was new content. That
is top_posting you moron. Learn the difference.
And learn to understand the concept of submitter's note,
unless you want to make a complete fool of yourself here.


I have been attacked by a lot better than you, so take your best shot.
PointedHead


Take your mistakes with a grain of salt like everybody else.

--
Randy
comp.lang.javas cript FAQ - http://jibbering.com/faq & newsgroup weekly
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/


Dec 8 '05 #13
Well, call me old-fashioned, but I don't think I like the sound of
people who gratuitously term others 'morons'.
We are all learning here, and how little you understand if all you are
capable of is abusing people.
Keep me posted.
Paul Mason

Dec 8 '05 #14

Lee wrote:
Paul said:

Well, call me old-fashioned, but I don't think I like the sound of
people who gratuitously term others 'morons'.
We are all learning here, and how little you understand if all you are
capable of is abusing people.


I give up. Who are you talking to?
Please quote the significant part of posts that you respond to.


Lee - don't "give up" - it was simply to say that this exchange
contains abusive language which does nothing to assist a genuine
learning forum. There is a lot more to life than computers, and the
current computer languages. Common civilty has to be learned too, and
for some it may be something they never master.

Dec 9 '05 #15
Paul wrote on 09 dec 2005 in comp.lang.javas cript:
Lee wrote:
Paul said:
>
>Well, call me old-fashioned, but I don't think I like the sound of
>people who gratuitously term others 'morons'.
>We are all learning here, and how little you understand if all you are
>capable of is abusing people.


I give up. Who are you talking to?
Please quote the significant part of posts that you respond to.


Lee - don't "give up" - it was simply to say that this exchange [..]


What exchange?

--
Evertjan.
The Netherlands.
(Replace all crosses with dots in my emailaddress)

Dec 9 '05 #16

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
15684
by: Eric | last post by:
Let me start off by saying I have VB working model which means no help. I have searched MSDN. It seems that I get "Read the help" instead of answers which is totally useless to me. With that said can someone please help me understand why this does not work? Dim x As String Private Sub cmdlogin_Click() Do Until x = "Corey" If txtlogin = "Corey" Then
4
5836
by: .Net Sports | last post by:
I am trying to display records from a recordset after sql statement: <% sqlstr ="SELECT horsename FROM tblhorseentry WHERE trackname = '" & request.querystring("trackname") & "' and racedate = '" & request.querystring("racedate");" Set rs1 = Server.CreateObject("ADODB.Recordset") rs1.Open sqlstr,pConn,3
2
1794
by: MLH | last post by:
Take a look at the code that follows. Line 110 is the beginning of Do-Loop. Regarding line #220, I find that I'm getting Error #3021 (No Current Record) during execution of line #230. It puzzles me as to Why? I thought if I was on last valid record of RecSet when line #220 executes, I would be sent to process lines after line #400. Am I wrong about that? ==> BEGIN CODE SNIPPET <=== 110 Do Until RecSet.EOF StartAnew:
3
4946
by: abitlikehomer | last post by:
Hi i am writing a bit of code so that the date and time of a booking can not be booked twice but i am getting an error message saying "loop without do". Any suggestions? setflag = False Do Until EOF(1) Or setflag = True If customer.bookingdate <> txtdate Then GoTo loopend If txttimefrom >= customer.timefrom And txttimefrom < customer.timeto Then setflag = True Else ' 'potentially ok'
3
2092
by: peter.meth | last post by:
Hi All, I am making a file manager type of application and am trying to duplicate Windows Explorer's behaviour when copying files; ie, display a second form with the copy files animation. As it is copying files, it should show the file name and folder. For testing purposes I am sleeping for 1 second to simulate a file being copied. My problem is that when I run the code, the labels do not change to reflect the file names until the...
4
143999
by: Madhavi | last post by:
Hi Is there any Do Until Loop in C# Maadhavi
3
11875
by: SyGC | last post by:
Hi People, Im trying to do a simple Loop where by an IP address is pinged (Using My.computer.network.ping) and the results, true or false, are used to invoke another line of code. Basically if the IP is pingable (true) image A is displayed if it is not (false) then image B is. The code i am using is as follows Dim IPAddress As String = "192.168.1.122"
2
3162
by: Constantine AI | last post by:
Hello, i am wanting a Loop procedure to check details of all the multiple rows with the following D-LOOKUP procedures; StkID.Value = DLookup("", "stkmas", " = Forms!!") Price.Value = DLookup("", "primas", " = Forms!!") For the Loop procedure to work i have used the following code: Dim dbs As Database Dim rst As Recordset Dim Reply As String Dim strSQL As String Set dbs = CurrentDb
5
9289
by: dbrother | last post by:
Access 2003 Win XP Pro SP3 Using SQL /ADO Recordsets in a Do Loop Hello, I'm using a random number generator based on an integer input from a user from a form that will get X number of random records from an external Oracle source using a SQL statement. The SQL statement works as expected when the loop code is commented out, but I receive an error "SQL command not properly ended" when the loop is active. Do Until intLoop = UserNum ...
0
9464
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10289
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10120
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10061
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8952
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6722
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5493
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3622
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2860
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.