Jump to content

zanfranceschi

Members
  • Posts

    65
  • Joined

  • Last visited

Posts posted by zanfranceschi

  1. ---edited---Oops, posted with reportingsjr. I guess his reply is more apropriated. Mine is just a simple copy of a working file.---/edited---I can't parse your code cause I don't know ajax, but I've just tried the w3schools example and it worked ok (the Source part (http://www.w3schools.com/ajax/ajax_source.asp)).

    <html><head>	<script type="text/javascript">  var xmlHttp;  function showHint(str) { 	 if(str.length == 0) {    document.getElementById("txtHint").innerHTML= '';    return; 	 } 	  	 xmlHttp=GetXmlHttpObject(); 	  	 if(xmlHttp==null) {    alert("Browser does not support HTTP Request");    return; 	 }    var url="ajax.php"// 	 url=url+"?q="+str// 	 url=url+"&sid="+Math.random()    xmlHttp.onreadystatechange=stateChanged;  xmlHttp.open("GET", url, true);  xmlHttp.send(null);    }    function stateChanged() { 	 if(xmlHttp.readyState == 4 || xmlHttp.readyState == "complete") {    document.getElementById("txtHint").innerHTML=xmlHttp.responseText  	 }  }    function GetXmlHttpObject() { 	  	 var objXMLHttp=null 	  	 if(window.XMLHttpRequest) {    objXMLHttp=new XMLHttpRequest(); 	 } else if (window.ActiveXObject) {    objXMLHttp=new ActiveXObject("Microsoft.XMLHTTP"); 	 } 	  	 return objXMLHttp;  }		</script></head><body><form>First Name: <input type="text" id="txt1" onkeyup="showHint(this.value)"></form><p>Suggestions: <span id="txtHint"></span></p> </body></html>

    And this would be the ajax.php file

    Anything! Just testing...

  2. if you want to send one email at a time, you can do this:// $mail_list is the arrayforeach($mail_list as $mail) mail($mail, $subject, $message);This prevents your mail to be confused with spam. Eventhough it is... hehe

  3. I think I know what you want...

    <html><head>	<style type="text/css">	body {  text-align: center;	}	#wrapper {  text-align: left;  width: 760px; /* This is good for 800 x 600 */  margin: 0 auto; /* The magic */  border: 1px solid #000; /* If you want to see the boundaries */	}	</style></head><body>	<div id="wrapper">  Hi there!	</div></body></html>

  4. if what you want is what pulpfiction wrote, you might want a parent div to nest the three divs under the header for aligning proposes. It's absolutly not necessary, but might be helpful in the future.

  5. Thanks a lot!!!I learned new things from you.Didn't know that "*" meant 0 or more and "+" 1 or more. And you used a lot of parenthesis too, so i see it's right to separete pattern groups with ().And why didn't you put the last dots with the last group? Is this just a matter of taste or is there a logic behind it I can't see?Thanks a lot again!!! I see a new world of possibilities with regexpr!!!

  6. <pre><?php$target = "my.e-mail_with_symbols@domain.com.br";$re = "/^([a-z0-9\._\-]*)(@{1})([a-z0-9\._\-]*)(\.[a-z0-9]{1,3})$/i";echo "<b>$re</b> \t\t\t <b>$target</b>\n\n\n";if(preg_match($re, $target, $out)) {	echo "<span style=\"color: blue;\">matchs</span>";} else {	echo "<span style=\"color: red;\">doesn't match</span>";}echo "\n\n\n\n";print_r($out);?></pre>

    I just started trying some things with regular expressions, and I found this not to be that difficult, but i'm sure i just understand the basics.If someone who knows regexp could see if what I mean is what I wrote, I'd be very thankful!Here it goes:^ = must start with the first "block";([a-z0-9\._\-]*) = a to z, 0 to 9, with ".", "_" and "-" allowed infinite times(@{1}) = "@" must come after the first block only once([a-z0-9\._\-]*) = 3rd block, the same as the first(\.[a-z0-9]{1,3}) = last block preceeded by an dot (mandatory) having alphanumeric chars. Can find this pattern at least once and at most 3 tmes.$ = must end after the abovei = makes the pattern case insensitive.Is all this right? Am I on the right track of regexp? Am I using some unusual/bad practice with the patterns?Thanks a lot!!

  7. Or you can use very simple javascript.

    onmouseover="this.style.backgroundImage = 'url('.jpg')'; this.style.color = '#000';" onmouseout="this.style.backgroundImage = 'url('...')'; this.style.color = '#666';"

    Not sure if you use "url" or the image path only.http://www.irt.org/xref/style.htm good list with possibilities

  8. I was thinking of having one table for my original message, and in that table including an INT column that the database automatically increments every time a new row is created (it will be a unique field).  The number generated by the database will then be used as a key/identifier in another table that contains the responses.  That key/identifier will be used to link the responses to my original message.  I hope that makes sense.So basically my question is if this sounds like it can work?

    You logic is perfect as far as i understand about database design. I did something like this in my site following this very logic and it works perfectly.A suggestion is to always put an unique identifier even in the responses table in the case you want to edit the responses (bad words, etc). Think this way: every thing you might edit or other tables will take as reference (foreigner key stuff) should have an unique identifier.
  9. i didn't really went through all your code, but i saw some absolute positioning. This is tricky when you have parts of your site that have no fixed height or width (usually blocks of texts). You could experiment with "clear: both;" or width with percentages.Tip:Instead of:margin-left:0px;margin-top:0px;margin-right:0px;margin-bottom:0px;Use:margin: 0 0 0 0;(top, right, bottom, left - clockwise starting from top) and when it's 0, there's no need to write the unit name.

  10. Site Name: Zanfranceschi | Desenvolvimento WebDescription: My Online Portfolio/PlaygroundOwner/Devel.: MeURL: http://www.zanfranceschi.com.br/Comments: Tried to make something clean focused on usability and accessibility, and web standards. Although i'm not a designer, i think it looks alright. Languages used are: CSS, XHTML, Javascript, PHP and MySQL. Apps: Photoshop, Gimp, Inkscape and Kate.----Site Name: Cool Web - BrasilDescription: Exhibition of nice Brazilian Web DesignsOwner/Devel.: MeURL: http://www.zanfranceschi.com.br/coolweb/Comments: visit http://cssbeauty.com/ to get the idea. Only Brazilian sites are registred though.

  11. 2 tips for you:- Don't format using html atributes (ex. <font face="Arial">WHITE</font>). Use CSS. I know, you might not be willing to start learning something else, but it's worth, believe me.- And practice some hand coding. This will also be very useful in a near future and your code will be cleaner.

  12. For what i saw in your page, you want a centred content, correct?If so, use a code like this (with proper atributes, values, etc):

    <html><head><style>body {text-align: center;}#wrapper {margin: 0 auto;width: 650px; /* use any u like */text-align: left;}</style></head><body><div id="wrapper">All your content goes here!!!</div></body></html>

    This a very known css technique for centre aliging.This should be in the css forum...

×
×
  • Create New...