Bubba
Posts: 33
|
| Posted: 03/09/2006, 9:15 PM |
|
Hi,
I am trying to use Javascript to capture the URL of the page being viewed (for an "email this page" function").
The problem I have is the URL's are asp queries eg: http:www.mysite.com?item=33&page=1
I am using: location.href, but this will only capture the info up to the string query (http:www.mysite.com?item=33) and not anything after the ampersand (&)
Is there anyway to capture the whole string?? I thought of a replace str function but can’t quite figure it out.
Any help would be very appreciated.
|
 |
 |
Bubba
Posts: 33
|
| Posted: 07/06/2006, 3:45 PM |
|
It's ok - I figured it out
|
 |
 |
matheus
Posts: 386
|
| Posted: 07/07/2006, 6:23 AM |
|
How? Your question maybe are another question.
If want ask, please answer ones...
_________________
Matheus Trevizan
Dynamix Software Ltda.
Blumenau SC Brasil
www.dynamix.com.br |
 |
 |
WKempees
|
| Posted: 07/07/2006, 7:37 AM |
|
Matheus is correct in stating:
"Those that seek answers, should also give answers"
from: "The Basic Principles of Information Sharing"
"Bubba" <Bubba@forum.codecharge> schreef in bericht
news:944110b8ea6d97@news.codecharge.com...
> Hi,
>
> I am trying to use Javascript to capture the URL of the page being viewed
> (for
> an "email this page" function").
>
> The problem I have is the URL's are asp queries eg:
> http:www.mysite.com?item=33&page=1
>
> I am using: location.href, but this will only capture the info up to the
> string
> query (http:www.mysite.com?item=33) and not anything after the ampersand
> (&)
>
> Is there anyway to capture the whole string?? I thought of a replace str
> function but can't quite figure it out.
>
> Any help would be very appreciated.
>
> ---------------------------------------
> Sent from YesSoftware forum
> http://forums.codecharge.com/
>
|
|
|
 |
Bubba
Posts: 33
|
| Posted: 07/09/2006, 4:05 PM |
|
the trick is to use variables in the body of the HTML:
var sSubject
var sBody
then in the document.write use escape(sSubject) + escape(sBody)
|
 |
 |
|