Jump to content

playaz

Members
  • Posts

    55
  • Joined

  • Last visited

    Never

Everything posted by playaz

  1. I've done the following - it all works too! I just want to perform a simple alert() if the ajax returns succesfully - here is my code Note - post.php just does a select statement limited to 1 row (this works fine and returns an array to the #responsecontainer) Can anyone explain how i'd change the code to do this:- 1) if ajax returns succesfully pop up an alert box 2) the returned content in the responsecontainer is always string but the post.php returns an array (i'm guessing some json maybe required?) How can I get this returned content as an array and not a string (as i'll need for another function for creating a jquery dialog box. <script> $(document).ready(function() { var refreshId = setInterval(function(){ $.ajax({ type: "POST", url: "post.php", data: "", success: function(html){ $("#responsecontainer").html(html); } }); }, 1000 ); }); </script>
  2. Hi guys, I've not done too much AJAX in the past so feel free to correct me if I am wrong on any occasion.. I want to poll an events database table every 60 seconds, and run an mysql query to grab all upcoming events, an upcoming event should pop up to screen ideally in a modal window. Can anyone suggest how I could do this or point me in the right direction - thanks in advance.
  3. Cheers guys! I've not fixed it but opening this in another editor does show some strange results! So hopefully I can go through each php file and fix this without too much fuss.. Thanks again :-)
  4. I think your right it does sound like the file format, i've tried Unix/Windows & Mac still no avail - i'll try it in another editor and see if i get any joy.. i hate taking on other people's project.. :-(
  5. Hi Guys, I'm using phpDesigner and the file looks like this.. <?php require('./conf.php'); // all the other code in the script... ?> As you can see the file itself looks fine, but for some reason it is reading the php & require as one like this 'phprequire' - so for some reason it doesnt see the line break when outputted in the php.. Can you suggest why this is happening & way to remedy this problem (never come across this issue before) Thanks
  6. Hi guys, Having to take over an ex-employees project and have moved it onto one of your PHP5 servers - I instantly get the following error :- Fatal error: Call to undefined function phpdefine() in /home/cclients/public_html/chart/conf.php on line 1 For some reason the opening php tag and the define() tag in the conf.php file are 'merging' to look like on tag - however upon viewing the code their is definately spacing between these - it would seem that PHP isn't recognising the line break between but have no idea why this has happened? Can anyone suggest how to get PHP to see it as two words rather than phpdefine() Thanks in advance.. pulling my hair out at the minute lol
  7. Cheers rlelek.. will have another look at that 2mrw when I get some free time - much appreciated P.S I always learn from you forum guys hence the reason I'm here lol :-) Thanks again P.P.S isedeasy, your input also is appreciated too :-)
  8. Hi guys, I know how to use sessions ok, I just wondered what is the best/simplest way to automatically destroy a session after a set time if there is no user activity on a page (eg like how banking sites log you out etc..) Thanks in advance.
  9. Hi guys, Im trying to help out a friend with one of his sites that uses Google Translator to translate text from English to other languages. It works fine in the most recent browsers, however has some strange issues with Internet Explorer 6. When I visit the page it loads the Google Translation box as expected, however if I try to click one of the links at the top of the page it then doesn't show the Google Translator box until I manually refresh the page (or press F5 on the keyboard) - can anyone suggest why this would be happening and if so of a potential fix? This is the site - http://www.broadlandsands.co.uk Thanks in advance,
  10. cheers watsmyname - i scan read it without reading it properly must be my selective memory! thanks!
  11. Hi Guys, I am trying to replicate the following image attached into a CSS menu, so as the image suggest the button will have a red highlighted background when the mouse goes over the link.. Can anyone suggest to me how I go about doing this? Or have a similar tutorial that will do this similar rounded CSS type menu? Thanks in advance [attachment deleted by admin]
  12. Thanks for the quick reply 'whatsmyname' I will give your code a whirl :-)
  13. Hi guys, This is probably really simple but I am not sure how it is done. Basically, I have a page (page 1) that has a standard text link that when the user clicks the link opens this in a new pop-up window (page 2) - in the new window when the user clicks a link it should close the pop-up and load this new URL in initial page (page 1). So in simple terms, page 1 is always there, while page 2 closes itself when a link from within page 2 is clicked.. Any ideas or code on how I can achieve this? Thanks in advance
  14. Ok I must have not had enough sleep.. Just in case someone has this problem simply use the PHP function urlencode($_GET['param']) Works fine now! :-)
  15. Hi guys, This is probably really simple and just thought i'd ask one of the experts on here.. I have a value from a querystring like this.. site.com?year=9%2F2005%2B When I echo this it formats it like this.. 9/2005 How can I stop it formatting the string so it looks exactly as it does in the querystring URL? Thanks in advance
  16. Cheers guys! I sorted the problem - some fool had messed with the settings on my standard editor and set files to save in a MAC format rather than Unix - saved back to Unix and everything works as expected now!! Thanks again!
  17. Hi guys, This is probably very simple to do although I am having a few issues.. I just require a simple script to take a CSV file and loop through each line, each line should be ideally grabbed as an array to allow me to perform a standard INSERT to the mysql database. Can anyone point me in the direction of the best tutorial for this? Thanks in advance
  18. Hi, I have a site which has directories that I would like to use 301 Redirects with as follows:- http://www.mysite.com/categories/ http://www.mysite.com/products/ Is it possible to place a rewrite.script within each of these folders to basically do two things:- 1 – Redirect the user to http://www.mysite.com 2 – Tell Google that the directory has permanently removed Does anyone have any idea on how this would be achieved – thanks again.
  19. Hi Thorpe, My PHP site is hosted on Apache, I have created a phpinfo() file and uploaded it to see the server configuration, I can't see anything related to mod_rewrite in there when I view the phpinfo file - would I be right in presuming mod_rewrite is not installed and that I can only get this setup by contacting my host and asking them to enable this? Thanks again for your help
  20. Hi guys, Can anyone explain how I enable mod rewrite on a live site using the php.ini? I do not have access to the httpd.conf file otherwise I would enable this via Apache. Any help would be gladly appreciated. Kind Regards, Gavin
  21. Hi guys, I am new to using 301 Redirect, I have built a new PHP site to replace the my existing html one - in my html pages from the previous site I have placed the following code to tell Google and other search engine's that this page has been moved permanently and to redirect the page to the current home page. However it doesn't seem to work, it would appear that the PHP is working on these pages - however it definately works on the server as my site is running in PHP and works perfectly fine. <?php Header( "HTTP/1.1 301 Moved Permanently" ); Header( "Location: http://www.mysiteurl.co.uk" ); ?> Does anyone have any ideas why this isn't working? Thanks in advance :-)
  22. Thanks Adam!! thats superb :-)
  23. Hi guys, I am a total newbie at regex - I require an expression that will remove all letters from a string eg.. Below is an example of original string, and the result I would need in the $newString variable - what expression would be required to do this? $string = '472PP'; $newString = '472'; Thanks again!
  24. Hi guys, I am building a form that will automatically calculate the values entered by a user ideally using jQuery/javascript, i am not sure how to do this but have a general idea of the logic required (i am no expert so feel free to correct me) - I have created a dummy image to help explain what I am trying to do. http://img399.imageshack.us/my.php?image=tablehw2.png I have a single form, which has two tables each with form fields that automatically calculate the total amount for each table provided it has been selected. Using jQuery - I would expect the logic to be something like - i) Find the table element ii) Find all the text fields within the table that have a value iii) Add these together and display in the 'total' form field within the last row of each table While i'm ok on the PHP, javascript is something I still get confused with at times - I would appreciate any help on doing this, and if possible a quick overview to help me learn from the code. Thanks in advance Gaz [attachment deleted by admin]
  25. Hi guys, I am trying to implement a form that will automatically calculate the total values of a number of editable form fields that have their related checkbox checked, I'd like it to be done on the fly using something similar to the Pengoworks jQuery calculation plugin found here.. http://www.pengoworks.com/workshop/...tion.plugin.htm The attached image illustrates what I am tryin to do Can anyone help me out in any way, on how this can be done using the jQuery pluging (or something similar) so the calcuation of the total amount is done 'on the fly'. Thanks in advance [attachment deleted by admin]
×
×
  • 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.