Skip to content

Commit 0bdf5b0

Browse files
Update README.md
1 parent e191bd8 commit 0bdf5b0

File tree

1 file changed

+12
-250
lines changed

1 file changed

+12
-250
lines changed

README.md

Lines changed: 12 additions & 250 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,6 @@ Advantages:
2222

2323
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.
2424

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-
2725
## Options
2826

2927
At the beginning of the web-forms.js file, there are WebFormsJS customization options. The following codes show the options of this file:
@@ -41,20 +39,6 @@ PostBackOptions.ProgressBarPercentLoadedStyle = "position:absolute;padding:0px 4
4139
PostBackOptions.ProgressBarValueStyle = "height:20px;background-color:#4D93DD;width:0%";
4240
PostBackOptions.AddLogForWebSockets = true;
4341
```
44-
WebFormsJS options:
45-
46-
- 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-
5842
## Action Controls
5943

6044
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
9175

9276
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.
9377

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)
109-
- aa: **Add Attribute** - Value: `Attribute|{Splitter}|{Value}`
110-
- nt: **Add Tag** - Value: `TagName|Id`
111-
- ut: **Add Tag To Up** - Value: `TagName|Id`
112-
- bt: **Add Tag Before This Tag** - Value: `TagName|{Id}`
113-
- ft: **Add Tag After This Tag** - Value: `TagName|{Id}`
114-
- ah: **Add Hidden Tag** - Value: `Value|{Id}`
115-
116-
### Set
117-
118-
The following replaces the existing values:
119-
- si: **Set Id** - Value: `Id`
120-
- sn: **Set Name** - Value: `Name`
121-
- sv: **Set Value** - Value: `Value`
122-
- sc: **Set Class** - Value: `Class`
123-
- ss: **Set Style** - Value: `Style`
124-
- so: **Set Option Tag** - Value: `Value|Text|1 or 0`
125-
- sk: **Set Checked** - Value: For input with checked type `1 or 0` - For any tags `Value|Text|1 or 0`
126-
- sl: **Set Title** - Value: `Title`
127-
- st: **Set Text** - Value: `Text` (string value `$[ln];` it replaces by `\n` character)
128-
- sa: **Set Attribute** - Value: `Attribute|{Value}`
129-
- sw: **Set Width** - Value: `Width`
130-
- sh: **Set Height** - Value: `Height`
131-
- bc: **Set Background Color** - Value: `Color`
132-
- tc: **Set Text Color** - Value: `Color`
133-
- fn: **Set Font Name** - Value: `Name`
134-
- fs: **Set Font Size** - Value: `Size`
135-
- fb: **Set Font Bold** - Value: `1 or 0`
136-
- vi: **Set Visible** - Value: `1 or 0`
137-
- ta: **Set Text Align** - Value: `Align`
138-
- sr: **Set Read Only** - Value: `1 or 0`
139-
- sf: **Set Focus** - Value: `1 or 0`
140-
- sd: **Set Disabled** - Value: `1 or 0`
141-
- mn: **Set Min Length** - Value: `Length`
142-
- mx: **Set Max Length** - Value: `Length`
143-
- ts: **Set Selected Value** - Value: `Value`
144-
- ti: **Set Selected Index** - Value: `Index`
145-
- ks: **Set Checked Value** - Value: `Value|1 or 0`
146-
- ki: **Set Checked Index** - Value: `Index|1 or 0`
147-
- cu: **Change Browser URL** - Value: `URL`
148-
149-
### Insert
150-
151-
The following items are added only if there are no pre-existing values:
152-
- ii: **Insert Id** - Value: `Id`
153-
- in: **Insert Name** - Value: `Name`
154-
- iv: **Insert Value** - Value: `Value`
155-
- ic: **Insert Class** - Value: `Class`
156-
- is: **Insert Style** - Value: `Style`
157-
- io: **Insert Option Tag** - Value: `Value|Text|1 or 0`
158-
- ik: **Insert CheckBox Tag** - Value: `Value|Text|1 or 0`
159-
- il: **Insert Title** - Value: `Title`
160-
- it: **Insert Text** - Value: `Text` (string value `$[ln];` it replaces by `\n` character)
161-
- ia: **Insert Attribute** - Value: `Attribute|{Splitter}|{Value}`
162-
163-
### Delete
164-
165-
The following will remove the current values:
166-
167-
- di: **Delete Id** - Value: `1`
168-
- dn: **Delete Name** - Value: `1`
169-
- dv: **Delete Value** - Value: `1`
170-
- dc: **Delete Class** - Value: `Class`
171-
- ds: **Delete Style** - Value: `Style` (only the style name is entered without a value)
172-
- do: **Delete Option Tag** - Value: `Value or * (all tag)`
173-
- dk: **Delete CheckBox Tag** - Value: `Value or * (all tag)`
174-
- dl: **Delete Title** - Value: `1`
175-
- dt: **Delete Text** - Value: `1`
176-
- da: **Delete Attribute** - Value: `Attribute`
177-
- de: **Delete Tag** - Value: `1`
178-
- dp: **Delete Parent Tag** - Value: `1`
179-
180-
### Increase
181-
182-
The following increment the current numeric values:
183-
184-
- +n: **Increase Minimum Length** - Value: `Number`
185-
- +x: **Increase Maximum Length** - Value: `Number`
186-
- +f: **Increase Font Size** - Value: `Number`
187-
- +w: **Increase Width** - Value: `Number`
188-
- +h: **Increase Height** - Value: `Number`
189-
- +v: **Increase Value** - Value: `Number`
190-
191-
### Descrease
192-
193-
The following decrease the current numerical values:
194-
195-
- -n: **Descrease Minimum Length** - Value: `Number`
196-
- -x: **Descrease Maximum Length** - Value: `Number`
197-
- -f: **Descrease Font Size** - Value: `Number`
198-
- -w: **Descrease Width** - Value: `Number`
199-
- -h: **Descrease Height** - Value: `Number`
200-
- -v: **Descrease Value** - Value: `Number`
201-
202-
### Event
203-
204-
The following add event types to HTML tags:
205-
206-
- Ep: **Set Post Event** - Value: `Html Event|* (for add response) or Output Place`
207-
- EP: **Set Post Event Listener** - Value: `Html Event Listener|* (for add response) or Output Place`
208-
- Eg: **Set Get Event** - Value: `Html Event|# (for current path) or Path|{Output Place}`
209-
- Eg: **Set Get Event In Form** - Value: `Html Event|{Output Place}`
210-
- EG: **Set Get Event Listener** - Value: `Html Event Listener|# (for current path) or Path|{Output Place}`
211-
- EG: **Set Get Event In Form Listener** - Value: `Html Event Listener|{Output Place}`
212-
- Et: **Set Tag Event** - Value: `Html Event|{Output Place}`
213-
- ET: **Set Tag Event Listener** - Value: `Html Event Listener|{Output Place}`
214-
- Ew: **Set WebSocket Event** - Value: `Html Event|Path`
215-
- EW: **Set WebSocket Event Listener** - Value: `Html Event Listener|Path`
216-
- Rp: **Remove Post Event** - Value: `Html Event`
217-
- RP: **Remove Post Event Listener** - Value: `Html Event Listener`
218-
- Rg: **Remove Get Event** - Value: `Html Event`
219-
- RG: **Remove Get Event Listener** - Value: `Html Event Listener`
220-
- Rt: **Remove Tag Event** - Value: `Html Event`
221-
- RT: **Remove Tag Event Listener** - Value: `Html Event Listener`
222-
- Rt: **Remove WebSocket Event** - Value: `Html Event`
223-
- RT: **Remove WebSocket Event Listener** - Value: `Html Event Listener`
224-
225-
### Save
226-
227-
The following items are temporarily stored in session storag.
228-
229-
- @gi: **Save Id** - Value: `Key`
230-
- @gn: **Save Name** - Value: `Key`
231-
- @gv: **Save Value** - Value: `Key`
232-
- @ge: **Save Value Length** - Value: `Key`
233-
- @gc: **Save Class** - Value: `Key`
234-
- @gs: **Save Style** - Value: `Key`
235-
- @gl: **Save Title** - Value: `Key`
236-
- @gt: **Save Text** - Value: `Key`
237-
- @go: **Save Outer Text** - Value: `Key`
238-
- @gg: **Save Text Length** - Value: `Key`
239-
- @ga: **Save Attribute** - Value: `Key|Attribute`
240-
- @gw: **Save Width** - Value: `Key`
241-
- @gh: **Save Height** - Value: `Key`
242-
- @gr: **Save Read Only** - Value: `Key`
243-
- @gx: **Save Selected Index** - Value: `Key`
244-
- @ta: **Save Text Align** - Value: `Key`
245-
- @nl: **Save Child Nodes Length** - Value: `Key`
246-
- @vi: **Save Visible** - Value: `Key`
247-
- @gu: **Save Url** - Value: `Key|Url`
248-
- @gI: **Save Index** - Value: `Key`
249-
250-
### Cache
251-
252-
The following items are permanently stored in local storag.
253-
254-
- @ci: **Cache Id** - Value: `Key`
255-
- @cn: **Cache Name** - Value: `Key`
256-
- @cv: **Cache Value** - Value: `Key`
257-
- @ce: **Cache Value Length** - Value: `Key`
258-
- @cc: **Cache Class** - Value: `Key`
259-
- @cs: **Cache Style** - Value: `Key`
260-
- @cl: **Cache Title** - Value: `Key`
261-
- @ct: **Cache Text** - Value: `Key`
262-
- @co: **Cache Outer Text** - Value: `Key`
263-
- @cg: **Cache Text Length** - Value: `Key`
264-
- @ca: **Cache Attribute** - Value: `Key|Attribute`
265-
- @cw: **Cache Width** - Value: `Key`
266-
- @ch: **Cache Height** - Value: `Key`
267-
- @cr: **Cache Read Only** - Value: `Key`
268-
- @cx: **Cache Selected Index** - Value: `Key`
269-
- @Ta: **Cache Text Align** - Value: `Key`
270-
- @Nl: **Cache Child Nodes Length** - Value: `Key`
271-
- @Vi: **Cache Visible** - Value: `Key`
272-
- @cu: **Cache Url** - Value: `Key|Url`
273-
- @cI: **Cache Index** - Value: `Key`
274-
275-
### Fetch
276-
277-
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-
30878
> 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.
30979
31080
> 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:
31484

31585
In the example above, the last `li` tag is removed.
31686

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-
32587
### Pre Runner
32688

32789
Pre Runners are added before Action Control values.
@@ -351,18 +113,6 @@ The following items are related to multiple answers:
351113
- #: **Start Index** - Value: `{Name}`
352114
- &: **Go To** - Value: `Number (Line) or #Index|Repeat`
353115

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-
366116
## Define the tag
367117

368118
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:
538288
- **`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.
539289
- **`GetBack(event, "YourURL")`:** Requests the URL path entered as an argument.
540290

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+
541300
Calling WebFormJS in HTML pages causes submit buttons to automatically get the onclick attribute with `PostBack(event)` value.
542301

543302
`<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
560319

561320
> Note: Examples 1 and 2 for the `GetBack` method also have the same function.
562321
322+
`PutBack` method has a similar function to `PostBack` but the method sends the request as per the `PUT` method.
323+
563324
`TagBack` method renders the action control of a web-forms tag.
564325

565326
Example:
@@ -602,3 +363,4 @@ Example:
602363
```
603364

604365
In the above example, the alert is not displayed when the button is clicked.
366+

0 commit comments

Comments
 (0)