Jump to content

Chocolate570

Members
  • Posts

    1,550
  • Joined

  • Last visited

  • Days Won

    2

Posts posted by Chocolate570

  1. I am trying to set up a site, but I need to be able to pass large amounts of text. I am using newString() but I hit the limit I guess becuase it keeps telling me... "String or binary data would be truncated."Is there another way to do this?
    Yeah. Just use the substr function to break the string up into 1000character parts (or whatever) with a for loop and generate the variables, and then pass the variables on. :)
  2. Greetings all.I have need for a pop-up window with one of those widgets that shows a list on the left that allows you to add or remove selections to a list on the right. Same functionality as a mult-select scrolling list box, just a much better inteface for very long lists.I'm fairly new to JavaScript, and haven't been able to find any examples of what I'm talking about.The fact that I don't know the NAME of the type of widget I'm looking for doesn't help either.Still, I've seen these things everywhere, so there must be something out there so I don't have to reinvent the wheel.Do any of you know what this type of interface is called, or better yet, know where I might find some example code for this?Thanks!
    I can get you a code--but then do you want to be able to pass the information of the pop up to the parent window? :)
  3. Using aspnetguy's method of setting and getting the cookie created a cookie on my computer with the following settings:
    Name: Content: mycookie%3Dsomevalue%26Fri%20Dec%2015%202006%2008%3A29%3A24%20GMT-0800%20Host: Path: /C:/Documents%20and%20Settings/[My Username]/Desktop/Send For: Any type of connectionExpires: at end of session

    Maybe it's because the Name attribute is blank that we get the "undefined". Also, since the cookie expires at the end of the session, if I were to close my browser the cookie would automatically be deleted. We wouldn't be able to come back at another date to use the Cookie.get method.It might be more relevant to have data like the following:

    Name: [SomeGlobalCookieName]Content: mycookie=somevalue|mysecondcookie=someothervalue|userid=tlvCIEH64L0dwfxziTxHost: Path: /C:/Documents%20and%20Settings/[My Username]/Desktop/Send For: Any type of connectionExpires: Sunday, January 17, 2038 4:00:00 PM

    I forgot to unescape the cookie data. :)It still doesn't work though. :'(Any suggestions?
  4. It must be fun, we already have a space tours available..... to moon should be the next step.....
    I dunno. What would be the point of going to the moon? :/Unless disney managed to get a theme park up there! Can you imagine mickey wearing a space suit and a jet pack, fixing a blown gasket in zero gravity? :)
  5. Try thisdocument.write(--a);ordocument.write(++a); ++a will increment first. so it will work fine..but document.write(a++); will print the result and then increment.
    You can't use an operator in front of the number recieving the operation. :)Just set the a-- in another variable.x=53--;document.write(x);:)
  6. Hey guys,I've been working on a cookie object for the upcoming Zoodles toolkit.Unfortunately, I don't currently have the resources to test this properly.That's why I need you to do the following:1) Test this in as many browsers as you have2) Tell me if it works. If not, why not.3) Point out unnecessary code that I can remove. (it's currently around 70-80 lines of code, and it shouldn't be that long.)I've taken the liberty to comment as much as I can, so you can understand what the heck was going on in my mind when I wrote htis. :)Usage:This to set a cookie:Cookie.set(cookie name, cookie value);And to get a cookie;Cookie.get(cookie name, cookie expiration);This is how to use the expiration system:You have 5 keywords. Years, months, days, hours, and minutes.You have to use a number and then one of the keywords. (currently, it disregards the number. I need to figure out a way to implement that. :) For now, you can just do within the year, or within the month, or within the day, or within the hour, or within the minute.)For example.Cookie.get(username,"1 months");NOTE THE S on MONTHS.If the username cookie is older than 1 month, it'll return null, otherwise it'll return what the cookie contains.Thanks so much guys. Here's the code:

    <script type="text/javascript">//////////////////////////////////E-Z JavaScript Cookie Object////By Chocolate570 for Zoodles ////Made in 2006 || Version One ////////////////////////////////////Start cookie object.Cookie={  set:function(name,value) {    //The set function.    //Takes 2 variables, name and value.    if(name && value) {      date=Date().split("(")[0];      document.cookie=escape(name+"="+value+"&"+date);    } else {      return "Sorry, you have incorrectly used the cookie object.";    }  }  get:function(name,exp) {    //Name is the name of the variable.    //Exp is the expiration date in this format:    //X y    //Where X is a number and y is a date format. Available:    //Years, Months, Days, Hours, Minutes    y=Date();    cooSpl=document.cookie.split(";");    //*Loop through all of the cookie values.*//    for(i=0;i<cooSpl.length;i++) {      if(cooSpl[i].split("=")[0]==name) {        //*Why hello, we've found the correct cookie.*//        val=cooSpl[i].split("=")[1].split("&")[0];        date=cooSpl[i].split("=")[1].split("&")[1];        //*Just splitting apart the value and the date, held in their respective variables.*//        x=new Date(date);        years=(x.getFullYear()==y.getFullYear());        months=(x.getMonth()==y.getMonth());        days=(x.getDate()==y.getDate());        hours=(x.getHours()==y.getHours());        minutes=(x.getMinutes()==y.getMinutes());        //* The above are just used in the if statements to check on the date argument.*//        //* Start Date Switch Statement *//        switch(exp.split(" ")[1].toLowerCase()) {          case "years":	    if(years) {              return val;            }            return null;          break;          case "months":            if(years && months) {              return val;            }            return null;          break;          case "days":            if(years && months && days) {              return val;            }            return null;          break;          case "hours":            if(years && months && days && hours) {              return val;            }            return null;          break;          case "minutes":            if(years && months && days && hours && minutes) {              return val;            }            return null;          break;          default:            return null;          break;        }      }    }  }}</script>

    Thanks so much. :)Choco

  7. Hello all, can some body explain, how this code works/ (more on var x)thanks<script type="text/javascript">var xvar mycars = new Array()mycars[0] = "Saab"mycars[1] = "Volvo"mycars[2] = "BMW"for (x in mycars){document.write(mycars[x] + "<br />")}</script>
    Do you know how for loops work? The equivilant of that is this:<script type="text/javascript">mycars=new Array()mycars[0]="Saab"mycars[1]="Volvo"mycars[2]="BMW"for(x=0;x<mycars.length;x++) { document.write(mycars[x] + "<br />")}</script>The first loop (not mine, the one part of the W3S tutorial) is a simplified way to loop through the contents of an array and access them through array[var], where in this case, var is x. :)
  8. Hi,I just received a gift from my elder brother - his used iMac with OS 8. I'm still learning it. :) Mac users Please advise me, (if possible I don't want to use IExplorer on my iMac), :) Which one is the best browser in your experience for Mac OS 8? I will welcome all your comments so please don't hesitate.Thanks for your time.Dorothy
    Safari--hands down. Or you could use FireFox for Mac. :)
  9. And back to the subject -I want to build something that it will be capable to extend it in the future.However the base should remain the same,(I don't want to start and change the whole program),- What do you mean by advance word search in SQL?Another question, how much is the environment costing / licence I need from
    If you code neatly with any of the server side languages and make sure your database is structured well, you'll be able to update your site easily in the future. Also, it would be a good idea to use includes as much as possible. :)
  10. I'll PM you monday, I have some ideas on organizing this thing.
    Awesome. I'm starting a nice cookie object, and it's coming together well. It'll be accessed like this:Cookie.set("Name","expiration","value");And:Cookie.get("name");:)
  11. Jesh and Choco thanks for the ideasJesh I will definately use your code and give you credit :) and choco you can help :) I finished hte iframe contorl so it is easy to create read and write to an iframe.
    Awesome. :)Maybe you should set up a CVS? :blink:
  12. I know that this isn't really a question about this topic, but it is similar, so anyway, why can anything only travel up to a certain speed, I think it is called the universal speed limit, what is stopping it? I think the number is something times ten to the power of something. Or something very similar.
    Just to tell you, "something times ten to the power of something" is called scientific form. It is used for astronomical calculations and just basically big numbers. For example, if you have the number:500,240,524,525,852,085In scientific form, it would be:.500240524525852085 x 10^18:)Well, at the speed of light, mass doesn't exist, so that's basically the universal speed limit.
  13. Exactly :)
    1. Can I help? Please? :)2. getElementsByClassName();3. creIframeDoc();4. var pageHTML=ajax("http://www.w3schools.com","page");5. Cookie functions, like PHP's. $_COOKIE['cookie'] or whatever. That would be so awesome, along with setCookie.1) Please? :)2) Simple. Get all elements with that className.3) Cross-browser. It would have two arguments:creIframeDoc(name,url);If the name argument is given, it creates an iframe and returns the document of it. Basically, you can then use x=creIframeDoc(name).If both the name argument and the URL argument are given, then it'll go to that iframe, change the URL, and return the iframe document.4) ajax(url,elId) would retrieve the HTML of the page specified by the variable URL. If elId is supplied, then it'll return the innerHTML of that element on the page you specified in URL.5) Self explanatory. Those are the ones I'd use the most. :blink:
  14. Well considering the topic, which web language did you use to do that back in the 70s?
    I'd tell you, but I'm afraid you don't know enough to comprehend the awesomeness of it. I used telepathy. The server was in my mind, and the language was thought controlled. Like I said, google bought it, so I can't show it to you now. :)Okay, I think I've gone off-topic enough. :)
  15. Sorry for some reason I couldn't get it.I'll try again:<img src="C:\Documents and Settings\HP_Owner\My Documents\My Pictures\Lee's\dex_litho.gif"width="103" height="91">
    Also, are you using firefox? If so, you'll have to add a file:/// before the URL. :)
  16. Someone is touchy today :) j/k :) but seriously how much experience do you have with million dollar sites...incase you didn't catch my joke. I am very capable of writing a business plan :)
    One of these days, I'm going to ask you what a business plan is. But until then, I'm going to act all cool and say that I own a billion dollar site. Unfortunately, it was before any of you were born, and then google bought it, so I can't show it to you. Sorry. :blink::blink:
×
×
  • Create New...