Menu
Is free
check in
the main  /  BY / Transfer to the next HTML string. As in Excel make text transfer in cell

Transfer to the next HTML string. As in Excel make text transfer in cell

When displaying text documents In the browser, the location of the string within the paragraph is determined automatically depending on the size of the fonts and the size of the viewing window. Row transfer can be carried out only by word separator symbols (for example, spaces). Sometimes in the documents you need to specify the forced translation of the string implemented regardless of the parameters of the browser settings. For this, the tag of forced translation line is used
which has no appropriate closing tag. Turning on tag
The text of the document will ensure the placement of the subsequent text from the beginning of the new line. For example, this approach can be used to create structures such as lists without the use of special list marking tags. Or, for example, without this tag, it is not necessary to display poems, etc.

We give an example of using the forced translation of the string (Fig. 1.8):

Use forced row translation

Over dumbfounded Petrograd

Dyshalova on November autumn chlad.

Pretty noisy wave

In the edge of its fence is slim,

Neva rushed like a patient

In his bed restless.

A.S. Pushkin. Bronze Horseman

Fig. 1.8. Tag
can be used to forced row translation

In contrast to the tag of paragraph

When using tag
Empty string will not be formed.

Using tag
requires caution - a situation is possible when the browser has already made a row transfer for one or two words before you met your tag
. This happens if the width of the reader viewer window is less than the same program parameter with which you tested your document. It may turn out that only one word will remain in the line in the middle of a paragraph, thereby disrupting the beauty of the layout of the document.

Note

When using tag
To break the text, flowing image or table, you can set the Clear parameter that stops flowing. This can be read in chapters 3 and 4.

Tags u.

There are situations when you want to perform the operation of the opposite purpose - to prohibit the translation of the string. There is a container tag . The text marked by this tag will be guaranteed to be located in one bar, regardless of its length. If at the same time the resulting string will go beyond the browser viewing window, the horizontal scroll bar will appear.

Note

To ensure the continuity of the text located in the tables of the tables, there is a special parameter of the NOWRAP tag . This can be found in chapter 4.

Placing text using a tag of an inseparable string You can get very long lines. To avoid this, you can specify the reader browser, the location of the row is possible, which will be performed only if necessary (the so-called "soft" line translation). This can be done by putting a tag in the right place (Word Break), which is just like a tag
does not need a closing tag.

Note

Tag Not supported by the Netscape browser. Browser Microsoft. Internet Explorer. Recognizes this tag only in the text marked by tags .

Lesson 5.

In this lesson we:
1. learn how to make hTML code It was more convenient for us and readily read.
2. We will analyze how to make the transfer of the text string correctly.

We make HTML code convenient.

Now our code is understandable and easily read, as there are few text in it and there are practically no tags. When we create a more complex page, there will be many tags there, accordingly, find it will be difficult to find.

In order for no porridge from tags, you need to initially arrange tags and lines so that they are visually perceived easier. When the browser reads information from hTML Pages, he no difference how many spaces and how many empty rows in the code.

I changed the text in the page code about the one we created, but it does not matter. On the left and on the right figure shows the same code. Both options will be displayed the browser on the monitor screen is absolutely the same. Agree, working with the code depicted on the right will be much easier than with the fact that on the left.

The code we are very simple, but even now the difference in visual perception is noticeable. There are no specific rules for "pointing order", each master decides how it is more convenient to work.

Transferring HTML string. Tag & Ltbr & GT.

Pay attention to the drawing. In the first variant, the text is written in one line, in the second version in two lines.


The browser will display both options equally. The text will be written in one line:


You ask why so? Indeed, in one of the codes, the part of the text is transferred to another string. It would be logical if in the browser part of the text also moved to another line, but HTML has its own logic in this regard. If we take the line in HTML code, then for the browser it is equivalent to one space (as an ordinary gap between words in the text). If we transfer part of the text not one line down, and 2 or 3 (any number), then the browser will still read this distance for one ordinary space between the words and when displaying the text, the text will be written in one row.

Tag & Ltr & GT

When we got acquainted with the tags in the third lesson, I mentioned that there are tags that do not require closure. Tag & Ltbr & GT One of them serves to transfer the string.
Let's apply it to the code:

