Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

(OT) how to pass the URL itself to an embedded script

by krusty (Hermit)
on Jan 28, 2005 at 22:37 UTC ( #426148=perlquestion: print w/replies, xml ) Need Help??
krusty has asked for the wisdom of the Perl Monks concerning the following question:

If I have an html file with a <script> tag is there a way to pass the name and the included parameters of the calling URL?

Thanks,
Kristina

20050203 Edit by castaway: Changed title from 'how to pass the URL itself to an embedded script'

  • Comment on (OT) how to pass the URL itself to an embedded script

Replies are listed 'Best First'.
Re: (OT) (OT) how to pass the URL itself to an embedded script
by ikegami (Pope) on Jan 28, 2005 at 22:45 UTC

    IE's DHTML/DOM is documented here.

    The document object has a URL property, which would include GET arguments, but not POST arguments.

    If you need POST arguments, the arguments could be included in the generated page as hidden fields (i.e. <input type="hidden" name="name" value="value">). Then your script can get the value of those hidden fields.

Re: (OT) how to pass the URL itself to an embedded script
by traveler (Parson) on Jan 29, 2005 at 16:46 UTC
    Hello, krusty! The URL of a document is object.LocationURL. You can then pass that to the script.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://426148]
Approved by zetetes
help
Chatterbox?
[Lady_Aleena]: I'll just have to search for the files using the subs and open them up.
[Discipulus]: nice Perl dreams, folks.. shower->Dumas->bed
[erix]: pere ou fils?
[Lady_Aleena]: Discipulus, good night.
[Discipulus]: pere, le vicomte de bragelonne.. wonderfull
[erix]: I'll keep that in mind (haven't read), buona notte :)
[Discipulus]: oh erix but is the fourth of cycle;read them in order
[erix]: hm, perhaps I can just read it here
Discipulus zzz...

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (8)
As of 2017-05-23 19:57 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?