Jump to content

BeeDev

Member
  • Posts

    328
  • Joined

  • Last visited

  • Days Won

    2

Everything posted by BeeDev

  1. <?php header("Cache-Control: no-cache, must-revalidate"); // HTTP/1.1 header("Expires: Sat, 26 Jul 1997 05:00:00 GMT"); // Date in the past ?> Just for an example. But your problem is related to something else I think. Can you try change the code for the #donateButton from type="submit" to type="button" ?
  2. make sure "creditCardAuthorize.php" doesn't set any "Header" options, and its only output shud be "echo" statements for it to work. If there's a "Header" set then the page is loaded as a new page in a browser, this might be happening in your case?
  3. if this "creditCardAuthorize.php" is echo-ing the results, then you should use the callback function of $.post like so $("#donateButton").click(function (){ $.post("creditCardAuthorize.php", { amount: $('#amount').val(), description: $('#donation').val() }, function(data){ $('#rightContent').html(data); }); }); EDIT: The callback function is just a normal function so you can do other stuff in there too, for example to show an error message if there's no data: $("#donateButton").click(function (){ $.post("creditCardAuthorize.php", { amount: $('#amount').val(), description: $('#donation').val() }, function(data){ if(data.length > 0){ $('#rightContent').html(data); }else{ $('#rightContent').html(" Sorry, an error has occured, no data was returned"); }); });
  4. BeeDev

    Large XML Files

    Not sure where to post this, apologies if this post doesn't belong here. I have a client who has his own database which he cannot give access to. The only viable way for him to export the data is into an XML file and FTP it to the web server. However, he has about 15.000 products in his database, and the resulting XML file is around 14MB in file size. Now I understand that this XML file is too big for a normal web server to efficiently process without exceeding the execution time (30sec) or running out of memory. I just wanted to know if there's anyone out there who had a similar problem, and if you have any tips/solutions to import this big XML file to a SQL database, or even just work with it normally to search/pull out data directly from. Any links to articles, tips, even a push in right direction will be appreciated. Thank you. P.S. The hosting is on a Windows machine, with ASP/.NET/PHP installed, and it's on a "Shared" hosting server, with very limited access to server configuration (if any at all).
  5. BeeDev

    Image Fade

    check your javascript, remember the class names and stuff in Javascript are CaSe SeNsItIvE
  6. $total = ""; //---set default value for total amount paid BEFORE THE LOOP //create a while loop to show all records while($row = mysql_fetch_array($history,MYSQL_ASSOC)){ $my_rows = $my_rows . $row['payment_amount']; //here i will add the total amount paid $total += $row['payment_amount']; // Changed the $total and $row around } Not tested. But I think this is what you want to do?
  7. The index page has more than 3MB of images that need to be downloaded. That's a lot
  8. I think you just solved it This site has been in production for months, and I forgot that I had the menu absolutely positioned inside the logo div. Once I set a z-index to the div#logo the menu gone over the photos div Thanks Susie & Eric for your help & time looking into it.
  9. @Eric - That IERoot div was there from a different website. I was just re-using the template from another website and the template was from the time when IE8 wasn't out, and IE7 and 6 shared the similar bugs The website is : http://www.rsst.org.uk - but this one also has a drop-down menu, and similar fading images underneath, I can't remember how I managed to fix that ... it's doing my head in lol Thanks for your suggestions, I will try make a stripped down version if i get the time.
  10. Thanks for your suggestion Susie, I have tried your method, but it hasn't made any difference unfortunately. If there's more ideas please write them down, willing to try anything at this point
  11. The URL: http://tiny.cc/Wil5f The problem: Top main menu dropdown hides under the fading images. I've been pulling my hair out for the last few days trying to fix this. Basically, things are fine on standards compliant browsers, but on IE6 and IE7 there's a z-index bug that I cannot get rid of. If you hover over "News" or "Services" on the main menu, the dropdown hides behind the fading images underneath the menu. As suggested on some websites that clarify the bug and its cause, I've tried setting the z-index of the parent elements which are relatively positioned to no avail. Does anyone have any ideas? Thanks.
  12. Welcome, so it's all fixed now?
  13. Have you removed the following code from your Javascript? $('#wrapper #top #nav li ul#drop_travels').width('125px'); I tested it and only setting 145px width to the UL fixes the problem.
  14. Sorry i think I misunderstood your 2nd question about the menu disappearing. I can see that the sub-menu disappears when you try to hover over it. So all you need to do is just apply the class "drop" to the parent tag, and also make the necessary adjustments to your javascript, because the is expanding down together with the submenu, but the tag isn't. I can somewhat understand why you're getting the width error. The reason (Bear with me as I try to explain): The menu unordered list ( ) is 125px wide. The list-item () are also 125px wide with 15px left padding. That makes the tags total width: 125+15 = 140px. So if the inside item is larger than the container, then the container expands on some browsers (well.. maybe ONLY internet explorer .... what browser are you seeing this "expanding" behavior on? Also the anchors ( The solution: Increase the width on your and also tags to contain the widths of the elements inside it. So your tag should have a width of 130px, your tag should have 130+15 = 145px width. Hope you understood, if not try to read up on CSS Box model which explains how block elements work, how padding & margins affect the width etc.
  15. About the non-javascript browsers: You can set the Display:none using javascript so that when non-javascript browsers open that page the sub-menu is still visible. $('#wrapper #top #nav li ul#drop_travels').css("display","none"); About the delay in sliding animation: You can use a jQuery plugin called hoverIntent. It holds the execution of the code until the user has moved and stopped his/her mouse. It's really easy to implement it, just call the Then instead of the normal ".hover": $("#myElement").hover(function.... you use $("#myElement").hoverIntent(function(){ //Do something on hover}, function(){ //Do something on mouse leave }); (Notice the word hoverIntent instead of hover) You can download the hoverIntent plugin and/or read the documentation from: http:// cherne.net/brian/resources/jquery.hoverIntent.html or just search google
  16. #wrapper #top #nav li:hover ul#drop_travels { display: block; } You need to change the above in your css to display:none then the animation will run on first hover. As for the width I can't say much as I don't see the glitch when I run the example you posted. Maybe try to post the full CSS and HTML code or give me an example page online.
  17. It's a Modulus operator symbol: http://ww w.java2s .com/Tutorial/JavaScript/0040__Operators/Modulus.htm
  18. maybe try removing the typos first: if ?(isset($_POST['kick_start'])) the question mark above looks like a typo to me
  19. The example link is a website made with Joomla, an open source php CMS. It creates the PDF's for you so you don't really need to do anything except write the article and save it.
  20. $field should not have quotes around it as it's a fieldname $result = mysql_query("SELECT * FROM after_school_services WHERE $field = '$s';"); if you want to bring out results that have the specified name anywhere in the string you need the LIKE clause with '%' wildcard symbol: $result = mysql_query("SELECT * FROM after_school_services WHERE $field LIKE '%$s%';"); If you input s=john then the above will bring out result that contain john anywhere in the string, for example: Longjohn, John Doe, Steve Johnson etc If you wish the specified name to be always the start of the string then you need to put the wildcard at the end of $s: $result = mysql_query("SELECT * FROM after_school_services WHERE $field LIKE '$s%';");
  21. You need to use a "Server-Side" script such as ASP or PHP together with Javascript to achieve this, because Javascript is only user-side so it can only read the time on the user's computer not the server's. So ASP or PHP to get the server time and use Javascript to refresh the page
  22. I currently don't know of any accordion plugin that saves the open/closed states. I believe the only way to approach this would be to use cookies. You need to update a cookie everytime a user clicks on the menu, and on page load have to read the cookie to distinguish which are to be left open/closed.
  23. Yep if you're using jTip plugin for jQuery then just put in your CSS: #JT { position: fixed; top: 100px; left: 100px; } Can't really help without looking at any code. EDIT: But the Javascript will probably override your CSS, so need to do some javascript hacking too i'm afraid.
  24. more like $result = mysql_query( "SELECT * FROM `sticket` WHERE `username` = '$session->username'" ); $ticks = mysql_num_rows($result); echo $ticks;
×
×
  • Create New...