Loading...
Copy code
Close
Permalink
Close
Please tell us why you want to mark the subject as inappropriate.
(Maximum 200 characters)
Report Inappropriate
Cancel
Private Message
From :
guest
To :
Subject :
Content :
Type the characters you see in the picture below.
Send
Cancel
From :
guest
To :
Subject :
Content :
Type the characters you see in the picture below.
Send
Update
Cancel
Feedback
Email ID
Subject :
Comments :
Send
Cancel
Private Message
Type the characters you see in the picture below.
Type the characters you see in the picture below.
Attach files
Desktop
Google Docs
Each Attachment size should not exceed 1.0 MB.
Max no of attachments : 3
Loading User Profile...
guest
Response title
This is preview!
Attachments
Publish
Back to edit
Cancel
(
)
Sign In
New to this Portal? Click here to
Sign up
You can also use the below options to login
Login with Facebook
Login with Google
Login with Yahoo
jQuery
Plugins
UI
Meetups
Forum
Blog
About
Donate
All Forums
Recent Posts
Log In
Search
jQuery
Search
jQuery Forum
Move this topic
Forum :
Getting Started
Using jQuery
Using jQuery Plugins
Using jQuery UI
Developing jQuery Core
Developing jQuery Plugins
Developing jQuery UI
QUnit and Testing
About the jQuery Forum
jQuery Conferences
jQuery Mobile
Developing jQuery Mobile
Sub forum :
Move this topic
Cancel
Using jQuery UI
Asew
Load div in AJAX
in
Using jQuery UI
•
18 days ago
Guys,
I have page
index.php
where:
$result = '999';
<button class ="btn_y" value="<?=$result?>">EDIT</button>
I add AJAX query:
<script>
$(document).ready (function(){
$('.btn_y').click (function (){
var result= $(this).val();
$('#dialog-edit').dialog({
modal: false,
open:function ()
{
$.ajax(function(){
url:"edit_php",
data:{ 'result' : result},
type:"post",
sucess:function(msg){
$('#dialog-edit').html(msg)
}
});
},
resizable: false,
height: "auto",
width: 400,
modal: true,
position: {
my: "center",
at: "center",
of: window
},
buttons: {
"SAVE": function() {
},
CLOSE: function() {
}
}
});
}
)
});
</script>
Content
edit_php
:
$result = POST['result'];
<div id="dialog-edit">
<? echo $result?>
</div>
but my div not view(
Why?
1
Reply
Replies(8)
jakecigar
Re: Load div in AJAX
18 days ago
Open up the debugger in your browser. Did it make an ajax call?
Is there a dialog-edit in the original HTML? If so, after the ajax there are 2. If not, then there are none.
JΛ̊KE
Leave a comment on jakecigar's reply
Asew
Re: Load div in AJAX
18 days ago
Original file this index.php. In index.php
not div
. Debugger not write information about my ajax. I think that my code not true. How correct write this code?
Leave a comment on Asew's reply
jakecigar
Re: Load div in AJAX
18 days ago
If it's not there, $('#dialog-edit').html(msg) does nothing.
The debugger has a network tab that tells you what was requested.
It also has a console tab to show any errors.
JΛ̊KE
Leave a comment on jakecigar's reply
Asew
Re: Load div in AJAX
18 days ago
In Preview show my dialog with my $result. In Console not write error.
Leave a comment on Asew's reply
jakecigar
Re: Load div in AJAX
18 days ago
If it shows the dialog, that comes from an ajax request, what is wrong? You don't have any code to deal with the update.
JΛ̊KE
Leave a comment on jakecigar's reply
Asew
Re: Load div in AJAX
18 days ago
The dialog is not dispalyed in the window, only Preview
Leave a comment on Asew's reply
jakecigar
Re: Load div in AJAX
18 days ago
Use a real browser. Use Chrome. Use it's debugger.
JΛ̊KE
Leave a comment on jakecigar's reply
jakecigar
Re: Load div in AJAX
18 days ago
Put a demo of your code on the internet for me to run. Share a link to it.
JΛ̊KE
Leave a comment on jakecigar's reply
Change topic type
Topic Type :
Discussions
Questions
Ideas
Problems
No of days :
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
Change topic type
Cancel
Link this topic
Provide the permalink of a topic that is related to this topic
Permalink
Save
Close
Reply to Asew's question
Top
Reply
{"z693433561":[14737000008111038,14737000008111057,14737000008111061,14737000008111065],"z2950240":[14737000008114023,14737000008111059,14737000008111063,14737000008111067,14737000008111069]}
Statistics
8
Replies
431
Views
1
Followers
Tags
Cancel
ajax
Actions
Permalink
Related Posts
$.ajax
ajax
ajax
Ajax
Ajax
AJAX