You are not logged in.
tahanson43206,
I've been doing pl/sql programming for 8 to 16 hours per day for the past couple months. Unfortunately, I don't have instant recall or infinite storage space for all the JavaScript I've forgotten by not using it over the last little while. All I did was hunt down the exact syntax I needed to use. I went back to the language reference on Mozilla's site (syntax) and also to w3schools.com (HTML and JavaScript). Every bit of info you need is out there on the web, but you have to be willing to hunt it down.
Offline
When I did run this, it gave the boxes which had no text with in them or label tags to decern what they were, but I also had the text of the page code open and could see in it what the boxes were. The end message box did open as a dialog and would close in edge, just slow and I could close the tab window which opened when telling it to execute from the saved html file which was save via notepad.
Offline
For SpaceNut re #27
Thanks very much for giving the latest version of the starter JavaScript from kbd512 a try.
If you put some text into the windows and click the button, you will see the text show up in the output alert.
Thanks to the assistance of kbd512 with this little starter program, we are off to a good start!
If you go back to look at the script that kbd512 provided, and which you recently found and posted, you will see what the game plan is.
We want to open the User query to find Banned TestID's, and update them to member status by performing a "Remove" operation.
You can help (if you have time which I understand is hard to come by) you can record the steps you take when you perform this operation manually. We will want to replicate the procedure using JavaScript.
***
For kbd512 .... thanks again for providing this very helpful running start for the little project, AND for providing the Katalan script we are hoping to replace with JavaScript.
Best wishes for getting out from under that heavy workload after a while!
(th)
Online
For SpaceNut re TestID Unban Utility
You have an opportunity to shape what the appearance of the program will be.
You can add <p> and </p> tags (paragraphs) to provide vertical spacing, and you can provide text to help explain what is going on.
For example, the input windows can have text above them that is placed by the html part of the program.
For the functionality, I ** think ** the logical next step is to write a fetch of the bans table, and (somehow) select the first item that comes up.
Naturally the fetch should be confined to the TestID collection, because non-TestID usernames need to remain as they are.
(th)
Online
SpaceNut,
The boxes were there for you to enter data. That's normally how computer programs work. You provide input, the code does whatever it was designed to do, and then produces output of some kind. If you don't supply any input, then the program may not and frequently will not function as intended. Apologies if that point was not clear. In this case, the program was intended to parrot back your input box selections. If you enter nothing, then it doesn't have anything to parrot back to you.
The input text boxes had no labels because this was a super-simple example intended to serve as a teaching aid to tahanson43206 to serve as a starting point for him to develop more sophisticated programs in JavaScript.
tahanson43206,
Maybe you should run the program, or else provide very detailed instructions before passing it off to a non-programmer to execute. After all, this program is intended to streamline execution of administrative processes. This was only an example for you to use, not a finished program by any metric. Teaching examples are purposefully very simple and frequently omit details useful for non-programmers, such as labels indicating what textbox input fields are to be used for. Prior to passing this off to someone else, we should have a fully-developed user interface (UI), execution instructions (list of actions users should take before and after execution), logging, etc.
Offline
For kbd512 re #30
Thank you for coaching SpaceNut on how to work with a prototype program being developed for his use.
For SpaceNut .... kbd512 has clearly not read your many posts about prior programming experience, including Java on Windows 95.
For kbd512, thank you again for providing the seed for what I hope will develop into a useful utility for SpaceNut.
We already have a working script that you provided, but unfortunately SpaceNut was not able to download the free software, so he was unable to use the tool.
By moving in this new direction (JavaScript running in a browser) we have at least a slim chance of achieving a successful outcome.
I understand that as a professional programmer with decades of experience in industry, you have difficulty keeping your impatience in check.
However, if all goes well, several months from now SpaceNut may be able to report the program meets his requirements, and that he has actually used it to achieve the desired results.
Above and beyond that goal, is the adventure we are (hopefully) sharing with other NewMars members and forum readers, who will (in many cases) not have seen JavaScript (or even html) previously.
The working example you kindly (and generously) provided is a useful building block for anyone who might wish to learn a little bit about this subject.
(th)
Online
For those who may wish to learn a bit about JavaScript, here is a set of citations from Google, about the standards for the language.
According to author Marijn Haverbeke, JavaScript has nothing to do with Java. Apparently the language creators were trying to ride on the popularity of Java at the time. It seems to me that the ploy must have worked.
ECMA-262 - Ecma International
www.ecma-international.org › Standards
This Standard defines the ECMAScript 2022 general-purpose programming language. Kindly note that the normative copy is the HTML version; the PDF version has ...
Language Specification · ECMAScript® 2020 Language... · Mission · News
People also ask
What is the ECMAScript standard?
Is JavaScript and ECMAScript same?
Is JavaScript an ECMA standard?
Is ES6 an ECMAScript?ECMAScript
Programming language
www.pentalog.com/wp-content/uploads/2020/02/ecmasc...ecma262 - What is the difference between JavaScript and ECMAScript ...
What's the difference between JavaScript and ECMAScript?
ECMAScript® 2023 Language Specification
View all
ECMAScript is a JavaScript standard intended to ensure the interoperability of web pages across different browsers. It is standardized by Ecma International in the document ECMA-262. WikipediaFirst appeared: 1997; 25 years ago
Paradigm: Multi-paradigm: prototype-based, functional, imperative
ECMAScript Language Specification - ECMA-262 Edition 5.1
262.ecma-international.org › ...This Ecma Standard is based on several originating technologies, the most well known being JavaScript (Netscape) and JScript (Microsoft). The language was ...
ECMAScript® 2023 Language Specification - TC39
tc39.es › ecma262
Introduction. This Ecma Standard defines the ECMAScript 2023 Language. It is the fourteenth edition of the ECMAScript Language Specification.ECMAScript - Wikipedia
en.wikipedia.org › wiki › ECMAScriptECMAScript is a JavaScript standard intended to ensure the interoperability of web pages across different browsers. It is standardized ...
History · Features · Conformance
JavaScript technologies overview - MDN Web Docsdeveloper.mozilla.org › References › JavaScript
Sep 7, 2022 · The core language of JavaScript is standardized by the ECMA TC39 committee as a language named ECMAScript. "ECMAScript" is the term for the ...
[PDF] Edition 3 Final ECMAScript Language Specification - Mozillawww-archive.mozilla.org › language
Mar 24, 2000 · This ECMA Standard is based on several originating technologies, the most well known being JavaScript. (Netscape) and JScript (Microsoft). The ...
JavaScript ES6 - W3Schoolswww.w3schools.com › js_es6
ECMAScript 2015 is also known as ES6 and ECMAScript 6. This chapter describes the most important features of ES6. New Features in ES6. The let keyword; The ...
What is ECMAScript? - Educative.io
www.educative.io › answers › what-is-ecmascriptECMAScript is a general-purpose programming language that is implemented in ... Languages such as ECMAScript, Dart-lang, and C# were standardized by ECMA.
What's the difference between JavaScript and ECMAScript?
www.freecodecamp.org › news › whats-the-difference-between-javascript-...Oct 28, 2017 · The specification defined in ECMA-262 for creating a general purpose scripting language. ... While ECMA-262 is the name of the standard, it ...
ECMAScript 2022 blesses class elements, top-level await - InfoWorldwww.infoworld.com › JavaScript › Software Development
Jun 27, 2022 · Next version of JavaScript standard gains formal approval, while the new capabilities are already supported by browsers.
The language specification appears to be available at this link:
https://262.ecma-international.org/5.1/
The language specification pdf is 258 pages long.
(th)
Online
When I have time, I will come back to this learning but for now I am being overrun at work.
I understand that the <p> and </p> tags is the htlm command to control the content that is in between them.
In terms of the testid# it is the username word displayed on the page to execute the unban function which has the remove command link button to its script on it.
Offline
For SpaceNut re #33
Thank you for noting how the <p> and </p> tags can help to make the program more useful!
Best wishes for success with your work projects.
In your absence, we will attempt (or more accurately) I will attempt to configure JavaScript to do what you need done.
There is no hurry for any of this (fortunately)
We have plenty of TestID's ready to go for new members, and so far the pace of arrival of new members has been manageable.
(th)
Online
For SpaceNut re before and after versions of kbd512's starter script.
This is for some future time when you have a spare half hour or so to experiment with html and JavaScript.
I just completed an exercise in converting the original sample challenge from kbd512 to run on an ancient XP system with an equally ancient Internet Explorer.
I imported the original challenge script, and then used the running version in display on a modern computer.
Despite having the working version immediately available, I was amazed how many little details of correct formatting I missed.
In the end, the script is running on the ancient system, just as it does on it's more modern brethren.
One detail that might be a surprise, if you aren't prepared for it ... the text that is to be inserted into the button has to be on a separate line in the ancient IE.
In more modern browsers, it works just fine as kbd512 has shown us in the working version.
I just finished Chapter 1 of Eloquent JavaScript.
While there is much in the language I find familiar, there are little differences that can trip someone up.
In particular, the author went to pains to show that the conditional expression (of the form ( ? : ) ) operates slightly differently in c and java than it does in JavaScript.
I don't expect to ** ever ** need such a statement, but I suppose it doesn't hurt to be aware of it.
***
It is possible for anyone on Earth who is reading this topic to follow along.
The entire text of Eloquent JavaScript is available for free online, at www.eloquentjavascript.com
If there ** is ** someone "out there" who is interested in this topic and might care to comment or even to pitch in, see the Recruiting Topic for procedure.
I'm not expecting anyone, based on past experience, but am ready to be surprised.
(th)
Online
This post is primarily for SpaceNut.
However, ** anyone ** who is interested in learning a little bit about JavaScript is welcome to use the examples to be made available.
https://www.dropbox.com/sh/27k54zf3wnk5 … HNQ_a?dl=0
The link about ** should ** open read-only access to a Dropbox folder in NewMarsMember.
Update: It appears you (anyone) can display these little programs directly from Dropbox. Just right click and select a browser.
To ** run ** the files it appears you have to download/save them on your system.
The folder contains four files to begin with, and over time, more will be added.
The four opening files include:
1) A JavaScript learning exercise created by kbd512
This exercise is created with just enough errors so that a student will have to work a little bit to make it work.
2) The fully corrected version is available as well. The files are given file types of "htm" to work on Windows.
To run them on Linux, add an "l" >> "html"
3) A demo program from quackit.com, showing a loan calculator. This file has an "html" file type.
4) A function in JavaScript that may be embedded in an html shell. This function is from Chapter 1 of Eloquent JavaScript.
It too can be embedded in an html shell.
Feedback and questions are welcome.
(th)
Online
For SpaceNut ... all Welcome ...
https://www.dropbox.com/s/v7pddmq7pvs1p … t.htm?dl=0
The link above is a (slightly improved) version of the working script for the TestID miniproject.
It has the file type of htm, so it should download and run on a Windows PC.
Text was added and moved around.
Please test the file at your convenience and report any feedback you may have.
I am still working on the procedures to make this process as simple and reliable as possible.
Using Internet Explorer Version 8 from 2009 ** should ** provide a starting point for code that will run anywhere.
It is possible some feature will be needed that is not available in Version 8 of IE.
I suspect we are some way from that point.
(th)
Online
The simple starting program shown in Post # 37 takes in strings entered by the operator, and displays them when the mouse is clicked.
A logical/reasonable next step in development of this little utility program, is to convert the input to integers, and to show them back to the operator for confirmation.
A later logical/reasonable step is to compare the ending number to the starting number. The ending number cannot be less than the starting number, but it can be the same, since the operator may wish to execute the program only once.
Here is a snippet about extracting an integer from a random set of characters that might be entered by the operator:
ParseInt () function
To convert a string to integer in JavaScript, call parseInt () function and pass the string as argument to it. Optionally, we may pass the base/radix as second argument to parseInt () function. parseInt () function returns an integer created from the given string and base/radix.
How to convert String to Integer in JavaScript? - TutorialKart
www.tutorialkart.com/javascript/javascript-convert-string-to-integer/
(th)
Online
The scope of a variable is a factor in program design.
It appears that the custodians of JavaScript have made a distinction between let and var, so that var is automatically a "public" variable and let creates a "private" one.
The above may be an over-simplification. Here is a snippet on the subject:
var and let are both used for variable declaration in javascript but the difference between them is that var is function scoped and let is block scoped. It can be said that a variable declared with var is defined throughout the program as compared to let.
Difference between var and let in JavaScript - GeeksforGeeks
www.geeksforgeeks.org/difference-between-var-and-let-in-javascript/
kbd512 started us off with var, and for the time being, I will stay with var.
The author of Eloquent JavaScript likes let and I expect to find places where it makes sense.
Update a bit later .... Aside from whatever difference there may between var and let, I learned today that a variable declared at the html level is "owned" by the window where a script is running, so that functions inside the script can "see" it.
In addition to new learning about scope of variables, I found that the variable to pull an integer from a string is spelled parseInt. The "p" is lower case and the "I" is capitalized. Other details are (a) the function pulls digits from a string until if finds the first non-digit. A string with a non-digit in the first position causes a NaN return (Not a Number error).
The updated script for 20221006 is ready for delivery to Dropbox.
(th)
Online
Today's update moves the ball about 3 yards.
It begins the process of reviewing input data supplied by the operator. I'll call it a first down when the code is able to compare the starting number to the ending number, and advise the operator one way or the other.
https://www.dropbox.com/s/wrzixj6gq41ij … t.htm?dl=0
I have received confirmation that a friend with a Mac will test yesterday's program when he fires up the iMac. Apparently he does most of his Internet on an iPhone or iPad these days.
For SpaceNut .... knowing you have little time to spare, please try to schedule time to take a look at these versions as they come along.
Feedback from you will be helpful. There is no one else on the entire planet who will be able to use this utility, so you might as well ask for it to meet your requirements.
(th)
Online
Apple IMac and iPad are both able to run the little demo program just fine, using the Dropbox link from NewMars post.
The friend who took this on covered all the bases, and sent screen shots showing success.
This pretty much confirms we are definitely on the right track!
The procedure works on all platforms, and it runs in current browsers in all operating systems.
The next update I am planning will employ boolean switches to control program flow. I'm planning to start with validation of input needed to be correct before the program will proceed from the input phase.
(th)
Online
I did a quick peak at the remove link on the banned id's and found that they are not sequential as viewed on the page for the information
<td class="tcl">TestID11401</td>
<td class="tc2">insert email here</td>
<td class="tc3"> </td>
<td class="tc4">Never</td>
<td class="tc5">Upd: 2021/07/12</td>
<td class="tc6"><a href="profile.php?id=916">SpaceNut</a></td
<td class="tcr"><a href="banned id information =12598">Edit</a> | <a href="banned id information =12598">Remove</a></td>banned id information =12598
the banned id information is the altered data of the page addressing for the id =
Id was increment for the next 2 but next was an odd number and then did return to the next increment. for a while so an automated function will need skip or error screen for when an id is not processed out of the ban table.
edit:
If you use the id= # link directly in the browser, you end up with
Bad HTTP_REFERER. You were referred to this page from an unauthorized source. If the problem persists, please make sure that 'Base URL' is correctly set in Admin/Options and that you are visiting the forum by navigating to that URL. More information regarding the referrer check can be found in the FluxBB documentation.
This must mean we have script code that starts the remove from ban table...
edit 2:
I took a look to see what id # was for the user table and it is id=428448 which does not match the ban.
edit 3:
Just did a manual remove of the ban and then did a re-ban to check id# and its different than what I started out with id =19662
normally I would do a page of testid # for a page of them and doing them just one at a time means knowing the id that we would want to remove from the list.
The page has the format of the form outputs the page in user name/ email address/ who did the ban/ edit/ remove for what we have access to. The links under the remove is the one above.
Offline
For SpaceNut re #42
Thank you for the investigation you showed us, for TestID11401.
We are a ways away from being ready to fetch that (or any) TestID, but it is good to have that information available for when the time comes.
The most recent version of the program is available for your review this weekend (if you have time).
The TestID Utility can be considered a warm up exercise.
I ** just ** decided to take a look at implementing the Email Send procedure in JavaScript.
All the capabilities appear to be present. JavaScript can read usernames as data from a file on disk.
JavaScript appears to be capable of waiting for intervals of time, although I haven't tested that yet.
(th)
Online
For SpaceNut re JavaScript TestID utility ...
Here is an update with teeny-tiny advances ...
https://www.dropbox.com/s/w9pc194qwlbx8 … t.htm?dl=0
This version tries:
1) color font for the input windows
2) Use of isNaN function to see if the input is a number
3) If statement to report if input is NOT a number.
That's enough for today.
I'll test it on all the local computers, and am looking forward to your report.
(th)
Online
For SpaceNut re TestID Utility in html and JavaScript ... update
Today's version adds color changes to help the operator to know that input needs to be corrected.
https://www.dropbox.com/s/75ljdmyodtf8r … t.htm?dl=0
The code started on Internet Explorer Version 8, and it was accepted by Edge on a Windows 10 machine before it was saved to Dropbox.
I'll be interested in your feedback as we go along.
So far I haven't seen any, but may have missed it.
(th)
Online
For SpaceNut re JavaScript TestID update initiative...
https://www.dropbox.com/s/dv791ivm6prj1 … t.htm?dl=0
Above is the latest version.
This one adds a check that ending ID is equal to or greater than the starting ID.
It changes the color display, and adds focus to put the operator on the right window if there is need for adjustment.
I have tested this program on just about every device I can think of.
I do have a smart phone (Android) but I don't know much about it. I downloaded the test program from Dropbox, and it went somewhere in the smart phone, but I have no idea where.
A friend tested on his Apple iMac and his iPad.
Other machines/OS tested...
Windows 10, 7, XP
Linux 64 bits and 32 bits
I am looking forward to feedback.
You are the customer for this development.
It is possible that another member of the forum may have said something to discourage you from helping.
If that happened, please consider trying again, and this time, if a discouraging message arrives from someone, just consider the source and keep going.
At this point, the program ** should ** be scrubbing the input well enough so that we can proceed to creating a loop based upon the input.
Update from LG phone the html worked the
Had to install. Files app
(th)
Online
For SpaceNut re JavaScript TestID Utility initiative ...
Removed link due to bugs discovered running on modern browsers.
Above is the latest version of the utility.
This version implements a loop and an early output method.
The <textarea> html object appears to be difficult to work with.
I got it to work but it is touchy.
A web resource suggested another way to deliver output to the web page, so I'll investigate that tomorrow.
If you have time, you can experiment with the program as is, to see it show it completed a loop. All it does is to count up from start of loop to the finish, and then report it reached the finish with (wait for it!) a Green text box.
The program seems able to rerun, by setting up the run parameters, so you can experiment with different start and finish numbers.
The actual code to fetch a query is still "out there" in Eloquent JavaScript.
Note for anyone interested .... document.write works, but it erases the current page and puts output on a new blank page.
I'm not sure how useful that might be.
Update a bit later .... normally anything that works on Internet Explorer 8 will work on modern browsers. However, time has marched on since 2008.
On Windows 10 using Edge, I got these errors:
420221011SampleHtmlJavascript.htm:64
Uncaught TypeError: Cannot read properties of null (reading 'style')
at fx4_run (20221011SampleHtmlJavascript.htm:64:46)
at HTMLButtonElement.onclick (20221011SampleHtmlJavascript.htm:113:82)
20221011SampleHtmlJavascript.htm:64
Uncaught TypeError: Cannot read properties of null (reading 'style')
at fx4_run (20221011SampleHtmlJavascript.htm:64:46)
at HTMLButtonElement.onclick (20221011SampleHtmlJavascript.htm:113:82)
fx4_run @ 20221011SampleHtmlJavascript.htm:64
onclick @ 20221011SampleHtmlJavascript.htm:113
I'll work on ** those ** tomorrow, along with an improved output method.
I'd like the utility to report the TestID it is working on, as it carries out the procedure.
(th)
Online
The browser edge does have an IE compatibility mode that you can configure in the settings dots at the end of the address bar. Type in the search box compatibility and it will bring you to the setting page.
Still testing these after downloading them on my machine as well as reading the content of the programming.
Offline
For SpaceNut re JavaScript adventures
Here is a corrected version of the file for the 11th.
I removed all references to the <textarea> object.
Now the loop works with alerts. When you set up a test, keep the range short.
https://www.dropbox.com/s/105jscd7d8kc6 … x.htm?dl=0
Thanks for taking a look at the releases as they arrive ...
I'm going to delete the version for today, 2022/10'11....
It only ran on the IE Version 8 system, and fails everywhere else.
I was attempting too much of an advance, it would appear.
Working with <textarea> was pushing the envelope too far, apparently.
Update a bit later .... I'm optimistic going into tomorrow's work session, after the disappointment of <textarea>.
I found several suggestions to try writing to a <div> object instead.
The examples make it look easy, but they are probably oversimplified.
There are other output options waiting in the wings as well.
(th)
Online
For SpaceNut re TestID utility initiative
Before proceeding, I would like to pause a moment to (again) thank kbd512 for providing the starting seed for this little undertaking.
I am hoping you (SpaceNut) will see signs of progress in today's version.
https://www.dropbox.com/s/zvaf2zaa02b7d … t.htm?dl=0
This version came out of IE 8 on Win XP, and ran correctly on Win 10.
I expect it will run on every other platform, since Win 10 is a fairly good test environment.
This version does away with the <textarea> experiment, and replaces it with <div> to hold text to be reported to the operator.
The suggestion to try <div> came from skillforge.com.
This version eliminates Alerts, except in case of input error.
It also reports progress of the loop at the bottom of the page.
I tested with a run of 50, and there didn't seem to be a problem, so I expect your preferred run size of 300 should work.
You could certainly test that number if you'd like. No paper is wasted, since output is going to the web page display.
Because the Setup phase is "finished" from my perspective, now is a good time for you to beat on it to see if you can find any defects.
Tomorrow I'm planning to begin learning how to fetch banned usernames from the bans table. I can fetch them as a mod, so everything but the update can be tested.
We may have to pull kbd512 back in at that point, unless you have the time to test what I can't.
(th)
Online