Question:
According to the following website, how would you reference an URL to the following HTML codes?
pikachu1234
2010-12-19 02:32:07 UTC
Apparently, I'm trying to add the falling snow to my HTML codes for one of my blog, but the site for the falling snow code is telling me to "Be sure variable "snowsrc" in the above code correctly references the full URL path to the image used. Enjoy!"

The website for the falling snow theme I'm using is: http://www.dynamicdrive.com/dynamicindex3/snow.htm

So what I did was I save a gif image of the snowflake I wanted as indicated in step 1 in my desktop. But, how do I identify the URL path to it and how do I proceed from there? The instructions aren't very clear.

Thanks in advance for the guidance!
Four answers:
anonymous
2010-12-20 01:41:43 UTC
The full URL does not need to be used. For instance, if the file using the falling snow and the images being used are BOTH in the same folder, then just use:



var snowsrc="snow.gif"



If the file is in one folder and the images are in a folder called "images", then:



var snowsrc="images/snow.gif"



If you plan to use snow on all pages (not recommended), then it might be better to use the full URL unless you know how to set up the relative paths for all pages. Full URL example:



var snowsrc="http://domain_name.com/images/snow.gif"



Ron
joachim h
2010-12-22 20:53:06 UTC
So Javascript has raised its ugly head again I see! When you use these sites there is a general assumption that you know a little about Javascript but is not always the case, if you do n ot mind me saying so? I will talk you through the bits that you can change and what it all means.



//Configure below to change URL path to the snow image

var snowsrc="snow.gif"

// Configure below to change number of snow to render

var no = 10;

// Configure whether snow should disappear after x seconds (0=never):

var hidesnowtime = 0;

// Configure how much snow should drop down before fading ("windowheight" or "pageheight")

var snowdistance = "pageheight";



The first line begins with //....programmers use this to insert notes regarding their coding in order to help them to remember what they are doing. In this case the programmer has left notes for you.

var stands for variable in JS and it can looked upon like a box and the name of the box is snowsrc.In the first var, (box) you have the name and path of your snowflake, in this case snow.gif. So, if you save the gif of the snowflake and upload it to your site into your image folder for example, then you will need to change the path of the gif to "images/snow.gif" in the javascript itself. The variable will now read

var snowsrc="images/snow.gif" and that is all he is asking you to do. You can also change the values of the other variables to change the look to the whole thing. So here is a recap..

1 Copy the snow and upload to your site.

2. Copy and paste the JS code into the the body of your page, that is anywhere between and .

If you have uploaded the image to a folder then you will need to change the JS code as shown..if you have just uploaded up to your site then you shouldn't need to change anything.

Upload your page with the JS in it and view it in your browser and bingo! it should all work.



Hope it goes ok..Merry Xmas!
Ron P
2010-12-19 02:47:10 UTC
You must upload the image to the server that your webpage is hosted on. If you upload to the same folder that the page is on then you dont have to change anything. If you dont know what the path is then after you upload to server right click the image and properitys this will show you the path. You can also use there image by useing



http://www.dynamicdrive.com/dynamicindex3/snow.gif
fairweather
2016-10-20 04:08:44 UTC
the thank you to place HTML code in a textarea or scroll container so it relatively is copied/pasted: you may deactivate the HTML code by ability of making it look as text textile in whichever container you utilize. The code I tutor decrease than WILL paintings because it relatively is been examined. To have energetic code to be clickable interior the scroll container, you need to use a div type scroll container and not one using the "textarea" tags. exchange each and all the hollow tag symbols, "<", to the character entity, & lt ; (without areas) as & lt ; (without areas) = <. this could deactivate the HTML code interior the textarea/scroll container, yet enable shoppers viewing the web site to repeat/paste the code. occasion: