Jump to content

jesh

Members
  • Posts

    2,293
  • Joined

  • Last visited

Everything posted by jesh

  1. Check out the replace method of the javascript String object:http://www.w3schools.com/jsref/jsref_replace.asp var test = "This is a test.";test = test.replace(/\s/g, ".");// test will equal "This.is.a.test.";
  2. With javascript it almost is. You can try something like this.HTML: <textarea id="tarea" cols="35" rows="20" onkeyup="checkMax(this)"></textarea> java script: var MAX = 100000;var length; function checkMax(obj){ length = obj.value.length; if(length > MAX) { obj.value = obj.value.substr(0,MAX); }}
  3. If your users are already on the page, can you simply redirect them to the error page if there is no record in the database and then do nothing (i.e. keep them on the page) if there is?Something like this: set rs = conn.execute("SELECT vlini FROM table WHERE username ='" & login & "'")if rs.eof then response.redirect "http://web/myErrorpage.asp"end if
  4. I think in 90% of cases, taking a number out to the nearest billionth is overkill. If you round to a more reasonable number - say 111408.77846 - then both scripting languages would/should match.
  5. Like the previous two posters said, it needs to be document.getElementById(). Your original code had "ID" rather than "Id". Watch out for that.
  6. Yes, you use the HTML DOM.HTML: <input type="checkbox" id="cb1" /> java script: var mycb = document.getElementById("cb1").value;
  7. I don't know much about WML, but in HTML, if you specify utf-8 as your charset in the page, the letters will automatically be displayed left-to-right.However, this might also help: http://www.w3schools.com/css/pr_text_direction.asp
  8. jesh

    php interim solutions

    I haven't used PHP in awhile, so I'm a bit rusty. I believe, however, that $_SERVER["PHP_SELF"] will return your page's file name.And, PHP allows switches to work off of strings: http://www.php.net/switch
  9. Check out pathinfo().http://www.php.net/pathinfo
  10. jesh

    Source Safe

    Thanks, I'll look into that. The only other requirement that I neglected to mention in my original post is that I would like this source control software to integrate with Visual Studio 2005.
  11. jesh

    Source Safe

    We have been using Source Safe at my work for our version control. Has anyone here used Source Safe in the past (or currently) but would recommend a different version control system?
  12. Check out the TextStream reference - specifically the step entitled "Read all lines from a textfile". It'll show you how you can read each line of a text file, one line at a time. Once you have each individual line, you can insert them, one at a time, into your database.
  13. It's part of the HTML DOM. Check it out here:http://www.w3schools.com/htmldom/met_win_open.asp
  14. The human race is currently doomed to destroy itself because of the dominant culture, not because of any inherent flaw in human beings. If nobody here can understand that, I'd be happy to recommend some books you can read.
  15. The reason you would want to put javascript and css in an external file is because the user would only have to download the file a single time. Each subsequent visit to the page would load that external file from the browser's cache - just like images.When you are making a site that isn't expected to receive a lot of hits, an extra 10KB of css markup doesn't make much of a difference. But when you are working on a site that gets 100,000+ hits a day, that 10KB extra turns into roughly a GB of extraneous traffic each day.
  16. jesh

    php interim solutions

    If I understand you correctly, you intend on having some variables about your pages stored in the database. These may include the page title, a previous and next page reference, etc. My only suggestion would be rather than storing, for example, "6" on your page, perhaps you could derive the id from the name of the file itself.You could include code on your page that checks to see what the name of the file is (by looking at the URL), and then look up your data in the database based on that information. This way, if you move pages around in your site, you won't have to worry about changing that "6" into a "10", you can simply change the values for that record in your database. Also, you wouldn't have to look at the database to decide if the next page you add to the site needs to have a number "15" or a "16" assigned to it. You just add a record to your table with the file's name as the key.I hope this makes sense.
  17. jesh

    Crosswords

    Another thing you might watch out for is where your line breaks occur in the HTML. I don't fully understand this but I have experienced differences in display between the following two chunks of code: <td><img src="theimage.gif" /></td> and <td> <img src="theimage.gif" /></td> Both should display the same, but, because of that extra white space, the table cells never seem to line up correctly. I have moved away from table-based design, so I haven't experienced this recently, but I distinctly remember it being a problem.
  18. It appears that my definition of "our culture" in this conversation is different from your definition. I am speaking about two distinct meta-cultures. "Our culture", to me, is the culture from which almost all modern cultures have derived. It is the culture of those who believe that they own and/or have control over the environment. Those that believe the world belongs to them. Since you appear to be a religious person, it is the culture of Cain. Cain, who shaped the world to his liking and offered up to god the sacrifice of grain. The other meta-culture is that of those who recognize that they are dependent upon and part of the environment. Those that believe that they belong to the world. The culture of Abel, whom god selected because of his offer of sacrifice of a lamb.Because the members of the latter culture are not affecting the problems that we are experiencing, they, the humans, cannot be held responsible for this. Because the members of "our culture" are affecting these problems, they ought to be held responsible. Therefore, it is not a "human" problem. It is a cultural one.
  19. Well, then you also can't blame humans, because there are humans that are not members of our culture who do not cause any of these problems. Therefore, it's not a human problem. It's not in our "nature". It's a problem with the people who are members of our culture. OK, I can agree with that!
  20. There has always been violence. There hasn't always been war. Animals (Creationists, close your eyes!), and remember, we ourselves are animals, (Ok, you can open them) must engage in violence when they are threatened - it's self defence. There are no wars amongst any other species besides our own. It is our culture (the members of it) that engages in war. Other cultures do not. And I'm not talking about Switzerland. I'm talking about indeginous peoples who live off the land. There may be fights, and raids, but war is non-existant to them unless it is in defence against our culture. I have to disagree with that too. Is nuclear technology a blessing? Sure, it can produce seemlessly endless supplies of power, but at what cost? How many of you here are old enough to remember Chernobyl? What about guns? Is that a blessing? What possible good can come of having a gun other than to enforce ones will upon another and/or to murder? You can argue that cops need guns to defend us, but that is only true because the "bad guys" also have guns. I still content that technology is a curse. Some technology has benefited our culture, some has caused great detriment. Life, however, would be much simpler and our world would be much better off had we never thought of any of it.
  21. It is precisely those beliefs, values, and behaviors that are causing the problems. People within a cutlure follow those beliefs, values, and behaviors because they are indoctrinated into it and have not begun to question how their beliefs, values and behaviors are affecting everything around us. Therefore, I believe the majority of the blame belongs to the culture itself, rather than the members of that culture.
  22. Technically, I would say it is not humans, but rather our particular culture which is causing these problems. People lived on this planet for millions of years (or thousands, depending on your religious beliefs) without these problems.
  23. jesh

    New window help

    Check out this link: http://www.w3schools.com/htmldom/met_win_open.aspI believe you simply need to add "scrollbars=1" or "scrollbars=yes" to your window.open code.
  24. Check out this article: http://www.alistapart.com/articles/dropdowns
  25. jesh

    Rotating images

    Check out the setInterval method in the HTML DOM.
×
×
  • Create New...