kevp75
asked on
Jquery $.get Error...
Having an issue with this little bit of code:
function loadPageSlide(strPageToLoa d, strWhereToLoadIt) {
$.get(strPageToLoad, function (data) {
$(strWhereToLoadIt).html(d ata).slide Down(500);
});
}
it is causing the following error: Node cannot be inserted at the specified point in the hierarchy
The page it is loading is very simple:
<div>
Hello World!
</div>
function loadPageSlide(strPageToLoa
$.get(strPageToLoad, function (data) {
$(strWhereToLoadIt).html(d
});
}
it is causing the following error: Node cannot be inserted at the specified point in the hierarchy
The page it is loading is very simple:
<div>
Hello World!
</div>
If strWheretoload is an ID then try $("#"+strToLoad).load(strP ageToLoad)
ASKER
@leakim971
now nothing shows, I then try to alert param1 to see what it is, and I get 'success', for data, I simply get [Object]
@mplungjan
strWheretoLoad is an ID, but I pass it in as #THEID already
now nothing shows, I then try to alert param1 to see what it is, and I get 'success', for data, I simply get [Object]
@mplungjan
strWheretoLoad is an ID, but I pass it in as #THEID already
ASKER
@mplungjan
.load does work, however, it does not do the slide effect that is required.
.load does work, however, it does not do the slide effect that is required.
Did you add .slideDown(500) to the load?
ASKER
:) yes
Update :
(don't forget to use the appropriate selector for strWhereToLoadIt, I mean a # for ID, a dot (.) for class and so on...)
(don't forget to use the appropriate selector for strWhereToLoadIt, I mean a # for ID, a dot (.) for class and so on...)
var kevp75 = function(param1) {
return function(data, textStatus, jqXHR) {
$(param1).html(data).slideDown(500);
}
}
function loadPageSlide(strPageToLoad, strWhereToLoadIt) {
$.get(strPageToLoad, kevp75(strWhereToLoadIt));
}
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Open in new window