You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
To use WebForms Core technology, it is enough to add the WebFormsJS library in the head section of HTML and get the WebForms class associated with the server programming language from the [WebForms class](https://github.com/elanatframework/Web_forms_classes) repository.
24
24
25
-
> Note: In WebForms Core technology, the WebFormsJS library automatically communicates with the WebForms class on the server; therefore, you do not need to read the description of this repository. To use this technology, it is enough to become familiar with the classes and methods of the [WebForms class](https://github.com/elanatframework/Web_forms_classes) on the server.
26
-
27
25
## Options
28
26
29
27
At the beginning of the web-forms.js file, there are WebFormsJS customization options. The following codes show the options of this file:
- UseProgressBar: If there is a file input in the form, the progress bar will show the amount of data sent on the screen.
47
-
- UseConnectionErrorMessage: Enabling this option causes the error text to be displayed.
48
-
- ConnectionErrorMessage: The text to display when an error occurs.
49
-
- AutoSetSubmitOnClick: Enabling this option makes submit type inputs automatically send data through WebFormsJS.
50
-
- SendDataOnlyByPostMethod: Enabling this option causes the data to be sent with the Post method; Therefore, the form method is ignored.
51
-
- WebFormsTagsBackgroundColor: Before rendering the web-forms tags, it gives a default color to their background to improve the user experience.
52
-
- SetResponseInsideDivTag: Enabling this option determines whether the server response will be placed inside the div tag or not.
53
-
- ProgressBarStyle: Styles for progress bar
54
-
- ProgressBarPercentLoadedStyle: Styles for percentage and text size for progress bar
55
-
- ProgressBarValueStyle: Styles for uploading animation for progress bar
56
-
- AddLogForWebSockets: Enabling this option will log connections, disconnections, and data sent between the server and client in WebSocket protocol.
57
-
58
42
## Action Controls
59
43
60
44
Action Controls are WebFormsJS received codes that are received in INI format. WebFormsJS automatically detects whether the server response has Action Controls or not. If the server's response is based on the structure of an INI file that starts with `[web-forms]`, it will process the Action Controls, otherwise it will replace the server's response in the form of Ajax on the page.
@@ -91,220 +75,6 @@ The first two characters determine the action code. For example, things like add
91
75
92
76
After the first two letters, there are 6 status types that specify the tag. Then the equal character is placed and after that the values are placed.
93
77
94
-
Below is the list of all action codes:
95
-
96
-
### Add
97
-
98
-
The following items are added to the available amount:
99
-
- ai: **Add Id** - Value: `Id`
100
-
- an: **Add Name** - Value: `Name`
101
-
- av: **Add Value** - Value: `Value`
102
-
- ac: **Add Class** - Value: `Class`
103
-
- as: **Add Style** - Value: `Style`
104
-
- ao: **Add Option Tag** - Value: `Value|Text|1 or 0`
105
-
- ak: **Add CheckBox Tag** - Value: `Value|Text|1 or 0`
106
-
- al: **Add Title** - Value: `Title`
107
-
- at: **Add Text** - Value: `Text` (string value `$[ln];` it replaces by `\n` character)
108
-
- pt: **Add Text To Up** - Value: `Text` (string value `$[ln];` it replaces by `\n` character)
The following values are built-in functions that are placed after the equals character (`=`):
278
-
279
-
- @_: **Execute Script** - Value: `Script code`
280
-
-@mr: **Random Number** - Value `Max number|Min number`
281
-
-@dy: **Year**
282
-
-@dm: **Month**
283
-
-@dd: **Day**
284
-
-@dh: **Hours**
285
-
-@di: **Minutes**
286
-
-@ds: **Seconds**
287
-
-@dl: **Milliseconds**
288
-
-@co: **Get Cookie** - Value `Key`
289
-
-@cs: **Sessioc Cache** - Value `Key|Replacement value`
290
-
-@cl: **Sessioc Cache Then Delete It** - Value `Key|Replacement value`
291
-
-@cd: **Cache** - Value `Key|Replacement value`
292
-
-@ct: **Cache Then Delete It** - Value `Key|Replacement value`
293
-
- @_: **Script** - Value `Script text`
294
-
-@lu: **Script** - Value `Url`
295
-
-@lL: **Session Cache Line** - Value `Key[{Line} (without this, it reads the first line then deletes it)`
296
-
-@lI: **Session Cache INI** - Value `Key[{INIKey}`
297
-
-@dL: **Cache Line** - Value `Key[{Line} (without this, it reads the first line then deletes it)`
298
-
-@dI: **Cache INI** - Value `Key[{INIKey}`
299
-
-@ek: **Event Key**
300
-
-@ew: **Event Which**
301
-
-@ex: **Event Client X**
302
-
-@ey: **Event Client Y**
303
-
-@eX: **Event Page X**
304
-
-@eY: **Event Page Y**
305
-
-@Ex: **Event Offset X**
306
-
-@Ey: **Event Offset Y**
307
-
308
78
> Note: Action controls are executed sequentially; if an action control decides to change an `id` attribute from a tag, subsequent action controls cannot perform actions with the previous `id` attribute.
309
79
310
80
> Note: You can also use negative numbers in all indexes. This makes access to tags or values to be read from the end.
@@ -314,14 +84,6 @@ Example:
314
84
315
85
In the example above, the last `li` tag is removed.
316
86
317
-
### Other
318
-
319
-
-_: **Execute Script** - Value: `Script code`
320
-
- cd: **Cache** - Value: `Cache duration` (Specifies the cache duration in seconds. Inserting the (*) character instead of a numeric value creates a permanent cache.)
321
-
- cs: **Session Cache** - Value: `Cache duration` (Specifies the cache duration in seconds. This cache only works while the browser is active.)
322
-
- rd: **Remove Cache** - Value: `Cache key` (Deletes the cache based on the cache key. Inserting the (*) character instead of a cache name will delete all caches.)
323
-
- rs: **Remove Session Cache** - Value: `Cache key` (Deletes the cache session based on the cache key. Inserting the (*) character instead of a cache name will delete all caches.)
324
-
325
87
### Pre Runner
326
88
327
89
Pre Runners are added before Action Control values.
@@ -351,18 +113,6 @@ The following items are related to multiple answers:
351
113
- #: **Start Index** - Value: `{Name}`
352
114
- &: **Go To** - Value: `Number (Line) or #Index|Repeat`
353
115
354
-
### Enable
355
-
356
-
The following items enable and disable some features:
357
-
358
-
- ew: **Enable WebSocket** - Value: `@ (for enable once) or 1 or 0`
359
-
360
-
### Use
361
-
362
-
The following items determine the use of some features:
363
-
364
-
- uw: **Use WebSocket** - Value: `path`
365
-
366
116
## Define the tag
367
117
368
118
After the first two characters, there are 6 status types that define the tag:
@@ -538,6 +288,15 @@ There are three overloads for the `GetBack` method:
538
288
-**`GetBack(event, this)`:** Should be used only in situations where the form tag must be present on the page. If executed inside a form, the action path requests the form, otherwise it requests the path of the first form on the page.
539
289
-**`GetBack(event, "YourURL")`:** Requests the URL path entered as an argument.
540
290
291
+
The following methods have a similar functionality to `GetBack` but send the request method according to their nature:
292
+
293
+
- PatchBack
294
+
- DeleteBack
295
+
- HeadBack
296
+
- OptionsBack
297
+
- TraceBack
298
+
- ConnectBack
299
+
541
300
Calling WebFormJS in HTML pages causes submit buttons to automatically get the onclick attribute with `PostBack(event)` value.
542
301
543
302
`<input name="btn_Button" type="submit" value="Click to send data" onclick="PostBack(event)"/>`
@@ -560,6 +319,8 @@ The above method puts the data received from the server inside a tag or `MyTagId
560
319
561
320
> Note: Examples 1 and 2 for the `GetBack` method also have the same function.
562
321
322
+
`PutBack` method has a similar function to `PostBack` but the method sends the request as per the `PUT` method.
323
+
563
324
`TagBack` method renders the action control of a web-forms tag.
564
325
565
326
Example:
@@ -602,3 +363,4 @@ Example:
602
363
```
603
364
604
365
In the above example, the alert is not displayed when the button is clicked.
0 commit comments