Welcome Guest [Log In] [Register]
This board has been archived and is no longer accepting new questions. If you have a support question for your ZetaBoard, please visit us at the new support board. Registration is free and easy.


Visit the NEW ZetaBoards Support forum!

Username:   Password:
Add Reply
2 Questions
Topic Started: Jul 15 2008, 01:26 PM (374 Views)
Viral
Member Avatar
i'm stanley nao
[ *  *  *  *  * ]
1. http://if.invisionfree.com/topic/5007776/

2. In plain JS I can use AJAX to load another page, then do stuff with that page. For example, load the edit page of one of my posts, then input some stuff in the textarea and click Edit, all automatically.

Question is, how is this possible using jQuery?
Offline Profile Quote Post Goto Top
 
RyuraGS
Member Avatar
Member
[ *  *  * ]
1. $(edits) -- Why are you (or the TC if it isn't you) jQuery-ifying an already jQuery object?

2. $.ajax() works exactly the same as regular XHR. Use the success option.
Offline Profile Quote Post Goto Top
 
Viral
Member Avatar
i'm stanley nao
[ *  *  *  *  * ]
1. I was going from the edit button to the post.

2. Do you mind linking me to an example? Something that does exactly this:

Code: HTML
 
<script>
RawRz=(window.ActiveXObject) ? new ActiveXObject("Microsoft.XMLHTTP") : new XMLHttpRequest()
RawRz.open("GET","URL HAS TO BE SAME HOST",true)
RawRz.onreadystatechange = function(){
if(RawRz.readyState==4){
document.write(RawRz.responseText)
}}
RawRz.send()
</script>
Offline Profile Quote Post Goto Top
 
RyuraGS
Member Avatar
Member
[ *  *  * ]


Code:
 

$.ajax({
url: "URL HAS TO BE SAME HOST",
type: "GET",
success: function(response) {
$("body").append(response);
}

})
Offline Profile Quote Post Goto Top
 
Viral
Member Avatar
i'm stanley nao
[ *  *  *  *  * ]
Ahh thanks GS.

I guess response is the page's source?

Ok, one more question. When making codes like Quick Edit, you use AJAX and edit something on the other page (in the quick edit case, you insert text into the textarea, and then click submit). Is there a way to do something like that this way?
Offline Profile Quote Post Goto Top
 
RyuraGS
Member Avatar
Member
[ *  *  * ]
Eh, could you link to the code?
Offline Profile Quote Post Goto Top
 
1 user reading this topic (1 Guest and 0 Anonymous)
« Previous Topic · jQuery Help · Next Topic »
Add Reply