CodeCharge Studio
search Register Login  

Visual Web Reporting

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> General/Other

 Javascript URL capture

Print topic Send  topic

Author Message
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.
View profile  Send private message
Bubba

Posts: 33
Posted: 07/06/2006, 3:45 PM

It's ok - I figured it out
View profile  Send private message
matheus

Posts: 386
Posted: 07/07/2006, 6:23 AM

How? Your question maybe are another question.

If want ask, please answer ones...

:-D
_________________
Matheus Trevizan

Dynamix Software Ltda.
Blumenau SC Brasil
www.dynamix.com.br
View profile  Send private message
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)
View profile  Send private message

Add new topic Subscribe to topic   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

Internet Database

Visually create Web enabled database applications in minutes.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.