PDA

View Full Version : URL Address


datacloud
05-15-2002, 03:06 AM
I want to set a variable to the URL address which was typed in to reach the page.

I need to differentiate if a user enter http://www.test.com, http://12.45.34.56, or http://www.test.com/index.html

I will be using this information in a nested if statement to alter the look of the Flash screen by shuffeling the user to different scenes.

****************
I am using the flash action script on a dynamic page

www.dynamic.com

the page has variables which are parsed from the url address
ex.
www.dynamic.com/index.cfm/4,5,html
www.dynamic.com/index.cfm/6,7,html

1st number represents the articles group
2nd number represents article number

When entering the page I need to know if the url address typed into the users browse was:

www.dynamic.com
www.dynamic.com/index.cfm/4,5,html
www.dynamic.com/index.cfm/6,7,html

this in CGI varibles would be server_name + Script_name

I will then use a action script if statment to send the script to the correct scene for that page.

farafiro
05-15-2002, 07:36 AM
U just make a submit button and attach that code to it:

on (release, keyPress "<Enter>") {
if (_root.inpuText == "http://www.test.com") {
getURL ( url, window, method );
}else if (_root.inpuText== "http://12.45.34.56") {
getURL ( url, window, method );
} else if (_root.inpuText== "http://www.test.com/index") {
getURL ( url, window, method );
}
}


and put the URLs u want

CyanBlue
05-15-2002, 04:19 PM
Hi...

Just curious...

Can he use HTML Referrer thing to do the job???

Jason

tg
05-15-2002, 05:33 PM
http refferer would tell him where the user came from... not how the user got there.
but along those lines... could you use javascript: document.location?
... document.location.href should return the current address (URL) in the address bar.... i think.


//this is untested but...
getURL("javascript: function getAdd(){return document.location.href;}");


again... untested.
... uhmmm. no space in javascript.

farafiro
05-16-2002, 05:51 AM
Now, I don't understand .... when I posted my reply there were only 4 lines written. Now there are several line edited .... but I thin the editing is only one or two words or a couple of lines :mad:

CyanBlue
05-16-2002, 06:20 AM
Well... gotta be some sort of a ghose???

You said you edited your posting, but there is no line saying that you did edit your posting like 'Last edited by...'
Or... was that the candyman??? :P

Jason

farafiro
05-16-2002, 06:46 AM
heheheheeeeeeeeeee
nop man I meant what datacloud did

the only things was written when I posted mine onlt 'till the asterix (only four lines) ..... no Candies there sweety :p