JohnMac328
asked on
TopUp - Javascript
I am trying to get TopUp to work with a local path. When I use
<script type="text/javascript" src="http://gettopup.com/releases/latest/top_up-min.js"></script>
it works fine but when I try <script type="text/javascript" src="js/top_up-min.js"></s cript> it does not. I have included the complete code that is from the http://gettopup.com site.
Any help is appreciated
<script type="text/javascript" src="http://gettopup.com/releases/latest/top_up-min.js"></script>
it works fine but when I try <script type="text/javascript" src="js/top_up-min.js"></s
Any help is appreciated
<script type="text/javascript" src="http://gettopup.com/releases/latest/top_up-min.js"></script>
<script type="text/javascript">
TopUp.host = "http://localhost/";
TopUp.images_path = "images/top_up/";
</script>
<script type="text/javascript">
TopUp.host = "http://localhost/";
TopUp.players_path = "images/players/";
</script> --->
ASKER CERTIFIED SOLUTION
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
I need to see some code on a real website.
ASKER
That's what I would like, an example of a local path working.
<script type="text/javascript" src="<root_folder>/js/top_ up-min.js" ></script>
works fine to me
<root_folder> is the root folder that contains ur website
works fine to me
<root_folder> is the root folder that contains ur website
<script type="text/javascript" src="./js/top_up-min.js">< /script>
This may also work fine
This may also work fine
ASKER
Here is the path
<script type="text/javascript" src="Intranet_Pop_Up_Test/ js/top_up- min.js"></ script>
Still does not work, could you post your example so I can see what I am missing?
<script type="text/javascript" src="Intranet_Pop_Up_Test/
Still does not work, could you post your example so I can see what I am missing?
ASKER
This also did not work
<script type="text/javascript" src="http://localhost/Intranet_Pop_Up_Test/js/top_up-min.js"></script>
<script type="text/javascript" src="http://localhost/Intranet_Pop_Up_Test/js/top_up-min.js"></script>
Please forget localhost.
If you load the page and the javascript and images are on a relative (images/) or absolute (/images) path on the same server, you do NOT need the host
If you load the page and the javascript and images are on a relative (images/) or absolute (/images) path on the same server, you do NOT need the host
ASKER
No change - here is the folder structure - the images and js
Example.jpg
Example.jpg
did u tried in the second way i given
ASKER
Yes
try this also
src="~/js/top_up-min.js"
src="~/js/top_up-min.js"
ASKER
No - the paths are correct. I wish his example would have been setup as a local like all the others. Who wants to link to a site that will go down some day.
r u sure that this file is in this folder?
ASKER
Checked several times - copied and recopied them over and over. I had no problem with shadowbox as far as paths etc. It just looks like crap.
so where is this html file
ASKER
It is in the root of the image I sent
ASKER
I may try it at home, something is not right.
are u using an IDE
ASKER
Not sure what you mean
what is the server language u are using
Does that matter at all???
Just uploaded the unzipped file to my server. All works as expected.
Just uploaded the unzipped file to my server. All works as expected.
ok r u using an ide like dreamviewer or visual studio or something like that
ASKER
Using Dreamweaver - Looking for another place to test it since I was not able to at home.
in dreamweiver if u "src=" and press Ctrl+Space then u can browse for the file and it will make the relative path for u.
ASKER
I tried it just for the heck of it but it is the same path. My paths are correct, something is preventing it - I have many other *.js files in the js folder, could be a conflict.
SOLUTION
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
ASKER
Does not give an error, just opens the link in a new page instead of the popup window. I am opening a link not an image.
Sorry I am out of solutions now
To proceed i need some screen shots of the site if u can
To proceed i need some screen shots of the site if u can
ASKER
Let me test it on another machine to see if I get the same result.
ASKER
For some reason remaning js to javascript made the difference. I know, makes no sense.
<script type="text/javascript" src="javascript/top_up-min .js"></scr ipt>
<script type="text/javascript" src="javascript/top_up-min
ASKER
<script type="text/javascript">
TopUp.images_path = "images/top_up/";
TopUp.players_path = "images/players/";
</script>
at first, I added it to try and get it working. His example that is downloaded has the link going to his site, there is no working example of a local path.