-4

Salutations! fellow developers, I am kind of stuck in a pickle here. I managed to create a HTML5 animated banner for my blog. After the exported content I received these two files:

i) banner.html --> I can change the name of this to whatever I want and functions perfectly.

ii) sprite.js --> When I change the files name, location and content. The "banner.html" automatically stops to functioning/working.

Is there a possible way that I can just have the "banner.html" file to function properly with my content without the "sprite.js".

-If yes, please share your solution.

-If no, please explain alternative working solution that you deem necessary.

  • Thanks to anyone who had answered.

-LEO

Le'o
  • 3
  • 2
  • 2
    What? +1? It is impossible to guess what is the problem here and the question received an upvote. Something is surely wrong here... – Salvador Dali Nov 24 '13 at 11:29
  • How is this not a good question? Why would you criticize someone if he seeks help, that is just wrong. May God Help People Like You to The Right Path. – Le'o Nov 24 '13 at 11:39
  • @user3027084: You should post what you've tried so far and show some code/HTML about what is it that you haven't been able to figure out and where it fails. Otherwise it's really hard to say what is happening in your case. See http://tinyurl.com/so-hints – t0mppa Nov 24 '13 at 11:51
  • @t0mppa the user "parnas" understood the question easily, and offered a very good solution, God bless him/her. I still don't get whats the big commotion about, I think it's mediocre to waste time on such mindless discriminative behavior and takes up all the good research time. Although, I do thank you for advice. – Le'o Nov 24 '13 at 12:00
  • @user3027084 On questions regarding *"problems with code"*, a minimal code example showing the problem, a description of what happens and what you expect to happen is required. Furthermore, a minimal understanding of the problem is required. In this case, the code example was here, but more importantly you seem to be missing essential knowledge to understand what you are doing. Glad you have your answer though. – Sumurai8 Nov 24 '13 at 12:29

2 Answers2

1

You can include scripts directly into HTML documents with the SCRIPT tag:

Substitute

<script src="sprite.js"></script>

(which has to be somewhere inside the HEAD tag of your document) with

<script>
    <!--

    //contents of sprite.js go here

    //-->
</script>
elaforma
  • 652
  • 1
  • 9
  • 29
0

Open your banner.html in a text editor. There should be a line line

<script src="sprite.js"></script>

Replace it with

<script>SOURCE_OF_SPRITE.JS</script>

Of course "SOURCE_OF_SPRITE.JS" should be the actual source.

parnas
  • 721
  • 5
  • 14
  • Thank you, I think your solution is very promising. I will give it a try. – Le'o Nov 24 '13 at 11:40
  • It worked perfectly, now I just need to set this up on some server and apply your method. – Le'o Nov 24 '13 at 11:56
  • I uploaded onto the server, the test run was successful. Congratulations, the content is function fine. – Le'o Nov 24 '13 at 12:15