b7music
![](http://forum.ru-board.com/board/avatars/Spiky.gif)
Advanced Member | Редактировать | Профиль | Сообщение | ICQ | Цитировать | Сообщить модератору Здравствуйте. Подскажите, как вставить свой блок div после этого Код: (insertedLoc = BX.create("DIV", { attrs: { "data-property-id-row": locationId }, props: { className: "form-group bx-soa-location-input-container soa-property-container" }, style: { visibility: "hidden" }, html: currentLocation.HTML, })), | Код: var htmlText = <div class="form-group ">Текст текст</div>document.write(htmlText); | так не работает( скрипт перестает работать. Вот полная функция Код: getDeliveryLocationInput: function (node) { var currentProperty, locationId, altId, location, k, altProperty, labelHtml, currentLocation, insertedLoc, labelTextHtml, label, input, altNode; for (k in this.result.ORDER_PROP.properties) if (this.result.ORDER_PROP.properties.hasOwnProperty(k) && "Y" == (currentProperty = this.result.ORDER_PROP.properties[k]).IS_LOCATION) { (locationId = currentProperty.ID), (altId = parseInt(currentProperty.INPUT_FIELD_LOCATION)); break; } if ((location = this.locations[locationId]) && location[0] && location[0].output) for (k in ((this.regionBlockNotEmpty = !0), (labelHtml = '<label class="bx-soa-custom-label" for="soa-property-' + parseInt(locationId) + '">' + ("Y" == currentProperty.REQUIRED ? '<span class="bx-authform-starrequired">*</span> ' : "") + BX.util.htmlspecialchars(currentProperty.NAME) + (currentProperty.DESCRIPTION.length ? " <small>(" + BX.util.htmlspecialchars(currentProperty.DESCRIPTION) + ")</small>" : "") + "</label>"), (currentLocation = location[0].output), (insertedLoc = BX.create("DIV", { attrs: { "data-property-id-row": locationId }, props: { className: "form-group bx-soa-location-input-container soa-property-container" }, style: { visibility: "hidden" }, html: currentLocation.HTML, })), node.appendChild(insertedLoc), node.appendChild(BX.create("INPUT", { props: { type: "hidden", name: "RECENT_DELIVERY_VALUE", value: location[0].lastValue } })), currentLocation.SCRIPT)) currentLocation.SCRIPT.hasOwnProperty(k) && BX.evalGlobal(currentLocation.SCRIPT[k].JS); if (location && location[0] && location[0].showAlt && altId > 0) for (k in this.result.ORDER_PROP.properties) if (parseInt(this.result.ORDER_PROP.properties[k].ID) == altId) { altProperty = this.result.ORDER_PROP.properties[k]; break; } altProperty && ((altNode = BX.create("DIV", { attrs: { "data-property-id-row": altProperty.ID }, props: { className: "form-group bx-soa-location-input-container" } })), (labelTextHtml = BX.util.htmlspecialchars(altProperty.NAME)), (labelTextHtml += "Y" == altProperty.REQUIRED ? '<span class="bx-authform-starrequired">*</span> ' : ""), (label = BX.create("LABEL", { attrs: { for: "altProperty" }, props: { className: "bx-soa-custom-label" }, html: labelTextHtml })), (input = BX.create("INPUT", { props: { id: "altProperty", type: "text", placeholder: altProperty.DESCRIPTION, autocomplete: "city", className: "form-control bx-soa-customer-input bx-ios-fix", name: "ORDER_PROP_" + altProperty.ID, value: altProperty.VALUE, }, })), altNode.appendChild(label), altNode.appendChild(input), node.appendChild(altNode), this.bindValidation(altProperty.ID, altNode)), location && location[0] && node.appendChild(BX.create("DIV", { props: { className: "bx-soa-reference" }, html: this.params.MESS_REGION_REFERENCE })); }, | Нужно после этого блока создать обычный со своим текстом. | Всего записей: 684 | Зарегистр. 04-03-2010 | Отправлено: 15:05 06-12-2022 | Исправлено: b7music, 15:06 06-12-2022 |
|