We inserted tag & Ltbr & GT In our HTML code and now when you start a file through a browser, part of the text will be transferred to the next runoff.
* Do not forget to save changes to NOTEPAD (Ctrl + S) and start a page in the browser (F5).

Often required inside one excel cells Make text transfer to a new string. That is, move the text on the rows inside the same cell as indicated in the picture. If after entering the first part of the text simply press the Enter key, the cursor will be transferred to the next line, but another cell, and we need to be transferred in the same cell.

This is a very frequent task and it is solved very simply - to transfer text to a new line inside the same Excel cell, you must click Alt + Enter. (clamp the alt key, then not releasing it, press the ENTER key)

How to transfer text to a new string in Excel using the formula

Sometimes it is required to make the transfer of the line is not open, but using the functions in Excel. This is how in this example in the picture. We introduce a name, surname and patronymic and it is automatically going to the A6 cell.

In the window that opens, in the Alignment tab, you must put the box next to "transfer according to words" as indicated in the picture, otherwise the transfer of strings in Excel will not be correctly displayed using formulas.

As in Excel, replace the transfer sign to another symbol and back using the formula

Can change the transfer symbol to any other sign, for example, on the space, using the text function to substitute in Excel

Consider on the example that in the picture above. So, in the B1 cell we prescribe a function to substitute:

Substitute (A1; symbol (10); "")

A1 - this is our text with a string transfer;
The symbol (10) is the transfer of the line (we considered it a little higher in this article);
"" Is a space, since we change the transfer of the string to the space

If you need to do a reverse operation - change the space on the sign (symbol) of the transfer, then the function will look accordingly:

Substitute (A1; ""; symbol (10))

I remind you that the row transfer is properly reflected, it is necessary in the properties of the cells, in the "Alignment" section, specify "transfer to lines".

How to change the transfer sign on the gap and back to Excel by searching - replacement

There are cases when formulas to use is inconvenient and need to be replaced quickly. To do this, we use the search and replacement. We highlight our text and press Ctrl + H, the following window will appear.

If we need to change the transfer of the string on the space, then in the "Find" line you need to enter the transfer of the line for this stand in the "Find" field, then click on the ALT key, without releasing it type it on the keyboard 010 is the line transfer code, it will not be visible in this field.

After that, in the "Replace to" field, enter a space or any other character to which you need to change and click "Replace" or "Replace All".

By the way, in Word it is implemented more clearly.

If you need to change the string transfer symbol on the space, then in the "Find" field you need to specify the special code of the "string break", which is indicated as ^ L.
In the "Replace:" field, you need to make just a space and click on "replace" or "replace everything".

You can change not only the transfer of the string, but also others special symbolsTo get their appropriate code, you must click on the "More \u003e\u003e" button, "Special" and select the code you need. I remind you that this feature There is only in Word, in Excel these characters will not work.

How to change the transfer of the string on a space or vice versa in Excel with VBA

Consider an example for selected cells. That is, we highlight the required cells and launch the macro

1. We change the gaps on the transfers in the selected cells using VBA

SUB spacenoines ()
For Each Cell in Selection
Cell.Value \u003d Replace (CELL.VALUE, CHR (32), CHR (10))
Next
End Sub.

2. We change the transfers to spaces in the selected cells using VBA

Sub transferred commands ()
For Each Cell in Selection
Cell.Value \u003d Replace (CELL.VALUE, CHR (10), CHR (32))
Next
End Sub.

The code is very simple CHR (10) - this is the transfer of the string, CHR (32) is a space. If you want to change to any other symbol, you simply replace the code number corresponding to the desired symbol.

Excel characters codes

Below in the picture marked various characters and codes corresponding to them, several columns are a different font. To enlarge the image, click on the picture.

Translation string, line transfer, transfer to a new line is all about one. In the HTML language, the transfer to a new line is used often. There are several ways: use tag
To transfer to a new string, and you can use the CSS properties to transfer the string. Consider an example of using the row transfer tag:

In CSS, the row transfer can be carried out in different ways, for example, like this:

