I think you probably want to use document.location.href which is the
string representation of the "location" object.

Also, jus as an aside, "document.location" is actually a deprecated
alias (by spec) to the real "window.location", so you might consider
updating your references to "window." instead of "document.".



On Dec 27, 7:06 pm, Joel Nygårds <joel.nyga...@gmail.com> wrote:
> Hello!
> I started using jQuery only recently so the behaviour I'm experiencing
> may be the expected one. I suspect it's not though.
>
> I have the following piece of code:
> // Code
> jQuery.post("trackclick.php",{ fromURL: document.location });
>
> It works correctly in IE 8.0 but when I try it in Firefox 3.0.16 I get
> an error:
>
> // Error
> Error: [Exception... "Component returned failure code: 0x80004001
> (NS_ERROR_NOT_IMPLEMENTED) [nsIDOMLocation.host]"  nsresult:
> "0x80004001 (NS_ERROR_NOT_IMPLEMENTED)"  location: "JS frame 
> ::http://code.jquery.com/jquery-latest.js:: anonymous :: line 604"
> data: no]
>
> Source file:http://code.jquery.com/jquery-latest.js  Line: 604
>
> If I do it like this it works in firefox too:
> // Code
> var from = new String(document.location);
> jQuery.post("trackclick.php",{ fromURL: from });
>
> So I guess I was just wondering if this is supposed to happen. The
> documentation says "Object must be Key/Value pairs". Is
> document.location not considered a value?

--

You received this message because you are subscribed to the Google Groups 
"jQuery Development" group.
To post to this group, send email to jquery-...@googlegroups.com.
To unsubscribe from this group, send email to 
jquery-dev+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/jquery-dev?hl=en.


Reply via email to