EasyUI
Home
Demo
Tutorial
Documentation
Download
Extension
Contact
Forum
EasyUI Forum
September 13, 2025, 08:59:58 PM
Welcome,
Guest
. Please
login
or
register
.
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
News
:
Home
Help
Search
Login
Register
EasyUI Forum
>
General Category
>
EasyUI for jQuery
>
i lost the style when send html code by json
Pages: [
1
]
« previous
next »
Print
Author
Topic: i lost the style when send html code by json (Read 6568 times)
pedroc
Newbie
Posts: 17
i lost the style when send html code by json
«
on:
September 22, 2015, 09:40:47 AM »
hi, i have the next problem. When i send the htlm code through the json i lost the style. here show me code:
function submitForm() {
if($('#user').val() != '' && $('#pass').val() != '') {
$.ajax({
type: "POST",
url: "index.php/maincontroller/sing_in",
dataType: "json",
data: {user:$('#user').val(),pass:calcMD5($('#pass').val())},
cache: false,
success: function(data){
if(dato.success == 'true') {
$("#dlogin").html('');
$("#welcome").html("<a class='easyui-linkbutton'>Add</a>"); //this is problem
}
...
<div class="easyui-layout" style="width:100%;height:100%;">
<div data-options="region:'north'" style="height:150px">
<div style="position:relative"><img src=<?php echo base_url("img/header/header.png"); ?>>
<div style="position:absolute; top:10; left:500;"><img src=<?php echo base_url("img/header/logo.png"); ?>></div>
<div id="dlogin" style="position:absolute; top:110; left:1200;"><?php if(isset($login)) echo $login; ?></div>
<div id="welcome" style="position:absolute; top:5%; left:80%;">
<!--should be shown here div whit style, but loses-->
</div>
</div>
</div>
HELP ME PLEASE I NEED SOLVE THIS PROBLEM FAST
Logged
stworthy
Administrator
Hero Member
Posts: 3581
Re: i lost the style when send html code by json
«
Reply #1 on:
September 22, 2015, 06:42:04 PM »
Please try this:
Code:
$("#welcome").html("<a class='easyui-linkbutton'>Add</a>");
$.parser.parse('#welcome');
Logged
Pages: [
1
]
Print
« previous
next »
Jump to:
Please select a destination:
-----------------------------
General Category
-----------------------------
=> News
=> General Discussion
=> EasyUI for jQuery
=> EasyUI for Angular
=> EasyUI for Vue
=> EasyUI for React
=> Bug Report
Loading...