New line javascript or asp.net -
i want add new line in code files can under each other. post code js , asp.net link buttons.
$(qfiles).each(function (i) { var = document.createelement('a'); var issharepoint = this.issharepoint; var img =document.createelement('img') ; if (issharepoint) { a.target = "_blank"; a.href = this.filepath; img.src = apppath + '/images/pagelink_16x16.png'; } else { var filepath = this.filepath; var filename = this.filename; a.onclick = function() { downloadfile(filepath + "\\" + filename); }; img.src = apppath + '/images/download_16x16.png'; } qdiv.appendchild(img); a.innerhtml += this.filename; a.classname = "linksurrogate singleline"; qdiv.appendchild(a); }); qdiv = $(config.jqueryselectors.quotefiles); var dialog = qdiv.dialog({ autoopen: true, height: config.dialog.height, width: config.dialog.width, closeonescape: true, resizable: false, title:"quote "+ quoteno +" files", modal: true, buttons: { "close": function () { qdiv.dialog('close'); } } });
as can see here validation, if sharepoint or not. , there dialog 2 files appear. , here code link buttons:
<div id="quotefiles" style="display: none"> <asp:linkbutton cssclass="linkbutton" id="downloadfile" clientidmode="static" runat="server" onclick="downloadfile_click"></asp:linkbutton> <asp:linkbutton cssclass="linkbutton" id="sharepoint" clientidmode="static" runat="server" onclick="downloadfile_click"></asp:linkbutton> <asp:label runat="server" id="quotefiles" clientidmode="static" text="there no files attached."></asp:label> </div>
i tried document.write
both \n
, <br />
, didn't worked. tried put new line in asp page, nothing seemes work.
after code line:
qdiv.appendchild(a);
put after it:
var p = document.createelement('p'); qdiv.appendchild(p);
this written after link (file -> link -> newline). create empty p tag. append br tag, doesn't show , need 2 br's shown 2 newlines on browsers , 1 newline on other browsers, empty p tag want cause rendered correctly browsers.
Comments
Post a Comment