Jump to content
xisto Community

TavoxPeru

Members
  • Content Count

    865
  • Joined

  • Last visited

Everything posted by TavoxPeru

  1. Check out: CataList, the official catalog of LISTSERV® lists (52,935 public lists) gnu.org Mailing Lists Best regards,
  2. In my personal opinion Flash sites look great and visually they have a very positive impact on users but: Cause a lot of trouble when you want to validate it. Is a bit dificult to apply on them some SEO techniques if you want to positionate on search engines, for example google recommends not to use it for your navigation links. In terms of Accesibility they are bad. Best regards,
  3. Yes it is easy but i suggest to use MySql or Postgress instead, and also i agree with the others. Best regards,
  4. As far i know it is not possible, maybe i'm wrong but it is interesting and i will googled it for curiosity. What i remember is a site that hosts a lot of different kind of mailing lists called Free Lists that also allows you to create and manage your own mailing lists. Best regards,
  5. Well i try both ways, storing in a database -which is the one i currently use- and storing all the information in the server's session path, could you explain how to do it with the second one???? maybe it will be more efficient, do you have test both of them??? Best regards,
  6. Yes, spamgourmet is a very useful site, i also have an account there to do exactly the same thing. The spam filter system of GMail is one of the best system i know, going further, i consider it THE BEST spam filter system, but, nothing is perfect and sometimes it fails. Best regards,
  7. 10 Extremely Useful Websites to Stop Big Brother From Snooping on You I just read this excellent article that i think could be helpful for all of us, as it's name says it shows up 10 of the most useful website to stop spam, junk mail, etc. From the article: Read the complete article at: 10 Extremely Useful Websites to Stop Big Brother From Snooping on You Best regards,
  8. Yes you could do that but what vujsa says is correct and it is the best way to avoid a lot of problems. Check the following topics for more information about: Can I Remotely Access Xisto MySQL DBs? Free Mysql Server Sites Best regards,
  9. First of all, thanks everybody for your really helpful information. And second, based on this information i decide to follow the suggestions made by vujsa to resolve this issue because in my opinion: The php code will be very simple to develop and efficient. Don't deal with cron jobs. Don't overkill the server. Best regards,
  10. For example, when a user logins to a page -with a login form- and after validating and verifying it's credentials i store some information related to this user in session variables and a table with his state -connected- is updated, then i use it in other pages, etc.When this user logouts -by clicking a logout link- i release -unregister, destroy, etc- all the session variables stored and the same table is updated with his state -disconnected-.All of this funcionality works very well, the problem comes when the user do not click on the logout link and the session expires, the user state is not updated because of this and remains connected. How can i run a php script when a session expires??? Is it possible to do this???Best regards,
  11. Thanks, i think that i would use it in my last project. BTW, i hope that you post soon all the other stuff not in 9 weeks Best regards,
  12. You are welcome, since i found this online tool i start using it for my last project to test my database and helps me a lot of time.The website you post is also very helpful and i guess that i will use it for test other piece of my project, thanks.Best regards,
  13. Generator is an online tool written in Javascript, PHP and MySql for use in testing software, populating databases, etc. that generate very quickly custom data in various formats like HTML, SQL, or XLS. It's free, open source and very easy to use. About Generator Generator Online Download and Installation instructions of the Data Generator Script Best regards,
  14. You're welcome, and yes, i know what you meant. Best regards,
  15. I mean to send your email in HTML format and in plain-text format at the same time, but you don't need this, as you say, you only want the html version, so you only need to setup the headers as posted before. If you need more information about this check this articles: Campaign Monitor - A Guide to CSS Support in Email Xaview Frenette - CSS support in HTML emails of Hotmail, Yahoo! Mail and Gmail A List Apart - CSS in Email, Kissing in a Tree How To Code HTML Email Newsletters (All New Version) Sending HTML + text emails in PHP BTW, from the last one you can download a complete php script for sending HTML emails. Best regards,
  16. I recently have the same problem with my last development project, lucky me i find the solution to this. It consists by simply including a little external script to the head section of your page and to add an attribute to any <img> or <input tpe="image"> html tag that you want to be affected by this. You can download the script and find all the information of this issue at the ScriptingMagic website. Best regards,
  17. .jspc_core_div{ height:100%; width:100%; float:left; margin: 0 0 0px 1px; overflow: auto; background: #fff;filter:alpha(opacity=75);-moz-opacity:.75;opacity:.75;}What it does is to make your class 75% transparent. Best regards,
  18. Excellent info thanks, what about styling the button of the FILE input field??? is there a way to change for example the color and background color of this input field??? Best regards,
  19. What pyost says about using inline css to format the content of your messages to send it as an html email is correct. You have two options to attach the styles that you want to use: Using style direcly in your HTML tags like <p style="color: #f00">text in red</p> or Using style in the HEAD of the document like: <style type="text/css">p { color: #f00; } </style> Also, it is recommended that your message includes both versions of your email, in plain text and in html. And of course, remember to use the correct headers. Best regards,
  20. twitch: i want this because i want to control a unique field of my table, and when you press the ENTER key in any input box -if the autocomplete function of the browser is enabled- it submits the form and breaks up what i want to control. BTW, thanks for your suggestion, i just add a validation routine to control empty fields. kelvinmaki: thanks for your suggestion too, i don't think it that kind solution in that moment. Now, as developers we know that if something don't work in the way we want the best practice is to try another solution right??? well, i just apply this concept and finally i find an easy solution to my problem. In my case, i take off the ajax part and go back to just simple javascript, by implementing a function to the onkeypress event of the document that will check if the ENTER key is pressed, and, at the server side the UNIQUE field is controled by the MySql server, by using the mysql_errno() php function, when this function returns the error number 1062 it shows up a customized error message if not it shows up the standard MySql error message to the user. This is the php code: <?php// database connection settings, and all the other stuff goes here$rs = mysql_query($sql) or die("<p style='font-size:0.75em; '>SQL ERROR, DEBUG : <br /><b>".$sql."</b><br /><br />MySql Error: <br /><b>" . mysql_errno() . " : " . (mysql_errno()==1062 ? "Duplicate key" : mysql_error()) . "</b><br /><br /><a href=\"java script:history.back();\">Press here to go back</a></p>");// more code?>The $sql php variable contains the insert or the update sql query to execute. The following javascript function goes inside the HEAD HTML element of the page: function checkCR(evt) { var evt = (evt) ? evt : ((event) ? event : null); var node = (evt.target) ? evt.target : ((evt.srcElement) ? evt.srcElement : null); if ((evt.keyCode == 13) && (node.type=="text")) {return false;}}document.onkeypress = checkCR; // attach the function to the onkeypress eventWell, that's it, it functions pretty well, i test it with Internet Explorer 6 and with FireFox 2, one thing that i will try later -i'm not sure if i do this- is a way to give the focus to the next field of the FORM instead to do nothing and return false when the ENTER key is pressed. If i implement this i will post how i do it. Best regards and thanks for your suggestions,
  21. Hi everybody, i don't know if this is the correct place to post this topic so in case it is not please mods move it to the correct place, thanks. I have a page with a FORM that contains one or more INPUT TEXT boxes, a standard SELECT box, a standard SUBMIT button, a standard BUTTON button, and some hidden TEXT boxes, that will be used to Edit or to Add a record from a MySql database as usual, in Edit mode this form will get all the information from the database and in Add mode simply will fill it with default values, this page will be opened with the window.open() javascript function when someone clicks a button (one to ADD and another to EDIT) on the main page, so, it is like a Pop up window. Also this page -the openend one- have attached an Ajax page that is used to validate that the value of one of the TEXT boxes is unique and do not exists on the database to prevent duplicates. The SELECT box acts as a one to many relation and gets its values from another table, the SUBMIT button will save the data on the database and the BUTTON simply will cancel and send back to the previous page discarding any change. This is my code, i don't include an included file with some php functions, my session code and my database connection settings because they are irrelevant. form page <?php// session code, include file and database connection settins go here$bo="<body class='bodyedicion' onload='valida()'>";// data from the database for the SELECT BOX$query_rsContinente = "SELECT idcontinente, continente FROM continente WHERE activo = 'S' ORDER BY continente.idcontinente ASC";$rsContinente = mysql_query($query_rsContinente) or die(mysql_error());$row_rsContinente = mysql_fetch_assoc($rsContinente);$totalRows_rsContinente = mysql_num_rows($rsContinente);// php variables that hold the data from the database$mode=(!isset($_POST[mode])) ? "" : $_POST[mode];$idpais=(!isset($_POST[idpais])) ? "" : $_POST[idpais];$idcontinente=(!isset($_POST[idcontinente])) ? "" : $_POST[idcontinente];$pais=(!isset($_POST[pais])) ? "" : $_POST[pais];$pais1=(!isset($_POST[pais1])) ? "" : $_POST[pais1];if ($modo=="grabar") { // save data to the database $pais=(string) safeString(trim($pais)); if ($accion=="a") { // when adding a new record $cadena="insert into pais(pais,idcontinente, fecha, hora, creador) values ('$pais',$idcontinente, curdate(), curtime()," . $_SESSION["idusuario"] . ")"; } if ($accion=="m") { // when editing a record $cadena="update pais set pais='$pais', idcontinente=$idcontinente where idpais=$idpais"; } $rs = mysql_query($cadena) or die("Error... query failed.\n" . mysql_errno(). ": " . mysql_error() . "<br /><br /><a href=\"java script:history.back();\">Go back</a>"); $bo="<body class='bodyedicion' onload='window.opener.recarga();window.close()'>";}else { if ($accion=="m") { // edit record $idpais=(int) ($codigo); $cadena="select idpais, pais, idcontinente from pais where idpais=$idpais"; $rs = mysql_query($cadena); $row = mysql_fetch_array($rs); $idpais=(int) $row["idpais"]; $pais=$row["pais"]; $pais1=$row["pais"]; $idcontinente=(int) $row["idcontinente"]; } else $pais1="";}?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://forums.xisto.com/no_longer_exists/ a Country</title><link rel="stylesheet" href="hojaestilo/@data001.css" type="text/css"><style type="text/css">#ajaxDiv { font-size:10px;font-weight:bold}</style><script type="text/javascript">function valida() { document.a.aceptar.style.display="inline"; if (document.a.pais.value=="") document.a.aceptar.style.display="none"; document.a.pais.focus();}function ajaxFunction(){ var ajaxRequest; try{ ajaxRequest = new XMLHttpRequest(); } catch (e){ try{ ajaxRequest = new ActiveXObject("Msxml2.XMLHTTP"); } catch (e) { try{ ajaxRequest = new ActiveXObject("Microsoft.XMLHTTP"); } catch (e){ alert("Your browser broke!"); return false; } } } ajaxRequest.onreadystatechange = function(){ if(ajaxRequest.readyState == 4){ var ajaxDisplay = document.getElementById('ajaxDiv'); var response = ajaxRequest.responseText.split("|"); ajaxDisplay.innerHTML = response[0]; var TheCode = response[1]; if (TheCode == 1) { document.a.aceptar.style.display="none"; document.a.pais.style.borderColor="red"; document.a.pais.style.borderStyle="double"; document.a.pais.focus(); document.a.esvalido.value="0"; } else { document.a.aceptar.style.display="inline"; document.a.pais.style.borderColor="#80a0a0"; document.a.pais.style.borderStyle="solid"; document.a.esvalido.value="1"; } } } var unique = document.getElementById('pais').value; var actual = document.getElementById('pais1').value; var table = 'pais'; var field = 'pais'; var queryString = "?table="+table+"&unique="+unique+"&actual="+actual+"&field="+field; ajaxRequest.open("GET", "checkunique.php" + queryString, true); ajaxRequest.send(null); }function verifica(){ if(document.a.esvalido.value=="0" || document.a.pais.value=="") { document.a.pais.focus(); return false; } return true;}</script></head><?php echo $bo;?><table class="tituloedicion" width="100%" border="0" cellpadding="2" cellspacing="0"><tr><td>ADD/EDIT PAÍSES</td></tr></table><form name="a" method="post" onsubmit="return verifica();"><table class="tablaedicion" width="100%" border="0" cellpadding="2" cellspacing="4"> <tr> <td class='textoedicion' width="32%">PAÍS</td> <td><input type="text" name="pais" id="pais" class='textos' value="<?php echo $pais;?>" size="40" maxlength="40" onkeyup="valida()" onblur="ajaxFunction()"><span id='ajaxDiv'></span></td> </tr> <tr> <td class='textoedicion' width="32%">CONTINENTE</td> <td><select name="idcontinente" id="idcontinente" class="textos" size="1" style="width:167px"> <?php do { ?> <option value="<?php echo $row_rsContinente['idcontinente']?>"<?php if (!(strcmp($row_rsContinente['idcontinente'],$idcontinente))) {echo "SELECTED";} ?>><?php echo $row_rsContinente['continente']?></option> <?php } while ($row_rsContinente = mysql_fetch_assoc($rsContinente)); $rows = mysql_num_rows($rsContinente); if($rows > 0) { mysql_data_seek($rsContinente, 0); $row_rsContinente = mysql_fetch_assoc($rsContinente); } ?></select></td> </tr></table><input type='text' name='modo' value='grabar' style="visibility:hidden;display:none"><input type='text' name='idpais' value="<?php echo $idpais;?>" style="visibility:hidden;display:none"><input type='text' name='pais1' id='pais1' value="<?php echo $pais1;?>" style="visibility:hidden;display:none"><input type='text' name='esvalido' id='esvalido' value="0" style="visibility:hidden;display:none"><table width="100%" border="0" cellpadding="0" cellspacing="0"><tr><td width="100%" align="center" valign="middle" class='textoBotones'><input type="submit" class='botonGr' name="aceptar" value="SAVE" > <input type="button" class='botonGr' name="cancelar" value="CANCEL" onClick="window.close()"></td></tr></table></form></body></html> checkunique.php (ajax page) <?php// session code, include file and database connection settins go here$t=$_GET["table"]; // name of the table$u= $_GET["unique"]; // unique value to check$a=$_GET["actual"]; // actual value of the filed$c=$_GET["field"]; // name of the unique field$u = mysql_real_escape_string($u);$sql = "SELECT $c from $t WHERE $c='$u'";$total_registros=mysql_num_rows(mysql_query($sql)); // total records countif ($total_registros>0) { if( $a=="") { $display_string = "Error|1"; } else { if ($a==$u) $display_string = "Ok|0"; else $display_string = "Error|1"; }}else { $display_string = "Ok|0";}echo $display_string;?>What i need is a way to disable the ENTER key when any of the TEXT boxes gets focused so if it is pressed do not submit the form simply goes to the next input of the form, only when the SUBMIT button gets focused and the ENTER key is pressed or when i click on it the form will be submitted. Best regards,
  22. Hey vujsa, thanks for this information, you don't know how much time i will save with this nice piece of code. Best regards,
  23. You are welcome, i just download the file, when i have a free time i will look it. Best regards,
×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.