Jump to content

e111982

Members
  • Posts

    12
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

e111982's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Hi. Here is a jquery dynamic drop down script. It updates the order in updateDB.php whenever the orders are changed. However I want to put a button and and when it is clicked I want updateDB.php to run. How can I do that? Thnaks. I am newbie in jquery. <script type="text/javascript"> $(document).ready(function(){ $(function() { $("#contentLeft ul").sortable({ opacity: 0.6, cursor: 'move', update: function() { var order = $(this).sortable("serialize") + '&action=updateRecordsListings'; $.post("updateDB.php", order, function(theResponse){ $("#contentRight").html(theResponse); }); } }); }); }); </script>
  2. Thanks Ben. How can I check whether the sorted items in the right order or not?
  3. The address is http://englishpod.com/tour/demo-lesson . In this page if you click on exercises tab, there is an exercies called re-arrange dialogue. I want to run the same application on my local but when I download the full page and click submit answers, no replies.
  4. Hi . I am an english teacher. I want to write a Sentence Re-ordering exercise script like in the web site below(in exercises tab). How can I get the full ajax code and run the application in my server? When I download the page the first page runs. However when I click Submit Answers It doesnt. Thanks for help. http://englishpod.com/tour/demo-lesson
  5. thanks a lot. I think there is no problem.
  6. Thanks. I add the characters but not working.
  7. Thanks. this code is working however Is there a way to keep the punctuation marks before and after the words? In this way the comma,dot,quotation marks etc. disappear.
  8. This code is not working. Where is the error? Thanks.I am new. $old="danger"; $new="danger2"; $str="A typical explosives factory is divided into two parts: the 'non-danger' and 'danger' areas."; echo preg_replace("#[^a-z-A-Z0-9_-]$old[^a-z-A-Z0-9_-]#", $new, $str);
  9. Hi. I have a replace problem. I have strings as: $old1="danger"; $old2="non-danger"; $new1="dangerous"; $new2="safe"; $str="A typical explosives factory is divided into two parts: the 'non-danger' and 'danger' areas."; echo preg_replace("~\b$old\b~i", $new, $str); And I want an output as: A typical explosives factory is divided into two parts: the 'safe' and 'dangerous' areas. It gives as: A typical explosives factory is divided into two parts: the 'non-dangerous' and 'dangerous' areas. Thanks for your help.
  10. How can I make it case insensitive? For example: $old="apple"; $new="lemon"; $str="I have got one green Apple, two yellow apples, oranges and grapes."; echo preg_replace("~\b$old\b~", $new, $str); returns: I have got one green Apple, two yellow apples, oranges and grapes. Is there a way for it to return : I have got one green lemon, two yellow apples, oranges and grapes. Thanks...
  11. Hi. I have got a problem. I have a string like: $old="apple"; $new="lemon"; $str="I have got one green apple, two yellow apples, oranges and grapes."; I want an output as : I have got one green lemon,two yellow apples, oranges and grapes. However str_replace replaces all occurrences. I need only words to be replaced. Thanks.
×
×
  • 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.