-
Posts
403 -
Joined
-
Last visited
Content Type
Profiles
Forums
Events
Posts posted by Sniffy
-
-
But tot just put as a stand alone, and not an on click function, will that work? Or would i have to put it in an onload?
-
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?
-
-
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?
-
Do you mean like this?
onEnterFrame = function(){someMovieClip._alpha-1;}
Or inside a movie clip
onClipEvent(enterFrame){this._alpha-1;
-
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);
-
Just something a little more. You can choose it's target as well.
on(release){getURL("http://whatever.com", "_blank");}
-
Or an alternative way,Put this inside your button.
on(press){startDrag("");}on(release){stopDrag();}
I do prefer the way you used, smiles, though.
-
Thanks for the advice.I had to look at a lot of online examples of the getElementById() to notify that it wasn't part of the body.
-
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>
-
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>
-
Nope it's fine, I just had to move it to the footer as a seperate banner.
-
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.According to the rules over at the ifsz, the design must be all yours ie. no help from others -
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?
-
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.I worked on a Flash app once...I found that actionscript was a lot like javascript. -
Yeah, the posts that are lost are from like July 15, but I guess it could've been worse.
-
I've noticed in some of the threads I posted, some of the posts are missing. I noticed a post missing by Little Goat first, then more and more. Are some of the posts not restored?
-
I prefer actionscript because it's simple to learn, and very visual.Although I do like php,html and css.
-
I was worried there for a moment.
-
I need some affiliates to put on my site because it looks kind of bland. I'll be happy to put yours on.
-
And alternate sythax instead of braces?I'm surprised. Oh well, I'm sticking to the original one for now, don't want to confuse myself.
-
I guess I was wrong then.
-
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.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>
-
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>
help with photo gallery
in HTML/XHTML
Posted
I'd say you can either put the bigger image in a frame, and add anchors to the thumbnails to target the frame, or use javascript, the easier more organized method.