Jump to content

aleX_hill

Members
  • Posts

    143
  • Joined

  • Last visited

    Never

Everything posted by aleX_hill

  1. I am wracking my brains trying to figure out how to fix this problem, so I hope someone out there has seen it before, or can help me fix it. Basically I have a rollover menu which when rolled over, the image itself changes, and changes another image as well. This can be seen on my site at www.hcdesigns.com.au The problem, however, is that when you rollover one of the menu items before they all load, the image does not load (the image properties are pointing at hcdesigns.com.au/undefined . If the page has finished loading, everything works fine. Another small problem is with the portfolio section, When the page loads, it should set the opacity of each div to 40%. This doesnt happen though, unless it is the second time you view the page (well load that part using AJAX). The images are all preloaded though, so I dont know how to get around this. Any help is greatly appreciated. Alex
  2. Thanks for that. I was just playing around with the imageready output, hence the table. I decided that the white gaps were ok in places, but I put them in a div and change the background color. I might try your suggestions though. Thanks, Alex
  3. aleX_hill

    white gaps

    I am having a problem with my site and have racked my brains trying to fix it. Hopefully someone out there can help. The site I am looking at is http://www.hcdesigns.com.au/v2/nav.html In IE6 there is a small gap just above the navigation bar and above the mainContent div. I have tried all sorts of margin and padding combinations and still nothing. It should be an easy problem to fix, guessing its just a bit too late in the evening. Thanks, Alex
  4. Thanks redarrow, thats what I was looking for (well I assume it is, I wont have time to try it for a while, but it looks good). The script was for a guestbook, to stop robots, which when the guestbook is on a primary school website, can cause a LOT of hassle. Thanks again, Alex
  5. Can someone point me in the direction fo a good anti-spam key script? Cheers, Alex
  6. Now how did I miss that? Thanks Seitan
  7. Hi everyone. I need a little help with keeping my footer at the bottom of the page. the website is: www.charthouseprimaryschool.iinet.net.au The biggest problem is with the about us page. The gap at the botto mof the content is me trying to fix the problem. The style sheet is under includes/style.css If anyone knows what to add to the style to keep it at the bottom, I would be grateful. Thanks, Alex
  8. Thanks George, I can assure you that with the hosting that I am using, it does not work correctly. It does seem to work if that is the only code in the file, however in the following instance it does not (and it is not the only instance). [code] <?php session_start(); include("includes/header.php"); include("login_functions.php"); include("includes/checklogin.php"); $admin_code = $_GET['admin_code']; if ($admin_code == "admin_home" || $admin_code == NULL) {                    $_SESSION['test'] = "value1";                    $test = "value2";                    echo $_SESSION['test'];       include("/dir/file.php"); } else { include("file1.php"); include("file2.php"); include("file3.php"); include("file4.php"); } include("navigation.php"); include("includes/footer.php"); ?> [/code] The above code spits out "value2" on the echo line. Alex.
  9. I am haveing a few problems with session variables. I can set them properly, and use them in scripts etc, however when I use a standard variabel with the same name as the session variable, it seems to override it. For example: [code] $_SESSION['name'] = "value"; $name = "value2"; echo $_SESSION['name']; [/code] will print "value2". Anyone know why? Thanks in advance, Alex
  10. I had a couple of problems with the error reporting, especially the error[] = ... line. After omitting this it worked, with the exception of the use of document.forms[form]. The forms.[form] expects an integer, but seeing as my page has theoretically infinate forms, with a loop to create them, i simply added another argument for the form number, which is the same as the loop variable in my PHP script. Alex
  11. Tom, your a legend... I havent tested it yet, but it looks like that will do exactly what I'm looking for. Thanks for all your help, and be assure, if it doeant work, I will be back :) Alex
  12. That would be a way to do it. The biggest problem I have is that I am converting an old system, and would prefer not to have to change $_POST['var'] Also, I use the same function for many forms, but the javascript would have to be different for each form if I used that method. Thanks for the help, if you know of a way to do it without having a different function for each form, please let me know. Thanks, Alex
  13. Thats basically what I have... but when that page loads, there is no $_POST['id']; The form is as such [code] For each entry in db: <form action="" onsubmit="blockSubmit()"> <input type="hidden" id="id" name="hidden" value="<?php echo $id; ?>"> <input type="submit" ...> </form> [/code] I know my PHP code works fine (pretty much exactly as you said in the previous post) because when I loaded to page through <form action="page.php?action=delete_message"> it worked fine. Thats why I have posted here, because it is something to do with the AJAX that it doesnt work... Thanks again for the help Tom.
  14. That is pretty much correct. I want to pass ACTION to the script (ie. GetPage('ACTION')) and then have it go to page.php?act=ACTION . That bit is fine, works perfectly. The problem is that page.php looks similar to below. [code] switch($_GET['act']) { case 'ACTION':     mysql query to complete action (in this case delete message $_POST['id'])     tell the user that action is complete break; } [/code] I get "tell user action is complete", but it doesnt delete the message. $_POST['id'] is NULL. and I am sure that "id" is the correct name etc because it worked before I started using AJAX to make it quicker. Thanks for the help, I look forward to seeing a solution, its doing my head in... Cheers, Alex
  15. I ma using IE (the majority of the people using the system will use IE, so It has to work). I had fixed the page/response error, and everything goes well with the debugging. It will load the new page fine, just not pass through the variable. For example, I want to load page.pg?act=delete_message with the id of the message as post. It loads the page, and shows it (says "entry deleted"), but when i try to echo $_POST['id']; I get nothing. It seems like nothing wrong with the js as far as loading the page, just the passing of the variables. Alex
  16. I tried what was suggested, but it didnt seem to work. I made an error in my first bit of code, it is actually a GetPage('action') function, where it loads page.php?act=action. I cant see why this would create an error though. The new page loads fine when I use the code, but none of the $_POST variables are available. I tried changing the form to method="get" and using $_GET, but still no luck. If you know where I may have gone wrong, please let me know. On a side note, I have changed the following function: [code] function somethingelse() {   if (http.readyState == 4) {       var page = http.responseText;       //now we replace the your main div. I am going to assume that it is called main       document.getElementById('main').innerHTML = response;   } } [/code] so that it works (the example has var page, then sets the div to response), so that isnt the problem. Thanks again, Alex
  17. Thanks for the help. I will test later, and be back if I need any help.. Alex
  18. Can I just confirm that if i have a form as such: [code]<form action="javascript:GetPage()">[/code] where GetPage is a javascript function I am using for AJAX, I will need the code as shown before to actually submit the variables to the new page? Is there an easier way with the get method? Basically I have a main div, which holds all my content. I want to delete an entry in a db, so i am trying to post the id to the delete function page (which is loaded into the main div to show to error/confirm message). Thanks, Alex
×
×
  • 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.