You are viewing limited content. For full access, please sign in.

Question

Question

How to stop a loop in javascript?

asked on March 21, 2018 Show version history

Hi all!

 

I make a mistake in my form (javascript)

I created a loop and I can't stop it.

 

var i = 0;
while (i < 10) {
    alert("I am an alert box!");
    i = 1;
}

Each one I'm trying to edit my code, I get the message pop-up. This means I can't edit it and then, I can't stop it.

 

How can I do ?

 

Do not laugh, it's embarrassing XD

 

Thanks in advance.

Regards

0 0

Answer

SELECTED ANSWER
replied on March 21, 2018

You can send api directly to edit the css and javascript settings without opening the page.

For example, run the following on Chrome Developer Tool, Console tab:

$.post("http://YOUR_SERVER_NAME/Forms/api/scripts/save", {"formId":"YOUR_FORM_ID","js":"","css":""})

3 0
replied on March 21, 2018

Thanks Rui. Handy one to know.

1 0
replied on March 22, 2018

Hi Rui

 

Thanks for the tip, I'll try it.

0 0
replied on March 22, 2018 Show version history

Rui Deng,

 

Thanks a lot.

It's working.

 

Regards

0 0

Replies

replied on March 21, 2018 Show version history

Hi Olivier, 

I think the easiest way will be to re create the form.

As for the code, you should use this

for (i = 0; i < 10; i++){
   alert("I am an alert box!"); 
  }

 

0 0
You are not allowed to follow up in this post.

Sign in to reply to this post.