Br
Float: Left;
width: 100%;
margin: 0 0 20px 0; / * Point after row 20 pixels * /
}

Dividing line with HTML or CSS

In HTML, create a separation line is very simple. Also used unpaid tag


- This is the dividing line. The separation line begins with a new line and there is an indent. You can control the style of the horizontal line, as well as you can make an alternative to it. Hereinafter an example of a dividing line with a tag:

And now let's stylize (change styles, change appearance) Our dividing line:

hr (
width: 80%; / * line width * /
Height: 4px; / * Height / line thickness * /
Background: # 333; / * background / color line * /
Border: 0; / * frame around the separation line (remove it) * /
margin: 5px 0 5px 0; / * indent over and under the line 5 pixels * /
}

And create an alternative to our dividing line with the tag

and CSS.

Often the need to add a new paragraph, but without an empty string, which the paragraph tag is inserted

For some text fragments, standard intervals are simply inappropriate for paragraphs. It can be inscriptions under the pictures and in tables, poems, quotes, footnotes and notes.

For the forced transfer of rows, a special tag is provided, the function of which is laid in its name BR (Break Row - "break a row, string"). Tag
HTML hypertext marking language means that all the following contents for it should begin with a new row. If necessary, you can put several tags in a row to achieve the required interval.

Tag
Not sensitive to register and does not require a closing tag, because it is an empty element, but it is better to get used to close all tags. In the XHTML rupture tag should be "tightly closed" to the reverse slash.

Example of using a rupture tag

