Jump to content

Sniffy

Members
  • Posts

    403
  • Joined

  • Last visited

Everything posted by Sniffy

  1. Yeah, I didn't think he was wrong, but I didn't know how to fix it either. I guess you are quite knowledgable of flash.
  2. Sniffy

    combine arrays

    I'd never be able to figure that out. It just shows that I'm a PHP newbie and there's nothing I can do about it. Good Job.
  3. Sniffy

    setcookie problem

    Oh, stupid me.Thanks, a lot, if there's any problems I'll tell you.
  4. Sniffy

    setcookie problem

    What, could explain it more thouroughly to me and maybe give me an example code?I need a way to set a cookie through POST data, so is there an alternative way?
  5. Wait nevermind, I fixed the addAdmin function, but can somebody answer my other problem?
  6. Of course not, we're discussing parent directories.
  7. Sniffy

    setcookie problem

    On my site, I'm going to make a log in system, but right now you just set a cookie when you log in, but I'm causing errors. Can you help me?Here is my site.http://bobville.9999mb.com/test.phpbobville is the password to the log in.Here's the code for test.php <html><head><link rel='stylesheet' type='text/css' href='style.css'><title>!!Bobville Online!!</title><script type='text/javascript'>function addAdmin(adName){document.getElementById("update").innerHTML += "Posted By "+adName+".";}function sigWeek(theSig){document.getElementById("sigDisplay").src ="images/sotw/"+theSig+".gif";}</script></head><body onload='addAdmin("Jud")'><object width='980' height='150'><param name='banner'><embed src='banner.swf' width='980' height='150'></embed></object><br /><table cellspacing ='0'><tr><td width='210'><?phpinclude("menu.php");?></td><td width='580'><table cellspacing='0'><tr><td width='140'><input type='button' id='normalButton' value='SOTW #1' name='SOTW1' onclick='sigWeek(1)'><br /><input type='button' id='normalButton' value='SOTW #2' name='SOTW2' onclick='sigWeek(2)'><br /><input type='button' id='normalButton' value='SOTW #3' name='SOTW3' onclick='sigWeek(3)'><br /></td><td width='300'><img src='images/sotw/1.gif' id='sigDisplay' width='300' height='100'></td><td width='140'><input type='button' id='normalButton' value='SOTW #4' name='SOTW4' onclick='sigWeek(4)'><br /><input type='button' id='normalButton' value='SOTW #5' name='SOTW5' onclick='sigWeek(5)'><br /><input type='button' id='normalButton' value='SOTW #6' name='SOTW6' onclick='sigWeek(6)'><br /></td></tr></table><br /><div class='maintitle' align='center'><div class='valign'>Update #1</div></div><br /><p id='update'>Hello, and welcome to the Bobville Homepage.<br />Currently, it's still under construction and we need some time to build it.<br />Check back later.<br /></p></td><td width='210'><?php if(isset($_COOKIE['user'])){echo "Welcome back,".$_COOKIE['user']."<br /><div class='menu'><a href='accountinfo.php'>Account Info</a><br /><a href='updateprofile.php'>Update Profile</a></div><br />";}else{echo "<form method='post' action='login.php'>Username:<br /><input type='text' id='uname' name='uname' value='uname'><br />Password:<br /><input type='password' id='pword' name='pword' value='pword'><br /><input type='submit' id='normalButton' onSubmit='checkForm()' value='Log in'>";}?></form></td></tr></table></body></html> And here is the code for login.php which the form directs to. <html><head><link rel='stylesheet' type='text/css' href='style.css'><title>!!Bobville Online!!</title><script type='text/javascript'>function addAdmin(adName){document.getElementById("update").innerHTML += "Posted By "+adName+".";}function sigWeek(theSig){document.getElementById("sigDisplay").src ="images/sotw/"+theSig+".gif";}</script></head><body><object width='980' height='150'><param name='banner'><embed src='banner.swf' width='980' height='150'></embed></object><br /><table cellspacing ='0'><tr><td width='210'><?phpinclude("menu.php");?></td><td width='580'><table cellspacing='0'><tr><td width='140'><input type='button' id='normalButton' value='SOTW #1' name='SOTW1' onclick='sigWeek(1)'><br /><input type='button' id='normalButton' value='SOTW #2' name='SOTW2' onclick='sigWeek(2)'><br /><input type='button' id='normalButton' value='SOTW #3' name='SOTW3' onclick='sigWeek(3)'><br /></td><td width='300'><img src='images/sotw/1.gif' id='sigDisplay' width='300' height='100'></td><td width='140'><input type='button' id='normalButton' value='SOTW #4' name='SOTW4' onclick='sigWeek(4)'><br /><input type='button' id='normalButton' value='SOTW #5' name='SOTW5' onclick='sigWeek(5)'><br /><input type='button' id='normalButton' value='SOTW #6' name='SOTW6' onclick='sigWeek(6)'><br /></td></tr></table><br /><div class='maintitle' align='center'><div class='valign'>Logging In</div></div><br /><p id='update'><?php$uname = $_POST['uname'];$pword = $_POST['pword'];if(isset($_COOKIE['user']) && $pword == "bobville"){echo "You are already logging in.<br /><a href='index.php'>Return to the Main Page</a>";}else if($pword == "bobville" && !isset($_COOKIE['user'])){setcookie("user", $uname, time()+360000);}else{echo "Your password is incorrect, please try again.";}?></p></td><td width='210'><?php if(isset($_COOKIE['user'])){echo "Welcome back,".$_COOKIE['user']."<br /><div class='menu'><a href='accountinfo.php'>Account Info</a><br /><a href='updateprofile.php'>Update Profile</a></div><br />";}?></form></td></tr></table></body></html> And here is the error that displays on my login.php if you get the correct password and set the cookie. Warning: Cannot modify header information - headers already sent by (output started at /www/9999mb.com/b/o/b/bobville/htdocs/login.php:7) in /www/9999mb.com/b/o/b/bobville/htdocs/login.php on line 60 What is this problem and how do I fix this?
  8. I was wondering how I could access a file in a parent directory in an html anchor?Or for instance, say my stylesheet is in the parent directory and I'm in sub-directory "users", what code would I use to access it?
  9. 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.
  10. 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?
  11. 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?
  12. Sniffy

    Css Menus

    Do you mean like a PHP include? <?phpinclude("somefile.php");?>
  13. 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?
  14. Do you mean like this? onEnterFrame = function(){someMovieClip._alpha-1;} Or inside a movie clip onClipEvent(enterFrame){this._alpha-1;
  15. Sniffy

    Music Attachment

    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);
  16. Just something a little more. You can choose it's target as well. on(release){getURL("http://whatever.com", "_blank");}
  17. Or an alternative way,Put this inside your button. on(press){startDrag("");}on(release){stopDrag();} I do prefer the way you used, smiles, though.
  18. 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.
  19. 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>
  20. 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>
  21. Nope it's fine, I just had to move it to the footer as a seperate banner.
  22. 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.
  23. 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?
  24. 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.
×
×
  • Create New...