Jump to content

Sniffy

Members
  • Posts

    403
  • Joined

  • Last visited

Posts posted by Sniffy

  1. I also have another problem as well. I want to add strings and text to the innerHTML of an IDHere's what I tried that didn't work.

    var myArray = new Array("Sam","Pete");document.getElementById("someID").innerHTML += "Posted By"+myArray[0];

    Is there an alternative method or am I just coding an error?

  2. Wait, I'm having another problem with my script.I want it to display the length as well when the button is clicked but it says undefined.

    <html><head><style type='text/css'>input#normalButton{background-color: #fff;border: 1px solid black;}</style><script type='text/javascript'>function bunny(){var theLength = document.getElementById("somePar").length;if(document.getElementById("normalButton").value == "Make Mr.Bunny Happy."){document.getElementById("normalButton").value = "Make Mr.Bunny EVIL.";document.getElementById("somePar").innerHTML = "Mr.Bunny went to the store.";document.getElementById("parLength").innerHTML = "There are "+theLength+" character's in the Mr.Bunny sentence.";}else{document.getElementById("normalButton").value = "Make Mr.Bunny Happy.";document.getElementById("somePar").innerHTML = "Mr.Bunny went to <b>######</b>.";document.getElementById("parLength").innerHTML = "There are "+theLength+" character's in the Mr.Bunny sentence.";}}</script></head><body><input type='button' id='normalButton' value='Make Mr.Bunny Happy.' onclick='bunny()'><br /><p>Click on the button to see what happens to Mr.Bunny.</p><p id='somePar'></p><p id='parLength'></p></body></html>

    How can I fix this?

  3. You can add a sound through action script as well.Import the sound to the library, right click, export for action script and give it a name.Put this in the frames panel.

    mySound = new Sound("Some Sound");mySound.start(0,99);

  4. Nevermind, I fixed it with this code.

    <html><head><style type='text/css'>input#cool{background-color: #fff;border: 1px solid black;}</style><script type='text/javascript'>function myFunction(){if(document.getElementById("cool").value == "Button"){document.getElementById("cool").value = "Another";}else{document.getElementById("cool").value = "Button";}}</script></head><body><input type='button' id='cool' value='Button' onclick='myFunction()'></body></html>

  5. I just got into DOM and I'm having problems with my first script. Can somebody fix this for me please?

    <html><head><style type='text/css'>input#cool{background-color: #fff;border: 1px solid black;}</style><script type='text/javascript'>function myFunction(){document.body.getElementByID("cool").value = "Another";}</script></head><body><input type='button' id='cool' value='Button' onclick='myFunction()'></body></html>

  6. According to the rules over at the ifsz, the design must be all yours ie. no help from others :)
    Oops, looks like a forgot. I guess I'll have to figure out on my own. Thanks for the reminder.EDIT: I put my thinking cap on and I fixed it myself anyways.
  7. I'm having some layout problems. I'm making a layout for the Invision Free Skin Zone 1st Web Hijinks and I'm having a little problem with my table layout. I have a navbar, and beside it, I want my content. But when I test the page, the div "content" is off the page instead of being next to the navbar. Specifics:There's my logo at the top, below it is the navbar, and then the content's off to the right past the logo, then below that are the credits. I took stuff out to try to make it work but I just can't get my layout straightened out.Code:

    <html><head><link rel='stylesheet' type='text/css' href='style.css'><title>Welcome to ChocoLovers Inc.</title></head><body><table cellspacing='0' cellpadding='0'><tr><td height='150' ><img src='images/site_logo.gif' height='150' width='1000'></td></tr><tr><td width='150'><div class='navbar'><a href='index.html'>Home</a><br /><a href='about.html'>About Us</a><br /><a href='history.html'>History</a><br /><a href='locateus.html'>Locate Us</a><br /><a href='servicesproducts.html'>Services & Products</a></div></td><td><div class='content'><div class='maintitle'>Welcome to Chocolovers Inc.</div><br />Welcome to Somecontent.</div></td></tr><tr><td><div class='credits'>Copyright Chocolovers Inc. 1956 - 2006 All Rights Reserved.</div></td></tr></table></body></html>

    It's probably a simple mistake but I'm the kind of person that misses things easily so may you please help?

  8. I worked on a Flash app once...I found that actionscript was a lot like javascript.
    Yeah, it is a lot like javascript. It's just it's mainly used to make games, and javascript is for browsers. The coding is quite alike, so that's why I know some of javascript and I only glanced through some of the tutorials.
  9. If you're going to use frames use iframes.Then create a table and put the iframes in the <td></td>Something like this
    <html><body bgcolor="#3c3c3c"><table width="100%" border="0" cellspacing="0" cellpadding="0" height="100%">  <tr>    <td height="150" width="150"> </td>    <td align="center" valign="top" height="150" width="100%"><img src="http://pixelkit.phpnet.us/images/site_logo.png"></td>  </tr>  <tr>    <td width="150px" height="100%"> <iframe src="http://pixelkit.phpnet.us/menu.html" width="150px" height="100%" scrolling="no" frameborder="0"></iframe></td>    <td height="100%"><iframe src="http://pixelkit.phpnet.us/index2.html" name="main" width="100%" height="100%" scrolling="auto" frameborder="0"></iframe></td>  </tr></table></body></html>

    Sorry for triple post, but it's actually coming better together kvn's code.I think I actually will start to use Iframes man, thanks.
  10. I got the actually frame design down, it's just now I'm having trouble with the layout.Here's my current code:

    <html><body bgcolor="#3c3c3c"><table width="100%" border="0" cellspacing="0" cellpadding="0" height="100%"> <tr>   <td height="150" width="150"> </td>   <td align="center" valign="top" height="150" width="100%"><img src="http://pixelkit.phpnet.us/images/site_logo.png"></td> </tr> <tr>   <td width="150px" height="100%"> <iframe src="http://pixelkit.phpnet.us/menu.html" width="150px" height="100%" scrolling="no" frameborder="0"></iframe></td>   <td height="100%"><iframe src="http://pixelkit.phpnet.us/index2.html" name="main" width="100%" height="100%" scrolling="auto" frameborder="0"></iframe></td> </tr></table></body></html>

×
×
  • Create New...