Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
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
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?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others surveying the Monastery: (10)
As of 2014-08-27 12:28 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The best computer themed movie is:











    Results (238 votes), past polls