Jump to content
xisto Community

Deretto

Members
  • Content Count

    130
  • Joined

  • Last visited

Everything posted by Deretto

  1. Ok, so I tried running it off my host and I'm still having problems. The cookie is being made and the value of the cookie is being stored properly but its not being read correctly on page load. I tried some more things though. On the cookie guide that was linked in the first reply, when readCookie was used there was no semicolon. It just says var x = readCookie('ppkcookie1') So I tried no semicolon and that didn't work. Seemed dumb to me but figured I'd give it a shot. I then tried changing the way index gets its integer. //var index=0; original initiation.var index;function checkCookie(){ if (readCookie('page')!=NULL) { index = readCookie('page') document.getElementById('my_image_container').setAttribute('src', images[index]); document.getElementById('my_text_container').innerHTML = story[index]; } else {//added index=0 here index=0; createCookie('page',index,365); }}window.onload=checkCookie; When I did that my next button would no longer work. So I can assume that something is going terribly wrong when reading the cookie.
  2. Well that was a dumb typo *head desks* Ok so my navigating buttons/functions are working again. Course now the cookie doesn't seem to be working as planned. I was originally hoping that in the case of: if (readCookie('page')) That it'd return null when the page is visited for the first time. Course I was thinking that null is the same as FALSE. Just to make sure though I changed the if statement to: if (readCookie('page')!=NULL) That didn't seem to help either. Quick question, I'm currently just running the html off my hard disk. Does the web page have to actually be online in order for the cookie to be made?
  3. Well, I tried it out and sadly I didn't get too far. After adding all the cookie code my functions will no longer execute. I can't really see any syntax errors or anything like that. Here's what I did. fuction checkCookie(){ if (readCookie('page')) { index = readCookie('page'); document.getElementById('my_image_container').setAttribute('src', images[index]); document.getElementById('my_text_container').innerHTML = story[index]; } else { createCookie('page',index,365); }}window.onload=checkCookie;function createCookie(name,value,days) { if (days) { var date = new Date(); date.setTime(date.getTime()+(days*24*60*60*1000)); var expires = "; expires="+date.toGMTString(); } else var expires = ""; document.cookie = name+"="+value+expires+"; path=/";}function readCookie(name) { var nameEQ = name + "="; var ca = document.cookie.split(';'); for(var i=0;i < ca.length;i++) { var c = ca[i]; while (c.charAt(0)==' ') c = c.substring(1,c.length); if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length); } return null;}function nextImage(){ ++index; if (index < images.length) { document.getElementById('my_image_container').setAttribute('src', images[index]); document.getElementById('my_text_container').innerHTML = story[index]; createCookie('page',index,365); } else { index = (images.length - 1); nextImage(); }}
  4. I'm helping my friend make a website for his webcomic. Currently, the pages of his comic are set to change by buttons that pro/regress through an array. What he's asking me to do is make a cookie so that it remembers the last page the person viewed. That way when the visitor returns they'll be viewing the last page they saw. Here is an example of the javascript used for the website. var images = ["images/001.jpg", "images/002.jpg"];var story = new Array();story[0] = "blah";story[1] = "more blah";var index = 0;function nextImage(){ ++index; if (index < images.length) { document.getElementById('my_image_container').setAttribute('src', images[index]); document.getElementById('my_text_container').innerHTML = story[index]; } else { index = (images.length - 1); nextImage(); }}Similar functions exist for Previous, First, and Last Please teach me how to use cookies properly. >.<;
  5. Ok, I got that to work. Code ended up looking like this function nextImage() { ++index; if (index < images.length) { document.getElementById("my_image_container").setAttribute("src", images[index]); } else { index = (images.length - 1); nextImage(); } }function previousImage() { --index; if (index > -1) { document.getElementById("my_image_container").setAttribute("src", images[index]); } else { index = 1; previousImage(); } }function firstImage() { index = 0; document.getElementById("my_image_container").setAttribute("src", images[index]); }function lastImage() { index = (images.length - 1); document.getElementById("my_image_container").setAttribute("src", images[index]); } But now I've run into another problem. I'm trying to make Text on the page change along with the image (the text goes along with the image.) I've tried using the above code and I couldn't figure it out. If I can use external text files then great! If not then I don't mind using an array of strings either. Just if someone could help me with this too. >.<;;;
  6. Ugh, for some reason my new topic won't show up -.-

    1. Show previous comments  1 more
    2. deadmad7

      deadmad7

      maybe you didn't click the post button...

    3. Baniboy

      Baniboy

      ... and maybe it was deleted

    4. anwiii

      anwiii

      maybe you just dreampt about posting and didn't actually post anything

  7. So basically I'm making a website for my friend to host his webcomic on. I've got the layout done already as I'm knowledgeable in HTLM and CSS but not javascript. What I need is a simple code that'll change the image on the page with First, Previous, Next, and Last buttons. I don't know how long this webcomic will go on for so I'd rather use a simple code to change the image rather then make a whole page for every update. With that said, a function that takes in the visitors last viewed image so that when they revist the site the see that same image would be nice. I've tried googling this and the best I can come across or scripts for slideshows which require a lot of preloading. I don't understand javascript much but I want to learn! So if the person that posts the codes can kindly explain it to me it'd be much appreciated.
  8. I'm definitely looking forward to this. I've been a die hard Pokemon fan since the original release. I'm not too obsessed about collecting them all. For the most part I just enjoy using my favorites. Really I'd just like to see a 5th generation already, or even better something with real time. That'd be cool. I just like the designs they make for them. I remember I hated the majority of the 4th gen at first glance. I soon found myself attached to Luxray and eventually the others became accepted. x3 Pokemon for life <3
  9. I prefer turn based strategies. I have to say I enjoy games such as Fire Emblem a lot more then games like Age of Empires or Starcraft. Something about having to gathering resources really REALLY bores me. Then there's rushing and all kinds of other weird rules. Turn based strategies is like another game of chess. I of course love chess so that'd explain why I really like these games.
  10. Nice job. Thanks for this info. I personally hate using proxies cause they don't always load everything and then you get pop up etc. etc. This will help avoid that stress. Thanks again!
  11. Holy crap that wasn't pleasant to look at.... Is it even still alive at this point?
  12. Secondhand lands just came out recently. That game is filled with nothing but anthropomorphic creatures and some feral ones that you can play as. It kinda plays like Runescape, not really my style. But playing as a feral wolf was rather neat.
  13. I was never really a big Halo fan, but if this is isn't going to include Mr. Mary Sue then I might give it a nice peak. I just hope the story is decent as well and that there's no lame cliffhanger without an end boss at the end. ;
  14. Trolls, stop wasting your life trying to make other people miserable online. I just don't see the point of it. The fact that most see it as a sport is sickening.Really guys, stop the hate. D:
  15. One important thing I look at when playing an MMO is the combat system. Two things I cannot stand: Standing in place and exchanging blows while casting instants whenever possible, and jumping around like a maniac spamming your strongest skill while also spamming your potions. Make sure to make your combat system to require at least some though. Even if that thought is a simple rock/paper/scissors. It's still something. Also along with allowing people to have unique avatars I'd say allow for some unique skills as well. By that I mean allow the user to have the option when he upgrades his skill to increase range, damage, or loading time, or some combinations with lesser value. It's nice to see every character customized. Well, good luck to you. <3
  16. I'm going to be making a website and forum for a guild in an MMO that I play. One thing they want is a new forum. They've been having a bad experience with their current one in Invisionfree. They say some of the members there have been getting viruses from it. So I wanted to ask what would be a good forum to use? I don't mind paying a little if it's of good quality. I'm looking for something that's easily customizable (I won't be doing that myself though. More then likely I'll take it from forums where people post how to do certain customizations.)Also! If someone was working on a website for a guild your in, what kind of content would you like to see on there? Yes I've asked what my guildies want but I want to hear some general opinions as well.
  17. Actually from what I can read Xisto doesn't check into users sites until a complaint is made. I read in one of the many rule pages posted that they don't take accountability for what's being hosted, and they'll take action if it's illegal. Course there's no porn on the forums and obviously not imagefilez. Course I'm not hosting any of my art here. I just wanted to clear up that the terminology that people use is often offensive.Thanks for your time. <3
  18. OK, I know I'm supposed to get over 4 credits and wait about an hour for a script to bring my account back. Well I've had over 4 credits for about over 4 days now. I assume this might have something to do with the myCENT change. Can someone help me out here?
  19. OK... you wanted a example. I gave you ONE example. Don't go trying to turn it into something else and put words into mouth of everyone who wants to have a same-sex marriage.That's what they call a cheap shot. ; A rather low and despicable one too. Lemme guess, you're going to ask me for another example now. Right?
  20. You seem to like pointing out my implications yet you failed to point out that my implied answer was no. Homosexuals aren't trying to go around changing peoples faith. For the reason I stated above as far as benefits which will be further explained below. Obviously homosexuals can't give birth to their own children, but a lot of homosexuals do wish to adopt or have a child to claim in some form. See, if you're not married, then only one of the partners can get the exemption instead of both. I don't know about you but that's a good amount of money being saved. I'm talking about the middle class here. Obviously if you're making a lot of money you don't want to file as married.
  21. You need a bank account. You have to know your account number and your routing number. Since you need to have a routing number of sorts a prepaid debit card would obviously not work.
  22. Thanks for the info. I'm glad myCENTs doesn't get reduced daily. I ended up going negative because I didn't have time to post before going on a long vacation. That really sucked. I'm sure this will be much better then the credit system. That's not just because of this mentioned fact either. *winks*
  23. I think you should change the topic from best member to "Who are the awesome members of Trap 17." Seriously, a lot of people deserve credit. Making a list of your bests can be hurtful to others for not being on it. T-TAs for me I don't have a list or a favorite member. I'm not around enough.
  24. Well it's certain that you obviously like her. I would say that she likes you as well. I say this because some of the things you've described match some things I did with a crush I had a month ago.Go ask her out. I don't see the harm. Don't expect a full blown thing out of it. Remember that going out does not involve commitment. Most people forget that. It's meant for the two of you to get to know each other even better!Good luck to you.
  25. This is true, but I have strong belief that that both groups will side with Obama. I'm not just saying this because the house and senate are mostly democrat. I honestly believe that everyone believes in the plans Obama will come up with. Heck, look at what he was trying to get Bush to do for the automobile industry. He's not waiting two months to get started. He's jumped along in the backseat already. I think he's already off to a great start.Yeah, there may be some pressure, but I'm sure he likes it that way. I mean, look how much he got the entire US pumped up!
×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.