I have a revlet that needs to know its address on the internet. Is there a function or parameter that can be passed? Or can I call something to figure out the URL of the Revlet itself? I have a settings file that resides in the same folder as the revlet on the server, I want to read that file in. I don't need to write to the file, just read. I can use GET URL if I know the address.
Any help would be appreciated.
Richard
Identifying the location of a revlet
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
Re: Identifying the location of a revlet
Hi Richard,
welcome to the forum.
If you want to read a prefs file from your server you already know the URL.
Lets assume your prefs file is in your public folder in a subfolder testfile in another subfolder presets and the name of the text file is prefs.txt then you can get it from your revlet like this:
regards
Bernd
welcome to the forum.
If you want to read a prefs file from your server you already know the URL.
Lets assume your prefs file is in your public folder in a subfolder testfile in another subfolder presets and the name of the text file is prefs.txt then you can get it from your revlet like this:
Code: Select all
on mouseUp
put "http://yourDomainName.com/testfile/presets/prefs.txt" into myPath
put url myPath into field 1
-- or
put url myPath into myVariable
end mouseUp
Bernd
Re: Identifying the location of a revlet
Thanks Bernd,
I know my server's address, but this revlet is to deployed on customers webservers as a product and each deployment will be on a different server. I don't want to hard code each deployment's address in the revlet. Somehow I'd like to read in a file that gives me the URL of the server it is sitting on.
Hope that make better sense.
Richard
I know my server's address, but this revlet is to deployed on customers webservers as a product and each deployment will be on a different server. I don't want to hard code each deployment's address in the revlet. Somehow I'd like to read in a file that gives me the URL of the server it is sitting on.
Hope that make better sense.
Richard
Re: Identifying the location of a revlet
Hi Richard,
If you know the address when you generate the HTML page that the revlet resides in, you could pass the url to it using the revletParams. There is a lesson on our site that explains how to do this:
http://lessons.runrev.com/spaces/lesson ... -a-plugin-
Hope this helps
Regards
Oliver
If you know the address when you generate the HTML page that the revlet resides in, you could pass the url to it using the revletParams. There is a lesson on our site that explains how to do this:
http://lessons.runrev.com/spaces/lesson ... -a-plugin-
Hope this helps
Regards
Oliver
Oliver Kenyon
Software Developer
Runtime Revolution
Software Developer
Runtime Revolution
Re: Identifying the location of a revlet
Oliver,
Thank you so much. I was headed in the right direction, but the lesson was perfect help.
Richard
Thank you so much. I was headed in the right direction, but the lesson was perfect help.
Richard