Jump to content


  • Content Count

  • Joined

  • Last visited

Everything posted by diego

  1. Any help with this please? I've managed to get the first part done but struggling with the second?Thanks.
  2. HiI am totally new to java and have been running through a few excersises and am stuck with the wording behind this. I have the basic idea down but can't seem to get from instructions to actually implementing the code. Here's what I'm trying to do,1. Invoke the Factory static method createCRCList() to obtain the collection of CRC objects.I have 3 java files. Only two are necessary here. Both codes are listed below. I'm supposed to invoke the method from Factory.java into the GUI.java file and I'm not sure what to do. It seems like a single line of code but I'm not sure what it is or where to p
  3. I'm working on the sort functions, gonna be difficult but I think I can get that done. Thanks.I'm having real problems getting my head around the formulas though. Is there any other spreadsheet like feature that I can add instead of formulas. Hoping for something more advanced then what I currently have?Thanks.
  4. Thanks for your help. I've changed everything around and now using a more robust AJAX system. The theory behind everything you've posted me helped me so much! I've not got an add/remove/edit feature installed. I wanna move on to sorting the data by clicking the header and most improtantly carrying out the basic excel formulas on it so addition/substraction/etc.How would that be possible?Thanks.
  5. I've created the delete.php file below but still have the same problem of nothing happening when I press the delete button? I checked the database and all the entries are still there? <html><title>Malik's Gym</title><body background="backgrounda.PNG"><?php$con = mysql_connect("localhost","tmalik2","England");if (!$con) { die('Could not connect: ' . mysql_error()); }mysql_select_db("tmalik2", $con);$sql="DELETE FROM Malik (ID)VALUES('$_POST[id]')";if (!mysql_query($sql,$con)) { die('Error: ' . mysql_error()); }echo "";mysql_close($con)?><center><FOR
  6. Thanks for the reply.I've added it in as a script, just like i did when I used the tablecloth.js file which works perfectly and I'm still getting the same problem. I can click on the delete button but nothing happens? <html><head><title>Malik's Gym</title><script src="selectuser.js"></script><link href="tablecloth/tablecloth.css" rel="stylesheet" type="text/css" media="screen" /><script type="text/javascript" src="tablecloth/tablecloth.js"></script><script type="text/javascript" src="delete_record.js"></script></head><
  7. Thanks for the reply. That was it, such a silly mistake!!Now instead of having ID's in my ID field I've got a delete button. It doesn't do anything though? I've added the function code in and get that blank screen again. I'm looking through the code and seeing if I've messed it up again but I may be placing it in the wrong place? <html><head><title>Malik's Gym</title><script src="selectuser.js"></script><link href="tablecloth/tablecloth.css" rel="stylesheet" type="text/css" media="screen" /><script type="text/javascript" src="tablecloth/tablecloth.
  8. I've ammended that in the code. I tried adding that to the top of my code and the screen went blank again so took it out. I'm getting the same error using this code. The screen goes blank. If I take out the following line from the code;echo "<td>"<a href="java script:void(0);" onclick="delete_record(' . $row['ID'] . ');">Delete</a>"</td>"; and revert back to the code before I added anything to do with the delete feature and it loads up like normal so it looks like the problems here. The code I'm using is below;MG.php <html><head><title>Malik's Gym<
  9. Here's my code; <html><head><title>Malik's Gym</title><script src="selectuser.js"></script><link href="tablecloth/tablecloth.css" rel="stylesheet" type="text/css" media="screen" /><script type="text/javascript" src="tablecloth/tablecloth.js"></script></head><body background="backgrounda.PNG"><h2 align="center"><b><u><font size="8" face="COMIC SANS MS" font color="#38ACEC">Malik's Gym</font></b></u></h2><form><font color="#38ACEC"><b>Search:</b></font>
  10. Isn't that the same thing? It looks like the code on the page you linked to is using checkboxes to identify which rows to delete. Another common way is to print a delete link for each row then you just click the link for the row you want to delete. All you need to tell PHP is the ID of the row you want to delete, so you'll need a way to save the ID. For a regular link, you would just put the ID in the link:<a href="delete.php?id=10">I meant a specific entry not row so like the one listed above. Main reason I didn't wanna do this is because after I've added an entry the database updates s
  11. Hi again,I used the POST variable and created an add button so that aspect of the database is working fine. The problem I'm having now is creating a delete feature. At the moment its just a html table with an add button at the bottom. What I want is something like the following;http://viralpatel.net/blogs/2009/03/dynami...javascript.htmlI've tried adapting the code there to fit my coding but can't seem to do it. What would be the best way to go about doing such a thing and are there any tutorials that I can follow?I know how to create a delete button that will delete a specific row, need one t
  12. Yep, that was the problem. Works fine now. Now I've just got to make this table as spreadsheet like as possible. Thanks for all your help so far, I'm going to move onto looking at the stuff you told me about and hopefully if I run into some problems I can get some help here.Thanks again!
  13. Thanks for the help. I used the code you provided and edited it to match my system but I get the following error? Here's the code;<html><head><title>Malik's Gym</title><script src="selectuser.js"></script></head><body background="background.PNG"><h2 align="center"><b><u><font size="8" face="Georgia, Arial" font color="blue">Malik's Gym</font></b></u></h2><form> <font color="blue"><b>Search:</b></font><select name="users" onchange="showUser(this.value)"><optio
  14. Where would you suggest putting the code in? I tried replacing the code I've gotten with the new one and nothing showed up. Is there a way I can get the full table to show up instead of the "user info will be listed here". My full code is at the bottom of the post. How about a feature to add an entry through the HTML page that will update the database? And similarly remove the data? Is there a tutotiral or something for that? Thanks.<?phperror_reporting(E_ALL);ini_set('error_log', dirname(__FILE__) . DIRECTORY_SEPARATOR . 'error.log');ini_set('html_errors', 0);ini_set('log_errors', 1);ini_
  15. You can just have a PHP script to output the records in the database, it doesn't need to come through AJAX. The PHP script right now is producing partial HTML, you can change it to produce the entire page.Thanks for the reply. I now understand the theory behind this as in change it so instead of bringing about the single entry I can bring them all. What I'm not sure is how to go about that. Currently I'm using the ID to bring a seperate entry but there isn't anything in the table that I could bring every entry up? What kind of code will be needed for this? What I'm hoping to achieve is have th
  16. Hi again,I messed around with the code and have fixed the problem. The SELECT command was trying to get the information out of the table 'user' when that didn't exist. I named my table ajax_demo so linked it to that and it worked fine. Such a basic error but took me ages to realise!! I do have a couple of questions relating to this.Is there any way I can add in an option to show all the data in the database into the HTML table? or another way to just get all the information to show up before I get to selecting a user?Secondly, I'm trying to make my HTML table look and act like a spreadsheet. T
  17. Hi,I'm not sure what the problem is so I'm not sure where to look. I don't get any type of error message, it's just a case of the data not showing up when it's supposed to.I thought since the database connected fine using other coding maybe I've got the error in the javascript file as in the database I created has a small error that doesn't make it identical to the one needed or maybe in the php page where the mysql command SELECTS id isn't correct? I know it sounds confusing but I'm new to this so not really sure how to go about fixing this.
  18. Thanks for the reply. I've amended the above code so it's as follows; $con = mysql_connect('localhost', 'tmalik2', '*******');...mysql_select_db("tmalik2", $con); I'm still getting the same problem. When the page loads up it tells me "user info will appear here" but when a name is selected from the drop down box all that shows up is the table headers. The only thing I can think of is my username and database name being the same? Can that be a problem? If not any other suggestions?Thanks.Edit: This problem seems to be related to just this specific area because I tried another php system to te
  19. Thanks for your help. I'll give both ideas a shot. I don't know if this makes a difference but I'm using my university server and myphpadmin facilities so could that have an influence in why it won't connect?Thanks.Edit - I tried your suggestion and it seemed to have done something. Instead of having nothing show up the following is listed My username is wrong so changed back the code to the following; Everything else is the same. Is the above correct with the first line having my username and password and the line below containing the table name in the database? If so I'm not sure what the
  20. Thanks for the reply, I've added that error code in but I don't get any errors when running it? Does that mean it's just a connection fault as it can't get to the database? If so how do I get around that?Thanks for your help.
  21. Hi,I've used w3schools a lot with very little problems to date, it's a great site to learn new stuff. I am having one problem with this tutorial. Here's a link to the tutorial;TutorialI have gotten all the code loaded up, created a replica of the database shown on my myphpadmin account (database name is tmalik2 and table is called ajax_demo) but I can't seem to link the two. On the HTML page I get the drop down box with the four names and the table showing the headers but once I select the name nothing shows up. I've modified the code to fit my details so it looks like this on the php page; &
  • Create New...