Jump to content

joecoolaug

Members
  • Posts

    95
  • Joined

  • Last visited

Posts posted by joecoolaug

  1. I've noticed recently a lot of people asking questions about things that are already in the tutorials (and that I've been posting a lot on this forum recently, sorry, I've gotten a little carried away giving my opinion). The reason for that, I believe, is that they have had bad experiences with other tutorials not giving detailed enough explainations. Some of it, I agree, is that people don't feel like looking for their answers and just ask us.I've noticed while browsing the javascript forums here a bunch of code I'd never seen from a people on various questions. I've read the javascript tutorial almost ten times, and I find myself totally lost in the complex code(from the people posting). One of the most outstanding things was the explaination of JS cookies. They barely explain anything, and I basically have to use the code that they give me because I don't know enough about it to change it to what I need it for.All I'm asking for is that someone from the W3schools staff will see this and do something about the more detailed explanation and adding some of that complex code I've been seeing :).Can anybody relate?

  2. Well I think that the best thing to add would be detailed explainations of every bit of code. I've noticed that some of the PHP tutorial pages and many others don't explain certain bits of code at all or not enough.

  3. That sounds like a nice idea. The only thing is that I doubt that they would ever do that because they get nearly all their revenue from ads, and if you could download the site or the individual pages, their traffic and therefore revenue would quickly drop. I know I would download it immediately.

  4. I like that idea very much.Well, I just thought of something. W3schools is only about web language tutorials. Maybe it could be a posting forum for articles on www languages. Ahh... I love stating the obvious. :)

  5. I'm not entirely sure what you want... but I've got a suggestion, and I'm not sure if it will work.To define the Background COLOR or IMAGE in javascript <script> tag

    \\This one will only work for background COLORSdocument.getElementById("divID").bgColor="#CCCCCC"\\I doubt that this next one will work, but you could try it.\\If it works, it will work for background IMAGESdocument.getElementById("divID").background="http://www.domain.com/image.png"

    To define the Background image in CSS <style> tag

    \\This SHOULD workdiv.style.backgroundImage.url()\\something like that

  6. I think I can help you.It's a little hard to explain it, but I'll try. Put the <script> in the <head> tag and the <img> wherever you want it to be on you document. All you have to do is change the imageURL1-10.png of the "if" and "else if" tags in the javascript to whatever your picture URLs are. Note that I'm using the simplest javascript in this so that you can look all this up on W3schools if you want to and that in this script that I wrote you can only have 10 images that are randomly selected. If you want to have more or fewer, just reply and someone else or I will give you the revised code.

    <html><head><script type="text/javascript">\\The script is started.var a=math.random()\\The variable for the random selection.\\I'm going to be making this for 10 pictures.\\If you want more or less, just reply so I can change it for you.if (a <= .1){document.getElementById("pleasedontchangeunlessyouchangealltheotheronestoo").src="imageURL1.png"}else if (a<=.2,>.1){document.getElementById("pleasedontchangeunlessyouchangealltheotheronestoo").src="imageURL2.png"}else if (a<=.3,>.2){document.getElementById("pleasedontchangeunlessyouchangealltheotheronestoo").src="imageURL3.png"}else if (a<=.4,>.3){document.getElementById("pleasedontchangeunlessyouchangealltheotheronestoo").src="imageURL4.png"}else if (a<=.5,>.4){document.getElementById("pleasedontchangeunlessyouchangealltheotheronestoo").src="imageURL5.png"}else if (a<=.6,>.5){document.getElementById("pleasedontchangeunlessyouchangealltheotheronestoo").src="imageURL6.png"}else if (a<=.7,>.6){document.getElementById("pleasedontchangeunlessyouchangealltheotheronestoo").src="imageURL7.png"}else if (a<=.8,>.7){document.getElementById("pleasedontchangeunlessyouchangealltheotheronestoo").src="imageURL8.png"}else if (a<=.9,>.8){document.getElementById("pleasedontchangeunlessyouchangealltheotheronestoo").src="imageURL9.png"}else if (a<=1,>.9){document.getElementById("pleasedontchangeunlessyouchangealltheotheronestoo").src="imageURL10.png"}</script></head><body><img src="thisURLdoesntmatter.cool" id="pleasedontchangeunlessyouchangealltheotheronestoo" /></body></html>

    I think you can figure out whatever I didn't explain. Reply if you need any help.Something else--the tenth image will have about 1/100,000,000 chance LESS than all the others of coming up. It's not nearly anything that any normal person visiting your webpage would ever even look for, let alone notice. I just thought it would be cool to let you know.

  7. I'm not entirely sure what you mean, but I could try to help you. I could help you more if you explain what you mean by "putting it inside."

    <script TYPE="text/javascript">document.write("<iframe src=http://www.bla.com>bla</iframe>")</script>

    That will write "<iframe src=http://www.blah.com></iframe>" to the document.

    <script TYPE="text/javascript">var a="<iframe src=http://www.bla.com>bla</iframe>"</script>

    That will create a variable with the value of the iframe tage you specified. I'm not sure if either of these will help you, and if they don't, please explain your question better.

×
×
  • Create New...