Support Forum Softcomplex logo
About Us  | Services  | Download  | Order  | Support  | |
| Search | Today's Posts | Stats | Board Rules | Not logged in [ Login | Register ]
go to bottom
Last active: Never

Printable Version | Subscribe | Add to Favourites   Post new thread
Author: Subject: calling script from diff dir
Waseem
Newbie

Posts: 1
Registered: 3/25/2003
Member Is Offline
posted on 3/25/2003 at 03:50 PM Reply With Quote
calling script from diff dir


Hi

I have my scripts in /ts_fies dir

when i have a page using the sctipt such as http://www.xxx.com/test.htm it works

however if i have http://www.xxx.com/test/test.html

it doesnt work, even if i put the call to scrool.js as, http://www.xxx.com/ts_files/scrool.js

Is there a reason for this or am i doing something wrong ?

Waseem
View User's Profile View All Posts By User U2U Member
nik


Posts:
Registered: 1/1/1970
Member Is Offline
posted on 3/26/2003 at 08:29 AM Reply With Quote

Haven't you forgotten to change Tscroll_path_to_files variable value in file scroll.js?
View User's Profile View All Posts By User U2U Member
genial
Member

Posts: 15
Registered: 12/10/2004
Member Is Offline
posted on 12/26/2004 at 03:03 PM Reply With Quote
How do I do this ?


Dear Support,

How do I do the following.

tigra scroller files are located here :

/home/myuser/public_html/main/folder/

I want to be able to call tigra scroller from :

http://mydomain.com/myfolders/

http://mydomain.com/anotherfolder/folder2/

http://mydomain.com/main/folderx

I tried setting var path to file to be /home/myuser/public_html/main/folder/ But it did not work.

How do I accomplish this?

Regards,
View User's Profile View All Posts By User U2U Member
genial
Member

Posts: 15
Registered: 12/10/2004
Member Is Offline
posted on 12/26/2004 at 03:29 PM Reply With Quote
I found it...


Dear Support,

After checking each post carefully I found the answer

http://www.softcomplex.com/forum/viewthread_1342/

Regards,
View User's Profile View All Posts By User U2U Member
genial
Member

Posts: 15
Registered: 12/10/2004
Member Is Offline
posted on 12/26/2004 at 04:39 PM Reply With Quote
calling scroller from subdomain...


Dear Support,

as it relates to placing different paths for the variable, can I put absolute paths or URL? how can I put the following in html:

<script language="javascript">
var Tscroll_path_to_files = '/home/myuser/public_html/main/scroll/ts_files/';
</script>
<script language="javascript" src="/home/myuser/public_html/main/scroll/ts_files/scroll.js"></script>
</head>

I would like to call scroller in an html file from a subdomain URL eg. http://subdomain.mysite.com/webpage.html

Regards,
View User's Profile View All Posts By User U2U Member
rock
Moderator

Posts: 687
Registered: 4/15/2003
Member Is Offline
posted on 12/27/2004 at 12:51 PM Reply With Quote

Browser via JS has no access to absolute paths at your server. So Tscroll_path_to_files is an URL path. Eg.
Your page URL is:
http://subdomain.mysite.com/webpage.html
Your scroller files are located at:
http://subdomain.mysite.com/scripts/ts_files/

So at your page (webpage.html) you could define:
var Tscroll_path_to_files = 'scripts/ts_files/';
or
var Tscroll_path_to_files = '/scripts/ts_files/';
View User's Profile View All Posts By User U2U Member
genial
Member

Posts: 15
Registered: 12/10/2004
Member Is Offline
posted on 12/27/2004 at 02:52 PM Reply With Quote
clarification...


Okay so if I have the following can this work?

scroller files are located here :
http://www.mysite.com/scripts/ts_files/

I want to call it from subdomain : http://subdomain.mysite.com/webpage.html

What would I put in the var Tscroll_path_to_files in webpage.html located at : http://subdomain.mysite.com/

I would want it to access the scroller files at http://www.mysite.com/scripts/ts_files/ and not in the subdomain. How do I tell it to check http://www.mysite.com/scripts/ts_files/ for scroller files?

Regards,
View User's Profile View All Posts By User U2U Member
rock
Moderator

Posts: 687
Registered: 4/15/2003
Member Is Offline
posted on 12/28/2004 at 11:14 AM Reply With Quote

You could try, but I guess it's impossible to refer via JS to the objects located in different domains
View User's Profile View All Posts By User U2U Member
Post new thread

Related Links:
Product Page
Product Demonstrations Live Demos:
Multiple vertical scrolling
Horizontal scrolling
Free Download Free Download
Product Documentation Documentation:
Documenation Page
Change Log
Support Forum Technical Support
Support Forum
   

Go To Top


Powered by XMB 1.9.1 Nexus
Developed By Aventure Media & The XMB Group © 2002-2004