Jump to content
xisto Community

TavoxPeru

Members
  • Content Count

    865
  • Joined

  • Last visited

Everything posted by TavoxPeru

  1. I have a problem setting the readonly property of a textbox which depends on a yes and no radio buttons selection, I'm sure that my code is correct but i dont know why nothing happens. This is code: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"><HTML><HEAD><TITLE> New Document </TITLE><script LANGUAGE="JavaScript"><!-- Beginfunction changeRadio(sVal) { if (sVal=='n') { a.textval.readonly=true; a.texval.value=""; } else { a.textval.readonly=false; }}// End --></script></HEAD><BODY><form name="a" method="post"><table class="tabla" width="100%" border="0" cellpadding="2" cellspacing="10"> <tr> <td width="32%">READONLY TEXTBOX</td> <td> <input type="radio" value="n" name="radiobtn" onclick="changeRadio('n')" CHECKED>No<BR /><input type="radio" value="s" name="radiobtn" onclick="changeRadio('s')">Yes</td> </tr> <tr> <td class='textoedicion' width="32%">TEXTBOX</td> <td><input type="text" name="textval" value='' size="21" maxlength="20"></TD> </tr></table><table width="100%" border="0" cellpadding="0" cellspacing="0"><tr><td width="100%" align="center" valign="middle"><input type="submit" name="submit" value="Save"> <input type="button" name="cancel" value="Cancel" onClick="window.close()"></td></tr></table></form><script language="JavaScript" type="text/javascript"><!--if (document.a.radiobtn[0].checked) { document.a.textval.readonly=true;}else { document.a.textval.readonly=false;}//--></script></BODY></HTML>Best regards,
  2. Sounds interesting but who tells you that they dont access your computer???? if they do, they could do whatever they want.Best regards,
  3. Well done, but, i take the liberty to optimize your code here is my version:<?php$a = "images/".$_GET['src'];$b = $_GET['w'];$ext = explode(".",$_GET['src']);$ext = end($ext);$ext = strtolower($ext);$size = getimagesize($a);if ($b >= $size[0]) $b = $size[0];$c = round($b * $size[1] / $size[0]);$img_dst=imagecreatetruecolor($b,$c);if ($ext == "jpg") { header ("Content-type: image/jpeg"); $img_src=imagecreatefromjpeg($a);imagecopyresampled($img_dst, $img_src, 0, 0, 0, 0, $b, $c, $size[0], $size[1]);imagejpeg($img_dst, "", 100); }else if ($ext == "gif") { header ("Content-type: image/gif"); $img_src=imagecreatefromgif($a);imagecopyresampled($img_dst, $img_src, 0, 0, 0, 0, $b, $c, $size[0], $size[1]);imagegif($img_dst);}else if ($ext == "png") { header ("Content-type: image/png"); $img_src=imagecreatefrompng($a);imagecopyresampled($img_dst, $img_src, 0, 0, 0, 0, $b, $c, $size[0], $size[1]);imagepng($img_dst); }imagedestroy($img_dst);?>Best regards,
  4. Thanks for the share, i just test it and as you say is very fast, it would very helpful in situations like for example when you travel and you dont have any option to store big files. Definitely it goes to my favorites.best regards,
  5. The solution that vujsa offers is very simple and powerful, another way to do it i think is by using the location object of javascript, something like this: <a href="#" onclick="top.location.href='<?php echo $_GET['page']; ?>'">Remove this Frame</a>Best regards,
  6. Well, whatever was wrong with my account now have been corrected and nothing lost to report thanks a lot admins.Best regards,
  7. I still have problems with my account, and cant login to anything. Best regards,
  8. Well, finally my client decide not to use this approach. What i do is simply change it to a standard login script using a form with a text box and a password box and all works very fine, so sorry dudes, i hope sometime i could complete this approach. For me, it is an incomplete task that i must finish soon.Best regards,PS: please admins let me know if i'm doing wrong when i post again and if the correct way was simply to include this in my previous post.
  9. Thanks dude, a lot of time i waste searching something like this, is very simple, and also it demostrates me what i was doing bad in my script. best regards,
  10. In my case, i notice that my account is suspended, i really dont know why BTW, my domain is: http://forums.xisto.com/no_longer_exists/ Best regards,
  11. In PHP and SQL, the " and the ' are use to specify strings literals like the $query variable, in this specific case you are creating a SQL statement that will select some links of a category type whick also is a string, thats why you use this. Best regards,
  12. Thanks for the info, its really amazing all the things that the hUman can create, i hope that i never be infected by this malware, yes yes, i know, i ask too mUch BTW, a few months ago i lost my 30GB HD especially becaUse of downloading torrents, i know that i can find good things in this format but my experience told me that the risk to get some virri is very high. Best regards,
  13. To order alphabetically simply remove the quoutes of your order by clause, and also delete your second $query variable assignment because if you dont do it, this will replace your first assignment. Your statement will be: <?php // Query the Database$specific_value = 'Industrial';$query = "SELECT * FROM table_links WHERE cat = '" . mysql_real_escape_string($specific_value) . "' ORDER BY manufacturer ASC";$result = mysql_query($query);if(!$result) die("ERROR: " . mysql_error());while($row = mysql_fetch_array($result)) { echo '<a href="' . $row['mfr_url'] . '">' . $row['manufacturer'] . '</a><br>'; }?>Best regards,
  14. Sounds good but right now there exists a lot of sites like yours, i think that the only way that your site would success is by offering good contents and also to permit your users to email directly without any restriction. best regards,
  15. Hi, this simple one line script changes the image size and source on your thumbnail picture without reloading the page or using popups, just paste this code into the BODY section of your HTML document: <img src="yourimage.jpg" width="150" height="200" onclick="this.src='yourimage.jpg';this.height=400;this.width=300" ondblclick="this.src='yourimage.jpg';this.height=200;this.width=150">Best regards, edit: adding the missing ' of the src on the ondblclick event.
  16. I view this behavior in many sites, i think they do it with the use of an iframe, so you will have 2 pages, one main page and one with your links. Lets view it with an example. mainpage.htm: <html><head><title>Main Page</title><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /></head><body><!-- here you can put whatever you want --><!-- set your iframe whatever you want --><iframe src="linkspage.htm" name="target_iframe"></iframe></body></html> linkspage.htm: <html><head><title>Links Page</title><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /></head><body><a href="http://forums.xisto.com/&; target="_self">Xisto</a><br /><a href="https://www.google.com/&%2334; target="_self">Google</a><br /><a href="http://forums.xisto.com/no_longer_exists/; target="_self">Yahoo</a><br /></body></html>I'm not 100% sure if it is the way they implement this but this example works fine. Best regards,
  17. Thanks for share this site, i just test it very quickly and the results are excellent, as you said it is very useful.Best regards,
  18. Yes you are right, it is another solution but many host servers for security reasons disable this functions so you can't use it. Best regards,
  19. Ok, thanks a lot, i will put this in practice right now. Best regards,
  20. I think it is possible to delete the files before the session is ended by using the unlink() php function, but you need the correct system priviligies to do it.Best regards,
  21. Tell me something, what you say is that if i specify the font sizes using 'ems' in an external css file the user can't modify these sizes by the browser right??? but if i specify these sizes usign 'ems' directly in the html page using a style attribute of any html tag or by using an inline style they could modify these by the browser??? Best regards,
  22. Hi, if someone need to convert pixels to ems, this calculator will do the trick, also it can calculate child and sibling measurements. I think that this website will be very helpful and could save some time, so check it out and visit: Em Calculator Best regards,
  23. It's quite easy simply call the function with the value that you want to strip out as a parameter before your insert stament. I use this function everytime and you dont know how many problems and time i avoid with it: <?phpfunction safeEscapeString($string){ if (get_magic_quotes_gpc()) { return $string; } else { return mysql_real_escape_string($string); // PHP 4.x }}$var1=safeEscapeString($_POST["var1"]);$var2=safeEscapeString($_POST["var2"]);...// your db connection settingsmysql_query("insert into table(var1,var2) values ('$var1','$var2')") or die ("Error...\n" . mysql_errno(). ": " . mysql_error() );// other code?> Best regards,
  24. To connect a MySql database with Java you need the MySQL Connector/J that is a native Java driver that converts JDBC (Java Database Connectivity) calls into the network protocol used by the MySQL database, find more info visiting: Using MySql with Java. 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.