English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

--------------------------------------------------------------------------------

Hi
can one of you javascript experts please help me

I am new to Javascript and have written this script but it is full of errors.
Can someone pleas point them out to me. It would be greatly appreciated
Thank you.
Now here is my script:

Code:








Press F1 or click the Refresh (or Reload) button to run this script again


Thank you so so much for any help you can give. thank you

2007-09-26 15:35:50 · 5 answers · asked by heather 1 in Computers & Internet Programming & Design

5 answers

Well you got me too.

First I had to comment out all of the Javascript code and then un-comment a line at a time to find all the bugs.

Second I used Notepad++, a free text editor that has line numbers and a language parser that makes checking the code a lot easier.

See link

2007-09-26 23:24:23 · answer #1 · answered by AnalProgrammer 7 · 0 0

Hi there,
after reading the script, it is understood that you have tried to male a simple calculator using the prompt window. but the reason the script didn`t turn out the way you wanted was because you had so many various types of errors in it... they are:

- using the end line notation ";" in the wrong places
- variable mistype "modulus" & "mod"
- closing a statement

and most importantly the logic you`ve written is completely incorrect. in order to understand logic you do not need any programming knowledge, knowingly or unknowingly you tend to use logic in your every day life... that being said, i have re-written the snippet...








Press F1 or click the Refresh (or Reload) button to run this script again




hope it helps.

2007-09-26 17:45:06 · answer #2 · answered by Prem 2 · 0 0

first, according to standards, 'script' tag should look like this:




Press F1 or click the Refresh (or Reload) button to run this script again



-------------------
Note that I spelled language correctly,
Note that I removed the semicolon after function begin()
Note that I added the () after onload="begin()"
The alert function is a useful function to indicate that the code is actually running.

2007-09-26 17:01:03 · answer #4 · answered by fisher_atwork 2 · 0 0

nicely... i think of is this: /* on the spot consumer for the 1st huge sort, validate that the 1st character in the string argument is a huge selection, parse the string from left to precise till it reaches the tip of the huge sort, discard any characters that ensue after the tip of the huge sort enter, and finally return the huge sort as a huge selection (not as a string) As you will locate... you in no way closed the dissimilar strains remark (*/). the wonderful way is this one: /* on the spot consumer for the 1st huge sort, validate that the 1st character in the string argument is a huge selection, parse the string from left to precise till it reaches the tip of the huge sort, discard any characters that ensue after the tip of the huge sort enter, and finally return the huge sort as a huge selection (not as a string) */ undergo in concepts the */ it incredibly is all I observed

2016-10-20 02:35:09 · answer #5 · answered by ? 4 · 0 0

fedest.com, questions and answers