[jQuery] Re: parent load question
I can't really supply a working example, but suffice it to say I can seem to only get $.get to work not .load I went and read up more about about cross domain ajax and understand why it should not work now. Thanks for the heads up... On Mar 2, 8:18 am, mkmanning wrote: > You can't make ajax calls across domains; can you give a code example > of it working on the different server? If you haven't already, I > suggest looking in Firebug on Firefox (make sure you have console and > script enabled), it should show an error when a cross-domain ajax call > is made. > > On Mar 2, 7:05 am, joshm wrote: > > > It is not on the same domain...sorry the posting seems a bit > > screwy...posts took forever to show up etc... > > > Anyways, it is not on the same domain, but oddly enough if I move the > > call to a different server (not the same domain) it doesn't have a > > problem. The domain that it can'tloadfrom is on a windows godaddy > > accountthe other domain which it could pull from is a dedicated > > linux host. > > > If you don't mind, why would we have to use JSONP ? And do you have > > an example? > > > Thanks, > > > JM > > > On Mar 1, 9:32 pm, Ami wrote: > > > > If it's not on the same domain you must use JSONP. > > > > On Mar 2, 7:27 am, mkmanning wrote: > > > > > I'll go ahead and ask this here as well: is 'http://test.com/ > > > > remote.html' in the same domain? > > > > > On Mar 1, 8:55 pm, Ami wrote: > > > > > > Try to put between and #myelemnt > > > > > > > > > > > > > > > > > > > > > > Aminadav > > > > > On Mar 2, 4:15 am, joshm wrote: > > > > > > > Can someone explain how to do this, I'm trying toloadtheparentof > > > > > > an element (which will be a cell) and thenloadthe with the > > > > > > html from a remote file kind of like so: > > > > > > > varparent= $('#myelement').parent().load('http://test.com/ > > > > > > remote.html'); > > > > > > > I have tried several other variations and theloadalways fails...no > > > > > > error messages, just doesn't seem to like it. It may have something > > > > > > to do with it still being a jquery object perhaps?
[jQuery] Re: parent load question
You can't make ajax calls across domains; can you give a code example of it working on the different server? If you haven't already, I suggest looking in Firebug on Firefox (make sure you have console and script enabled), it should show an error when a cross-domain ajax call is made. On Mar 2, 7:05 am, joshm wrote: > It is not on the same domain...sorry the posting seems a bit > screwy...posts took forever to show up etc... > > Anyways, it is not on the same domain, but oddly enough if I move the > call to a different server (not the same domain) it doesn't have a > problem. The domain that it can't load from is on a windows godaddy > accountthe other domain which it could pull from is a dedicated > linux host. > > If you don't mind, why would we have to use JSONP ? And do you have > an example? > > Thanks, > > JM > > On Mar 1, 9:32 pm, Ami wrote: > > > If it's not on the same domain you must use JSONP. > > > On Mar 2, 7:27 am, mkmanning wrote: > > > > I'll go ahead and ask this here as well: is 'http://test.com/ > > > remote.html' in the same domain? > > > > On Mar 1, 8:55 pm, Ami wrote: > > > > > Try to put between and #myelemnt > > > > > > > > > > > > > > > > > > Aminadav > > > > On Mar 2, 4:15 am, joshm wrote: > > > > > > Can someone explain how to do this, I'm trying to load the parent of > > > > > an element (which will be a cell) and then load the with the > > > > > html from a remote file kind of like so: > > > > > > var parent = $('#myelement').parent().load('http://test.com/ > > > > > remote.html'); > > > > > > I have tried several other variations and the load always fails...no > > > > > error messages, just doesn't seem to like it. It may have something > > > > > to do with it still being a jquery object perhaps?
[jQuery] Re: parent load question
It is not on the same domain...sorry the posting seems a bit screwy...posts took forever to show up etc... Anyways, it is not on the same domain, but oddly enough if I move the call to a different server (not the same domain) it doesn't have a problem. The domain that it can't load from is on a windows godaddy accountthe other domain which it could pull from is a dedicated linux host. If you don't mind, why would we have to use JSONP ? And do you have an example? Thanks, JM On Mar 1, 9:32 pm, Ami wrote: > If it's not on the same domain you must use JSONP. > > On Mar 2, 7:27 am, mkmanning wrote: > > > I'll go ahead and ask this here as well: is 'http://test.com/ > > remote.html' in the same domain? > > > On Mar 1, 8:55 pm, Ami wrote: > > > > Try to put between and #myelemnt > > > > > > > > > > > > > > Aminadav > > > On Mar 2, 4:15 am, joshm wrote: > > > > > Can someone explain how to do this, I'm trying to load the parent of > > > > an element (which will be a cell) and then load the with the > > > > html from a remote file kind of like so: > > > > > var parent = $('#myelement').parent().load('http://test.com/ > > > > remote.html'); > > > > > I have tried several other variations and the load always fails...no > > > > error messages, just doesn't seem to like it. It may have something > > > > to do with it still being a jquery object perhaps?
[jQuery] Re: parent load question
If it's not on the same domain you must use JSONP. On Mar 2, 7:27 am, mkmanning wrote: > I'll go ahead and ask this here as well: is 'http://test.com/ > remote.html' in the same domain? > > On Mar 1, 8:55 pm, Ami wrote: > > > > > Try to put between and #myelemnt > > > > > > > > > > Aminadav > > On Mar 2, 4:15 am, joshm wrote: > > > > Can someone explain how to do this, I'm trying to load the parent of > > > an element (which will be a cell) and then load the with the > > > html from a remote file kind of like so: > > > > var parent = $('#myelement').parent().load('http://test.com/ > > > remote.html'); > > > > I have tried several other variations and the load always fails...no > > > error messages, just doesn't seem to like it. It may have something > > > to do with it still being a jquery object perhaps?
[jQuery] Re: parent load question
I'll go ahead and ask this here as well: is 'http://test.com/ remote.html' in the same domain? On Mar 1, 8:55 pm, Ami wrote: > Try to put between and #myelemnt > > > > > > Aminadav > On Mar 2, 4:15 am, joshm wrote: > > > Can someone explain how to do this, I'm trying to load the parent of > > an element (which will be a cell) and then load the with the > > html from a remote file kind of like so: > > > var parent = $('#myelement').parent().load('http://test.com/ > > remote.html'); > > > I have tried several other variations and the load always fails...no > > error messages, just doesn't seem to like it. It may have something > > to do with it still being a jquery object perhaps?
[jQuery] Re: parent load question
Try to put between and #myelemnt Aminadav On Mar 2, 4:15 am, joshm wrote: > Can someone explain how to do this, I'm trying to load the parent of > an element (which will be a cell) and then load the with the > html from a remote file kind of like so: > > var parent = $('#myelement').parent().load('http://test.com/ > remote.html'); > > I have tried several other variations and the load always fails...no > error messages, just doesn't seem to like it. It may have something > to do with it still being a jquery object perhaps?