Jump to content

jesh

Members
  • Posts

    2,293
  • Joined

  • Last visited

Everything posted by jesh

  1. jesh

    Quick Question

    Yeah, that's all CSS. If you haven't learned anything about CSS yet, I would imagine that section to be a bit confusing. Unfortunately, HTML and CSS go so hand in hand with one another that you're probably better off learning both at the same time. Once you've gone through the HTML tutorial, start on the CSS one. Once you learn more about CSS, you'll probably have to learn more about HTML. Just keep at it and ask questions if you need to.
  2. jesh

    positioning in css

    Another thing to consider is that absolute positioning pulls the element out of its container, similar to the way float acts. Relative positioning, on the other hand, keeps the element in the container.
  3. Then, unfortunately, you must have applied it incorrectly because it works flawlessly for me.Happy to hear that your problem is solved, however.
  4. jesh

    XML DOM

    The only way you can save a file on the client's computer is to have that computer use Windows, run Internet Explorer, and have your code use ActiveX. If this is the case, check out the filesystemobject in VBScript.If the computer is set up in any other way, you'll have to take care of this on the server side (using PHP, ASP, ASP.NET, CF, etc.) and, once that file was generated, the client would be able to download it.
  5. jesh

    Java Applets

    Haha, nice rant justsomeguy!@The master: You might consider starting with a chat program. That'll get you experience with a central server handling inputs from multiple clients. I believe there ought to be a number of tutorials out there that will help you through this. Then, once you have a communication framework built, you can start adding features - like little stick figures hugging one another. However, heed justsomeguy's warning - you'll probably end up redesigning it a number of times.
  6. Or, rather than an id, you can assign a single class:<style type="text/css">input.Text { background-color: red; height: 48px; }</style><input type="text" class="Text" id="username" /><input type="text" class="Text" id="firstname" />
  7. You might also verify that your pages can connect to the database. The code might be functioning correctly, it just may be that your website cannot get the data from the database the way it's currently set up.
  8. It has to do with displaying the block level element using position: absolute;. By default, a block level element will span the entire width of its containing element (in this case, the body). However, when you float an element, or set its position to absolute, the width only takes up as much space as the contents inside of it.If you want the forms to appear the same width, you might try explicitly set their widths using CSS.
  9. jesh

    iFrames Help

    A much simpler method would be to use the target attribute in your links and a name attribute in the iframe: <iframe name="MyFrame" src="default.asp"></iframe><ul><li><a href="http://www.w3schools.com/" target="MyFrame">W3 Schools</a></li><li><a href="http://www.google.com/" target="MyFrame">Google</a></li></ul>
  10. jesh

    Java Applets

    Look into client-server applications. There is a server which handles a majority of the code (world state - what monsters are where, what items are loaded in the game, etc.; player state - what items a player's character has, where that character is, who is logged in, etc). The clients are responsible for drawing the game world and sending commands back to the server.It's not too much different from websites. The webserver recieves requests from the clients (browsers), processes that request, calculates data, etc., and then formulates the response and sends it back to the client.http://en.wikipedia.org/wiki/Client-server
  11. This may be a setting in your browser. In IE, go to "Tools->Internet Options" and select the "Advanced" tab. Scroll down to the "Printing" section and make sure that "Print background colors and images" is selected.In Firefox, go to "File -> Page Setup" and select the "Format & Options" tab. Make sure that "Print Background (colors & images)" is selected.
  12. Also, when you put your CSS and javascript in external files, the browser only has to download those files once. After the files have been downloaded, they are served from the browser's cache. If all of your pages use the same CSS, the visitor will only have to download your CSS file once on the first visit to your website. Then, as that visitor navigates through your site, his/her browser will load the CSS from cache and the experience will be much faster.So, if, like aspnetguy said, there are javascript libraries that are larger than 100KB, it may take some time to download it and the user may experience a delay, but this will only happen the first time the visitor comes to your site.
  13. If the ID column is storing an integer (int) rather than a string (varchar), using WHERE ID='1' might be the cause of your problem. Have you tried: UPDATE members SET First = 'Granville' WHERE ID=1
  14. jesh

    serialize function

    A little more percisely, when you have an object that you would like to store in a cookie or in a file so that a user can shut down the application and return to it another time and reload the object from storage, you would have to "serialize" it into a string. Once an object is serialized, it can easily be saved as a string and converted back to an object ("deserialize" or "unserialize") and used in the application.EDIT: Here's a link that explains it even better: http://en.wikipedia.org/wiki/Serialization
  15. Try this: Response.Cookies("firstname")=""
  16. I think you could probably get away with using Access if you are building a smaller, low-traffic site, but if you are building a commercial site, or one that will be receiving a lot of traffic, you'll probably be best served using SQL Server.Also, if you know OOP through PHP, you'll probably hate ASP (as I do). Skip ASP and move straight to ASP.NET if you can - it's a million times better than classic ASP.
  17. jesh

    css tr help

    Unless you only want to style links that are in a row in a table that has a specific class. tr.AltRow td { background-color: #e4e4e4; }tr.AltRow a { color: green; }tr.AltRow a:hover { text-decoration: none; }
  18. Or perhaps: INSERT INTO table (name) VALUES ('ADARMMMM!'), ('jesh'), ('haibec');
  19. Check out Skemcin's snippets here: http://w3schools.invisionzone.com/index.php?showtopic=9500Specifically, look for the pop-up window code. In his example, rather than this: <a href="java script: void(0);" onclick="Info('pagename.htm');" title="text link name">text link name</a> You can link to your image: <a href="java script: void(0);" onclick="Info('image1_big.jpg');" title="My Image"><img src="image1_small.jpg" alt="My Image" /></a>
  20. Here's how you can get setTimeout working: function person(firstname,lastname,age,eyecolor, cycles){ this.firstname=firstname this.lastname=lastname this.age=age this.eyecolor=eyecolor this.cycles = cycles; this.load = load_person; function load_person() { document.write(this.firstname); this.cycles--; if(this.cycles <= 0) { return; } setTimeout("function() {" + this.load() + ";}", 500); } this.load();}new person("John","Doe",50,"blue", 3)new person("Sally","Rally",48,"green", 3)
  21. jesh

    Ajax and flush

    I think, as justsomeguy was getting at, it's the nature of the HTTP Response. I don't know anything about ob_flush() or any of that (ob = output buffer?) but I think he's right in saying that once the Response has been written to, it's not possible to take back from it - the next time you write to the response, you will be appending to the response. I think it's the way HTTP is structured.
  22. If you are storing this data in a database, you may be able to schedule events in the DBMS. In SQL Server, you can use an Agent to schedule events (i.e. run queries, stored procedures, send an email, etc). I looked on the MySQL site and it looks like there is something similar there too: http://dev.mysql.com/doc/refman/5.1/en/events-overview.htmlDepending on your application, it may make more sense to perform the operations in the database rather than the filesystem.
  23. jesh

    PHP Websites

    This Google search makes it seem like it's possible:http://www.google.com/search?hl=en&q=php+on+iis
  24. jesh

    Ajax and flush

    If it outputs "0" the first time and "0 1" the second time and "0 1 2" the third time and so on, then rather than appending the output to the innerHTML of your "outputField": document.getElementById("outputField").innerHTML += xmlHttp.responseText; You can overwrite the innerHTML of your "outputField" document.getElementById("outputField").innerHTML = xmlHttp.responseText; To the user it would appear that the numbers were simply increasing, one line at a time.
  25. Unless your script will be running on the same domain as the files that you are trying to get, I believe you'll have to use server-side code to accomplish this. Check out PHP or ASP.NET. With those, you can create an HTTP Request on the server that sends out a request to the other website to get a particular file and store the response text in a string variable (or in an XML object if it's XHTML). Then, using regular expressions (or, if it is an XML object, you can use an XML parser), you can get at the information you want.
×
×
  • Create New...