Jump to content


  • Content Count

  • Joined

  • Last visited

  • Days Won


Everything posted by Ingolme

  1. It depends on the server settings. Usually you upload a "favicon.ico" file to the top level of the site. You can also put this tag in your HTML document:<link rel="shortcut icon" href="favicon.ico" type="image/x-icon" />Change "favicon.ico" for the icon file.I'm afraid you'll need to find software that converts imagesd to icon format.
  2. Ingolme


    You must give each form element an ID and then add a line of code for each of them. Then you add that to the function I gave you previously.For example, here if the form and the javascript for each element:...<input type="text" id="element1" /><input type="text" id="element2" /><input type="text" id="element3" /><textarea id="element4" cols="30" rows="4"></textarea>...isIncomplete = false;if(document.getElementById("element1").value.length == 0) formSubmit = 0; isIncomplete = true;if(document.getElementById("element2").value.length == 0) formSubmit = 0; isIncomple
  3. Tables are a really bad way to display websites. And embedding tables within tables is not a good idea.To make the content be well placed I think this should work:<td width="790" valign="top">Context goes here</td>
  4. Ingolme

    Image formats

    I wouldn't ever use BMP on the internet, that's a really big format. If what you want is to make the color blend into the background, why not use a PNG with transparency rather than trying to make it equal with the background color?
  5. Ingolme


    I have this function to validate Emails:Put this in the <head> of the document: function formValidate(aform,mail) { formSubmit = 1; atPosition = document.getElementById(mail).value.indexOf('@'); dotPosition = document.getElementById(mail).value.lastIndexOf('.'); dist = document.getElementById(mail).value.length; domain = document.getElementById(mail).value.substr(dist-3,3); if(document.getElementById(mail).value == "") { formSubmit = 0; alert("You must provide an E-mail address"); } else if (!dotPosition || !atPosition || atPosition < 1 || dotPosition < (at
  6. I recommend haveing a table "cities".Here's an example of how it could look: cities table:Name | Country--------------------------------Madrid | SpainNew Jersey| U.S.AParis | FranceBarcelona | SpainNew York | U.S.A To get all the cities of a country:SELECT * FROM cities WHERE country = 'Spain'To get all the countries available:SELECT DISTINCT country FROM cities
  7. The way to get an attribute from an XML node is the following:xmlDoc.getElementsByTagName("Alertinfo")[0].getAttribute("status");
  8. Yes, CSS loads much faster than HTML tables. HTML tables are pretty unefficient.
  9. I don't know, I'm just suggesting because I've never used subqueries, so I can't be sure exactly how they work. If performing the query before works ok then at least your script will be working.Maybe somebody else can find a different solution.
  10. Maybe you should do the other query first and add it into the second query after. Like this:$res0 = mysql_query("SELECT post_id FROM db1.table2 WHERE field1=9795",$dbc1);$row0 = mysql_fetch_array($res0);$sql1 = "SELECT * FROM db1.table1 WHERE field1=(".$row0['post_id'].")";$result1 = mysql_query($sql1,$dbc1);while($row1 = mysql_fetch_assoc($result1)){echo $row1['field1'].'<br />';}
  11. Well, using divs and CSS you can get quick loading round corners. But you MUST know the width and height of the images you're using. I'm afraid I can't assure you it will work out correctly because you need to base the code on the size of the images, but try this:HTML code: <div class="topleft"> <div class="topright"> <div class="topmid"> </div> </div></div><div class="left"> <div class="right"> <div class="mid"> </div> </div></div><div class="bottomleft"> <div class="bottomright">
  12. I see this task impossible: all block level elements have a line break before and after. <ul> is a block element, <li> is a block element, <p> is a block element. Without CSS, tables or javascript I don't see a solution. Whenever your teacher gives the solution would you mind telling it here? I'd be glad to learn how to do something like that.
  13. Well, you just have to declare the connection for each database. Here's an example:$con1 = mysql_connect("server1","user1","password1");$con2 = mysql_connect("server2","user2","password2");When using functions like mysql_query() don't forget to put $con1 or $con2 as the connection parameter. For example:$data1 = mysql_query("SELECT * FROM table",$con1);$data2 = mysql_query("SELECT * FROM anothertable",$con2);
  14. Hello! I'm Ingolme.Web programming (not as much designing) is one of my favourite hobbies.For years I've been learning from W3Schools, I went and checked out and understood basically all the tutorials there. These days I can do basically anything on a website, given (X)HTML, CSS, Javascript and PHP.I like following web standards, so rather than using methods like document.write(), properties like innerHTML or onclick type events I try to work around it with createElement(), appendChild() and addEventListener() (Though I try to make things crossbrowser and will apply attachEvent() for if the ot
  • Create New...