Jump to content

solarisuser

Members
  • Posts

    122
  • Joined

  • Last visited

    Never

Everything posted by solarisuser

  1. You have no more hard drive space on the E:\ drive
  2. I did that, but I just wanted it to work the way I mentioned above =)
  3. No such file or directory in D:\Websites\bhwww\daralnoor\daralnoor.org\www\saad\main.php Make sure $id is pointing to the correct path of the file you are trying to include
  4. Hi All, I am having a problem POSTing from a form using this.... <form method="post" action="page2.php?enabled=yes" enctype="multipart/form-data"> This parses an uploaded file, and the above works great if I just POST it to page2.php. But I really would like to get it to work like the above, due to the layout of the code. Thanks in advance!
  5. Hi All, Is it possible to combine these two regexs I use? I'm not well versed in regex.... First One: /^[a-zA-Z0-9 -]+$/ Second One: /^.{3,21}$/ Essentially, allow "a-zA-z0-9, spaces, and dashes", and it must be between 3 and 21 characters in length.
  6. BTW - If you want an awesome PHP uploader, just use this: http://labs.beffa.org/w2box/
  7. Damn, usort() looks complicate.... anyone out there willing to give me something to work with.. the examples don't seem to apply to me.
  8. I've never tried to use a csv from a URL or whatever, but if you need to grab a csv file from another site, then look into using PHP's curl or ftp functionality to grab the file and save it to a randomized name, do your parsing, save it to a filename of your choice, and delete the temp file.
  9. 1) Put the full path to the csv file 2) You might need to escape the slashes (C:\\path\\file.csv)
  10. Hi All, I have records named "Entry-1", "Entry-2", .... "Entry-10", "Entry-11", etc... When I list them using: while ($row = mysql_fetch_array($result, MYSQL_BOTH)) { echo "$row[entry]"; } I get .. Entry-1 Entry-10 Entry-11 Entry-12 Entry-13 Entry-14 Entry-2 Entry-3 Entry-4 Entry-5 .. Entry-9 Is there a way to deal with my situation so that Entry-10 and on come after Entry-9? I would not mind modifying my MySQL statement if thats what it takes. BTW - I can't change Entry-1 to Entry-01 in the DB. Thanks in advance!
  11. Thanks Barand, but with alot of records I figure it'd be quicker using PHP to calculate than MySQL when the record is already in memory. In any case, I managed to get it.
  12. Hi All, I think I'm overcomplicating things so I thought I'd ask if there is a better way to subtract two dates. Plus, my way is not very accurate. Its a few days off... Both dates come from MySQL in the format "YYYY-MM-DD". $end_date = $row['end_date']; // (2007-10-10) $ts = time(); $start_date = date("Y-m-d", $ts); // (2007-05-28) $end = round(strtotime("$end_date")/84000,5); $exploded = explode(".",$end); $end_date = $exploded[0]; $start_date = round(strtotime("$start_date")/84000,5); $exploded = explode(".",$start_date); $start_date = $exploded[0]; $expiration_in_days = abs($start_date - $end_date); Thanks in advance!
  13. I have <div id=field_50>7000</div> and when I run the JS code below, it doesn't add 80, but appends 80 to 7000. Also, after it does that, it redirects to another page, but I'm assuming its because of a JS error maybe? function update(i){ var oldone=document.getElementById('field_' + i).innerHTML; document.getElementById('field_' + i).innerHTML = ''; oldone+= 80; document.getElementById('field_' + i).innerHTML = oldone; } This is called from an <A onclick=update(50);> and works, I used alert() to show that i is being seen (50 in this case).... Thanks in advance!
  14. Hi All, I have successfully managed to get the row to be removed when a user clicks on the delete graphic next to a row. The problem is how to then run a MySQL "DELETE" on that id. Here is the code I have so far... <script type="text/javascript"> function deleteRow(i){ document.getElementById('myTable').deleteRow(i) } </script> echo " <table id=myTable> <td align=left> <a id=$row[id] onclick=\"if(confirm('Are you sure you want to delete this?')) deleteRow(this.parentNode.parentNode.rowIndex); return false;\" href=\"\"> <img src=delete.gif border=0></A></td></table>";
  15. Thanks - you were right. Using alert, I managed to track it down by removing every few lines of the page until removing some lines fixed it, and dug deeper until I found it. It turned out to be a third-party JS causing the problem.... thanks!
  16. Thanks but that did not help. It works great in FF2 but not in IE6 AND IE7 (I said IE7 only last time).Are there any dev tools that might help me track it down? I'm at a total loss =(
  17. IE6 and FF2 work fine, but IE7 doesn't like this, and I can't seem to figure out why...any ideas? In HTML file... <script src="coll_items.js" type="text/javascript"></script> <body onLoad=shoh('first');> In coll_items.js... imgout=new Image(9,9); imgin=new Image(9,9); imgout.src="arrow.gif"; imgin.src="arrow2.gif"; //this switches expand collapse icons function filter(imagename,objectsrc){ if (document.images){ document.images[imagename].src=eval(objectsrc+".src"); } } //show OR hide funtion depends on if element is shown or hidden function shoh(id) { if (document.getElementById) { // DOM3 = IE5, NS6 if (document.getElementById(id).style.display == "none"){ document.getElementById(id).style.display = 'block'; filter(("img"+id),'imgin'); document.cookie = "remember_" + id + "=yes"; } else { filter(("img"+id),'imgout'); document.getElementById(id).style.display = 'none'; document.cookie = "remember_" + id + "=no"; } } else { if (document.layers) { if (document.id.display == "none"){ document.id.display = 'block'; filter(("img"+id),'imgin'); document.cookie = "remember_" + id + "=yes"; } else { filter(("img"+id),'imgout'); document.id.display = 'none'; document.cookie = "remember_" + id + "=no"; } } else { if (document.all.id.style.visibility == "none"){ document.all.id.style.display = 'block'; document.cookie = "remember_" + id + "=yes"; } else { filter(("img"+id),'imgout'); document.all.id.style.display = 'none'; document.cookie = "remember_" + id + "=no"; } } } } Thanks in advance!
  18. Hello All, I am having a problem that when I click on one of the two collapsible dropdown links on the same page.. <a href="#test" onClick="shoh('test');" ><img src="arrow.gif" name="imgtest" border="0">Test Fields</a> the picture for both do not change. Only the first link changes. I am pretty sure I need to look at using getElementByName or maybe something else, but all the various modifications I've tried have not worked. Can someone point me in the right direction? Here is the rest of the code incase someone would like to try it out... <div style="display: none;" id="test" ><table><tr><td><input type=text name=name></td></tr></table></div> Here is the JS code that I include at the top of the page.. imgout=new Image(9,9); imgin=new Image(9,9); /////////////////BEGIN USER EDITABLE/////////////////////////////// imgout.src="arrow.gif"; imgin.src="arrow2.gif"; ///////////////END USER EDITABLE/////////////////////////////////// //this switches expand collapse icons function filter(imagename,objectsrc){ if (document.images){ document.images[imagename].src=eval(objectsrc+".src"); } } //show OR hide funtion depends on if element is shown or hidden function shoh(id) { if (document.getElementById) { // DOM3 = IE5, NS6 if (document.getElementById(id).style.display == "none"){ document.getElementById(id).style.display = 'block'; filter(("img"+id),'imgin'); } else { filter(("img"+id),'imgout'); document.getElementById(id).style.display = 'none'; } } else { if (document.layers) { if (document.id.display == "none"){ document.id.display = 'block'; filter(("img"+id),'imgin'); } else { filter(("img"+id),'imgout'); document.id.display = 'none'; } } else { if (document.all.id.style.visibility == "none"){ document.all.id.style.display = 'block'; } else { filter(("img"+id),'imgout'); document.all.id.style.display = 'none'; } } } }
  19. Hi All, Is there a way to use JS to limit the size of a <select> dropdown menu? An example were I'd like to have the first <option> be display up to 10 characters, but of course the value should remain the entire length. Thanks for any help! <html> <body> <form action=""> <select name="cars"> <option value="volvo Extra Extra Long">Volvo Extra Extra Long</option> <option value="saab">Saab</option> <option value="fiat">Fiat</option> <option value="audi">Audi</option> </select> </form> </body> </html>
  20. I've been dabbling with CSS lately, and other than styling, could I use CSS to limit the amount of characters?
  21. Hi All, Is there a way to limit the size of a <select> dropdown menu? An example were I'd like to have the first <option> be display up to 10 characters, but of course the value should remain the entire length. Thanks for any help! <html> <body> <form action=""> <select name="cars"> <option value="volvo extra long blah blah">Volvo Extra Long Blah Blah</option> <option value="saab">Saab</option> <option value="fiat">Fiat</option> <option value="audi">Audi</option> </select> </form> </body> </html>
×
×
  • Create New...

Important Information

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.