BR tag in action< /title></p><p><р> Drive in service</р></p><p><p>Still anywhere and never <br></p><p>I was not so bad <br></p><p>Heads of the Gard Orda <br></p><p>I am gnawing alive</р></p><p>Drive in service</p><p>Still anywhere and never <br>I was not so bad. <br>Heads of the Gard Orda <br>I gnaw alive.</p><h2>Tag attribute <br></h2><p>The only attribute that has <a href="https://mkr-novo2.ru/en/problems/kak-sdelat-krasivyi-shrift-v-html-razmery-cveta-tegi-shriftov-html-kak-zapisat-v-html.html">hTML Tag</a> <br>, It is called it indicates the browser, how to enroll with a portable string if the text will have to contend the so-called floating element, which may be, for example, an image with an align alignment attribute using Right / Left values, or a block in CSS, which is spelled out the Float property.</p><p>In specifications by XHTML 1.0 / HTML 4.01, the Clear attribute can only be used with Transitional, Frameset and<!DOCTYPE>Otherwise the code will not work.</p><h2>Tag attribute properties</h2><p>The effect of the use of the Clear attribute depends on its value and the location of the flowed floating element. The attribute can take 4 values:</p><p><br clear = "right | left | all | none"></p><p><img src='https://i2.wp.com/fb.ru/misc/i/gallery/21147/458111.jpg' width="100%" loading=lazy loading=lazy></p><p>The LEFT value prohibits the flow around the element aligned to the left edge, so the text, "stumbling" about the tag <br>It will be located below the image or another floating element.</p><p>Exactly, such a result will be from using all arguments, which will not allow neither right or left.</p><p>Right value prevents the text strengthening the element aligned to the right edge, so after the tag <br> The text will not be left anything else, how to bypass the image, lying on the right.</p><p>The value of None ("Neither your, none") generally removes all powers from the Clear attribute, and the tag <br> Silently carries the string down.</p><p>The default value, as such, is missing at the Clear attribute.</p><h2>Tag <br> - It's soft transfer</h2><p>The string rupture tag is very convenient to create the necessary intervals between paragraphs, inside which it is used as a soft transfer, but not as a means for dividing the text to paragraphs.</p><p><img src='https://i0.wp.com/fb.ru/misc/i/gallery/21147/458084.jpg' width="100%" loading=lazy loading=lazy></p><p>It should not be too involved in the tag of the translation of the strings to format text, because the results of its use are not always distinguished by the grace.</p><p>For example, if used tag <br> To transfer the lines inside the paragraph, this can lead to the appearance of a "comb" in the user window, if it is smaller than the window to which the webmaster focused.</p> <script>document.write("<img style='display:none;' src='//counter.yadro.ru/hit;artfast_after?t44.1;r"+ escape(document.referrer)+((typeof(screen)=="undefined")?"": ";s"+screen.width+"*"+screen.height+"*"+(screen.colorDepth? screen.colorDepth:screen.pixelDepth))+";u"+escape(document.URL)+";h"+escape(document.title.substring(0,150))+ ";"+Math.random()+ "border='0' width='1' height='1' loading=lazy loading=lazy>");</script> </div> </div> </div> </div> <aside class="col-lg-4 col-md-12 col-md-offset-4 col-lg-offset-0" id="right"> <div> </div> <br/> <div> </div> <br/> <div> </div> <br/> <div> </div> <br/> </aside> </div> </div> </div> <div class="popup" id="share"> <div class="perfect-scroll" style="text-align: center"> <div style="margin-bottom: 20px"> <strong> Downloading will now begin ...</strong> <br> Do not forget to share the material. <br>in social networks with your <br> Colleagues</div> <div> <div class="ya-share2" data-services="vkontakte,facebook,odnoklassniki,moimir,gplus" data-counter=""></div> </div> </div> <div class="close-pop pull-right"> <svg width="10px" height="10px" viewBox="0 0 10 10"> <path fillrule="evenodd" d="M 6.41 5C 6.41 5 9.24 7.83 9.24 7.83 9.63 8.22 9.63 8.85 9.24 9.24 8.85 9.63 8.22 9.63 7.83 9.24 7.83 9.24 5 6.41 5 6.41 5 6.41 2.17 9.24 2.17 9.24 1.78 9.63 1.15 9.63 0.76 9.24 0.37 8.85 0.37 8.22 0.76 7.83 0.76 7.83 3.59 5 3.59 5 3.59 5 0.76 2.17 0.76 2.17 0.37 1.78 0.37 1.15 0.76 0.76 1.15 0.37 1.78 0.37 2.17 0.76 2.17 0.76 5 3.58 5 3.58 5 3.58 7.83 0.76 7.83 0.76 8.22 0.37 8.85 0.37 9.24 0.76 9.63 1.15 9.63 1.78 9.24 2.17 9.24 2.17 6.41 5 6.41 5Z"></path> </svg> </div> </div> <section id="views"> <div class="container"> </div> </section> <script type="text/javascript"> $(document).ready( function () { $('.kursiv').readmore({ speed: 75, maxHeight: 84, heightMargin: 16, moreLink: '<a href="#"><span>Показать полностью</span>', lessLink: '<a href="#"><span>Скрыть</span></a>', } ); } ); </script> <style> div.kursiv { margin-bottom: 0; } #razrabotka { margin-top: 30px; } .readmore-js-toggle { font-style: italic; color: #999; display: inline; margin-right: 10px; font-size: 14px; cursor: pointer; border-bottom: 1px dotted #e6e6e6; } </style></section> <footer> <div class="container"> <div class="row"> <div class="col-xs-16 col-sm-4 col-md-3"> <p>© 2021, mkr-novo2.ru, Internet. Education. Programs. Firmware. Installation and configuration. Navigators</p> <div class="social"> <a target="_blank" href=""> <svg width="32px" height="19px" viewBox="0 0 32 19"> <path fillRule="evenodd" d="M 15.36 18.01C 15.36 18.01 17.24 18.01 17.24 18.01 17.24 18.01 17.81 17.94 18.1 17.64 18.36 17.37 18.35 16.85 18.35 16.85 18.35 16.85 18.32 14.41 19.49 14.05 20.64 13.7 22.12 16.4 23.69 17.45 24.87 18.23 25.77 18.06 25.77 18.06 25.77 18.06 29.97 18.01 29.97 18.01 29.97 18.01 32.16 17.87 31.12 16.21 31.03 16.07 30.51 14.97 28 12.72 25.37 10.35 25.72 10.74 28.89 6.65 30.82 4.16 31.59 2.65 31.35 2 31.12 1.38 29.7 1.54 29.7 1.54 29.7 1.54 24.98 1.57 24.98 1.57 24.98 1.57 24.63 1.52 24.37 1.67 24.12 1.82 23.95 2.16 23.95 2.16 23.95 2.16 23.21 4.09 22.21 5.72 20.11 9.18 19.27 9.36 18.92 9.15 18.12 8.65 18.32 7.14 18.32 6.07 18.32 2.72 18.85 1.32 17.3 0.96 16.79 0.84 16.41 0.76 15.1 0.75 13.41 0.73 11.99 0.76 11.18 1.14 10.64 1.39 10.23 1.96 10.48 1.99 10.79 2.03 11.5 2.18 11.88 2.67 12.36 3.31 12.34 4.74 12.34 4.74 12.34 4.74 12.62 8.68 11.69 9.17 11.06 9.5 10.18 8.82 8.31 5.68 7.35 4.08 6.62 2.3 6.62 2.3 6.62 2.3 6.48 1.97 6.23 1.8 5.93 1.58 5.51 1.51 5.51 1.51 5.51 1.51 1.02 1.54 1.02 1.54 1.02 1.54 0.35 1.56 0.1 1.84-0.12 2.09 0.08 2.62 0.08 2.62 0.08 2.62 3.6 10.57 7.57 14.57 11.22 18.25 15.36 18.01 15.36 18.01 15.36 18.01 15.36 18.01 15.36 18.01Z"/> </svg> </a> <a target="_blank" href=""> <svg viewBox="0 0 25 25" width="25px" height="25px"> <path class="st0" d="M12.5,12.7c3.2,0,5.8-2.6,5.8-5.8c0-3.2-2.6-5.8-5.8-5.8C9.3,1,6.7,3.6,6.7,6.8C6.7,10,9.3,12.7,12.5,12.7z M12.5,3.9c1.6,0,2.9,1.3,2.9,2.9c0,1.6-1.3,2.9-2.9,2.9c-1.6,0-2.9-1.3-2.9-2.9C9.6,5.2,10.9,3.9,12.5,3.9z M19.2,13.4 c-0.3-0.7-1.2-1.2-2.5-0.3c-1.6,1.3-4.3,1.3-4.3,1.3s-2.6,0-4.3-1.3c-1.2-1-2.1-0.4-2.5,0.3c-0.6,1.2,0.1,1.7,1.5,2.7 c1.3,0.8,3,1.1,4.1,1.2l-0.9,0.9c-1.3,1.3-2.6,2.6-3.4,3.4c-0.5,0.5-0.5,1.4,0,1.9l0.2,0.2c0.5,0.5,1.4,0.5,1.9,0l3.4-3.4 c1.3,1.3,2.6,2.6,3.4,3.4c0.5,0.5,1.4,0.5,1.9,0l0.2-0.2c0.5-0.5,0.5-1.4,0-1.9l-3.4-3.4l-0.9-0.9c1.1-0.1,2.8-0.4,4.1-1.2 C19.2,15.1,19.8,14.5,19.2,13.4z"/> </svg> </a> <a target="_blank" href="https://facebook.com/"> <svg width="26px" height="25px" viewBox="0 0 26 25"> <path fillRule="evenodd" d="M 24.33-0C 24.33-0 1.96-0 1.96-0 1.19-0 0.57 0.62 0.57 1.38 0.57 1.38 0.57 23.62 0.57 23.62 0.57 24.38 1.19 25 1.96 25 1.96 25 14 25 14 25 14 25 14 15.32 14 15.32 14 15.32 10.72 15.32 10.72 15.32 10.72 15.32 10.72 11.54 10.72 11.54 10.72 11.54 14 11.54 14 11.54 14 11.54 14 8.76 14 8.76 14 5.53 15.98 3.77 18.88 3.77 20.27 3.77 21.46 3.88 21.81 3.92 21.81 3.92 21.81 7.3 21.81 7.3 21.81 7.3 19.8 7.3 19.8 7.3 18.22 7.3 17.92 8.04 17.92 9.13 17.92 9.13 17.92 11.54 17.92 11.54 17.92 11.54 21.68 11.54 21.68 11.54 21.68 11.54 21.19 15.32 21.19 15.32 21.19 15.32 17.92 15.32 17.92 15.32 17.92 15.32 17.92 25 17.92 25 17.92 25 24.33 25 24.33 25 25.09 25 25.71 24.38 25.71 23.62 25.71 23.62 25.71 1.38 25.71 1.38 25.71 0.62 25.09-0 24.33-0Z"/> </svg> </a> <a target="_blank" href="https://youtube.com/"> <svg width="26px" height="19px" viewBox="0 0 26 19"> <path fillRule="evenodd" d="M 25.75 14.46C 25.75 14.46 25.5 16.18 24.75 16.93 23.79 17.92 22.72 17.93 22.23 17.99 18.71 18.24 13.43 18.25 13.43 18.25 13.43 18.25 6.89 18.19 4.88 18 4.32 17.89 3.06 17.92 2.11 16.93 1.35 16.18 1.11 14.46 1.11 14.46 1.11 14.46 0.86 12.45 0.86 10.44 0.86 10.44 0.86 8.55 0.86 8.55 0.86 6.54 1.11 4.52 1.11 4.52 1.11 4.52 1.35 2.81 2.11 2.05 3.06 1.06 4.14 1.06 4.63 1 8.15 0.75 13.42 0.75 13.42 0.75 13.42 0.75 13.43 0.75 13.43 0.75 13.43 0.75 18.71 0.75 22.23 1 22.72 1.06 23.79 1.06 24.75 2.05 25.5 2.81 25.75 4.52 25.75 4.52 25.75 4.52 26 6.54 26 8.55 26 8.55 26 10.44 26 10.44 26 12.45 25.75 14.46 25.75 14.46ZM 10.83 5.73C 10.83 5.73 10.83 12.72 10.83 12.72 10.83 12.72 17.62 9.24 17.62 9.24 17.62 9.24 10.83 5.73 10.83 5.73Z"/> </svg> </a> </div> </div> <div class="col-lg-2 col-sm-4 col-xs-16 links"> <h4>mkr-novo2.ru.</h4> <a href="https://mkr-novo2.ru/en/category/internet/">the Internet</a> <a href="https://mkr-novo2.ru/en/category/multimedia/">Multimedia</a> <a href="https://mkr-novo2.ru/en/category/navigation/">Navigators</a> <a href="https://mkr-novo2.ru/en/category/education/">Education</a> <a href="https://mkr-novo2.ru/en/category/at/">BY</a> <a href="https://mkr-novo2.ru/en/category/problems/">Problems</a> </div> <div class="col-lg-2 col-sm-3 col-xs-16 links"> <h4>about the project</h4> <a href="">Feedback</a> <a href="">About the site</a> </div> <div class="col-lg-5 col-sm-1 col-xs-16 links"></div> <div class="col-lg-4 col-sm-5 col-xs-16 links"> </div> </div> <div class="row v-center"> <div class="col-md-8 col-xs-16"> <a data-fancybox data-type="iframe" data-src="">Contacts</a> </div> <div class="col-md-8 col-xs-16"> <div class="share pull-right"> <script type="text/javascript" src="//yastatic.net/es5-shims/0.0.2/es5-shims.min.js" charset="utf-8"></script> <script type="text/javascript" src="//yastatic.net/share2/share.js" charset="utf-8"></script> <div class="ya-share2" data-services="vkontakte,facebook,odnoklassniki,moimir,gplus" data-counter=""></div> </div> </div> </div> </div> </footer> <a href="https://mkr-novo2.ru/en/#bot" id="to-top"> <svg width="50px" height="50px" viewBox="0 0 50 50"> <circle cx="25.00" cy="25.00" r="25.00" fill="rgb(0,0,0)" opacity="0.37"/> <path fillRule="evenodd" d="M 33.94 24.46C 33.94 24.46 25.89 16.3 25.89 16.3 25.32 15.73 24.41 15.73 23.84 16.3 23.84 16.3 15.79 24.46 15.79 24.46 14.88 25.38 15.52 26.97 16.81 26.97 16.81 26.97 20.43 26.97 20.43 26.97 21.23 26.97 21.88 27.62 21.88 28.43 21.88 28.43 21.88 32.51 21.88 32.51 21.88 33.71 22.83 34.68 24.01 34.68 24.01 34.68 25.72 34.68 25.72 34.68 26.9 34.68 27.86 33.71 27.86 32.51 27.86 32.51 27.86 28.43 27.86 28.43 27.86 27.62 28.5 26.97 29.31 26.97 29.31 26.97 32.92 26.97 32.92 26.97 34.21 26.97 34.85 25.38 33.94 24.46Z" fill="rgb(241,241,241)"/> </svg> </a> <div class="overlay"></div> <div class="popup" id="password"> <div class="perfect-scroll"> <h2>Password recovery <div class="close-pop pull-right"> <svg width="10px" height="10px" viewBox="0 0 10 10"> <path fillRule="evenodd" d="M 6.41 5C 6.41 5 9.24 7.83 9.24 7.83 9.63 8.22 9.63 8.85 9.24 9.24 8.85 9.63 8.22 9.63 7.83 9.24 7.83 9.24 5 6.41 5 6.41 5 6.41 2.17 9.24 2.17 9.24 1.78 9.63 1.15 9.63 0.76 9.24 0.37 8.85 0.37 8.22 0.76 7.83 0.76 7.83 3.59 5 3.59 5 3.59 5 0.76 2.17 0.76 2.17 0.37 1.78 0.37 1.15 0.76 0.76 1.15 0.37 1.78 0.37 2.17 0.76 2.17 0.76 5 3.58 5 3.58 5 3.58 7.83 0.76 7.83 0.76 8.22 0.37 8.85 0.37 9.24 0.76 9.63 1.15 9.63 1.78 9.24 2.17 9.24 2.17 6.41 5 6.41 5Z"/> </svg> </div> </h2> <div class="recover-success"> <form action="/recovery/request" data-method="post" method="post" class="recover_form"> <p>Enter your email to restore the password!</p> <div class="input-wrp"> <input name="email" type="text" placeholder="Enter your e-mail"> </div> <input type="submit" data-disable-with="Отправить..." class="btn green" value="Send"> </form> </div> <div class="auth-form_error" style="padding-top: 10px"></div> </div> </div> <script> $('.user.one').click(function (e, ob) { $('.user').removeClass('active-user'); $('.user.one').addClass('active-user'); $('#user_type').val('1'); e.stopPropagation(); } ); $('.user.two').click(function (e, ob) { $('.user').removeClass('active-user'); $('.user.two').addClass('active-user'); $('#user_type').val('2'); e.stopPropagation(); } ); $('.user.three').click(function (e, ob) { $('.user').removeClass('active-user'); $('.user.three').addClass('active-user'); $('#user_type').val('3'); e.stopPropagation(); } ); function clearErrors() { $('.auth-form_error').each(function () { $(this).html(''); } ); } $('body').on('click', '.open-login-form', function (e) { $('#register, .overlay').removeClass('visible-pop'); $('#login, .overlay').addClass('visible-pop'); e.preventDefault(); } ); $('body').on('click', '.open-pass-form', function (e) { $('#register, .overlay').removeClass('visible-pop'); $('#password, .overlay').addClass('visible-pop'); e.preventDefault(); } ); $('.login_form') .on('ajax:beforeSend', function (event, xhr, settings) { clearErrors(); } ) .on('ajax:complete', function (event, xhr, status) { } ) .on('ajax:success', function (event, data, status, xhr) { if (data.status == 0) { $('.auth-form_error').html(data.text + '<br>'); } else { $('.open-register').html(data.text); var delay = 1000; window.location.href = url = window.location.href + "?login=ok"; location.replace(url); setTimeout('window.location.reload(true);', delay); } } ).on('ajax:error', function (event, xhr, status, error) { } ); $('.recover_form') .on('ajax:beforeSend', function (event, xhr, settings) { clearErrors(); } ) .on('ajax:complete', function (event, xhr, status) { } ) .on('ajax:success', function (event, data, status, xhr) { console.log(data); if (data.status == 0) { $('.auth-form_error').html(data.text + '<br>'); } else { $('.recover-success').html('<div class="success" >' + data.text + '</div>'); } } ).on('ajax:error', function (event, xhr, status, error) { } ); $('.registration_form') .on('ajax:beforeSend', function (event, xhr, settings) { var emailError = $('#emailError'); var passwordError = $('#passwordError'); var passwordVerify = $('#passwordVerifyError'); var userTypeError = $('#userTypeError'); var emailExist = $('#emailExist'); emailError.html(''); passwordError.html(''); passwordVerify.html(''); userTypeError.html(''); emailExist.hide(); } ) .on('ajax:complete', function (event, xhr, status) { } ).on('ajax:success', function (event, data, status, xhr) { // insert the failure message inside the "#account_settings" element //console.log(data); if (data.status == 0) { //$('.reg-info').html('<div class="error">' + data.text + '</div>'); if (data.text.email) { var emailError = $('#emailError'); var emailExist = $('#emailExist'); console.log(data.text.email); if (data.text.email == 'Найдена совпадающая со значением запись') { console.log('alert'); emailExist.show(); } else { emailError.html('<i class="icon-error"></i><div class="error_note_wrapper">' + '<div class="error_note">' + '<span class="error_note_text">' + data.text.email + '</span></div></div>'); } } if (data.text.password) { var passwordError = $('#passwordError'); console.log(data.text.password); passwordError.html('<i class="icon-error"></i><div class="error_note_wrapper">' + '<div class="error_note">' + '<span class="error_note_text">' + data.text.password + '</span></div></div>'); } if (data.text.passwordVerify) { var passwordVerify = $('#passwordVerifyError'); console.log(data.text.passwordVerify); passwordVerify.html('<i class="icon-error"></i><div class="error_note_wrapper">' + '<div class="error_note">' + '<span class="error_note_text">' + data.text.passwordVerify + '</span></div></div>'); } if (data.text.captcha) { var captcha = $('#captchaError'); console.log(data.text.captcha); captcha.html('<i class="icon-error"></i><div class="error_note_wrapper">' + '<div class="error_note">' + '<span class="error_note_text">' + data.text.captcha + '</span></div></div>'); } if (data.text.userType) { var user_type = $('#userTypeError'); console.log(data.text.userType); user_type.html('<i class="icon-error"></i><div class="error_note_wrapper">' + '<div class="error_note">' + '<span class="error_note_text">' + data.text.userType + '</span></div></div>'); } } else { $('.reg-success').html(data.text); var delay = 2000; window.location.href = url = window.location.href + "?reg=ok"; location.replace(url); setTimeout('window.location.reload(true);', delay); } } ).on('ajax:error', function (event, xhr, status, error) { } ); </script> <div class="popup" id="premium-pop"> </div> <link rel="stylesheet" href="/videouroki/res/lightslider/lightslider.min.css"> <link rel="stylesheet" href="/videouroki/res/perfectScrollbar/perfect-scrollbar.css"> <link rel="stylesheet" href="/videouroki/assets/font-awesome/css/font-awesome.min.css"> <link rel="stylesheet" href="/assets/vendor/fancybox/jquery.fancybox.min.css"> <script src="/videouroki/res/perfectScrollbar/perfect-scrollbar.jquery.min.js"></script> <script src="/js/rails.js"></script> <script src="/videouroki/res/lightslider/lightslider.min.js"></script> <script src="/videouroki/res/jquery.validate.min.js"></script> <script src="/videouroki/res/autosize-master/autosize.min.js"></script> <script src="/videouroki/js/tabs.js"></script> <script src="/videouroki/js/select.js"></script> <script src="/videouroki/js/global.js?2109"></script> <script src="/videouroki/js/views.js"></script> <script src="/videouroki/plugin/notify/notify.min.js"></script> <script src="/videouroki/plugin/notify/notify-metro.js"></script> <script src="/videouroki/js/lazyload.min.js"></script> <script src="/assets/vendor/fancybox/jquery.fancybox.min.js"></script> <script type="text/javascript"> $(document).ready( function () { // new LazyLoad(); } ) </script> <!--[if gte IE 9]><script type="text/javascript" src="/videouroki/assets/ckeditor-mini/ckeditor.js"></script><![endif]--> <script type="text/javascript" src="/videouroki/js/readmore.js"></script></body> </html>