Jump to content


  • Posts

  • Joined

  • Last visited

  • Days Won


Everything posted by denno020

  1. Your error is with $.autocomplete, the plugin isn't included in the fiddle
  2. You have JS errors, which could be the reason that your function isn't getting called - the browser wouldn't see it, as it will stop processing a block of JS as soon as it sees an error
  3. Ah now it's there, the first link you posted was incorrect
  4. I am unable to find the JS function that you mention, nor can I find the two table cells.. Is the fiddle updated with the exact code that you're asking the question about?
  5. As requested in other post, could you provide a jsfiddle, just so it's easier to get something (not) working
  6. What I can see straight away is that you're not echoing data in new_friends.php in the correct format. In your ajax call, you've passed the parameter of dataType: 'json'. You need to output your data in that format. So in new_friends.php, you need to finish with $data=array( 'notification'=>$friend_requests, 'unseen_notification' =>$request_count[0][0] ); echo json_encode($data);
  7. I would hazard a guess that it's probably got something to do with the this keyword. You don't have the rest of the context for that code, so there is no way to tell what this is. So this.value is likely not what you're expecting it to be
  8. It's the exact same problem, the tax amount field didn't have the class on it: https://jsfiddle.net/cwmoo4hm/3/
  9. Here you go: https://jsfiddle.net/cwmoo4hm/1/ Turns out the rows you were injecting into the HTML didn't have the classes that you attached your event listener to (.price, .tax, .quantity etc). There's another issue with the new row that is added, as the new row seems to have an extra input, but at least your calculation is working as you requested
  10. Do you want the tab that is selected? You can always do something like this: $(".ui-tabs-container").find("li.active") Which will give you the actual tab. If you want the tab content that is currently selected then you could read the 'aria-controls' attribute of the selected tab, which will correspond to the ID of the tabs content container var tabId = $(".ui-tabs-container").find("li.active").attr('aria-controls'); var tabContent = $("#"+tabId); Pretty sure that will work, but not 100% sure what you want
  11. Could you please create a jsFiddle or something, I tried copying your code into one myself but I was getting syntax errors, so it might be worth you getting it to work (well work but not work in jsFiddle), then we can have a good look at it.
  12. Are you talking about the if statement if($used_paid=='Y')? If so, have you checked that $used_paid isn't a lowercase y? Because y doesn't equal Y. Also, is $used_paid a typo? Is it supposed to be $user_paid?
  13. I'm having trouble figuring out how to import the contents of one JS file into another JS file - a gulpfile. I've got my gulp file set up and I would like to store an array of file names in a separate JS file, that the gulpfile will load in and pass as the parameter to the src command. The array in the separate JS file will be sort of like configuration. But it will be something that will change, and I don't like the idea of constantly editing an array inside my gulpfile To illustrate what I'm after, this is the folder structure I would have //directory root // - gulpfile.js // - arrayfile.js Then my files would look something like this //arrayfile.js var array = [ 'somefile.js', 'someotherfile.js' ]; //gulpfile.js import arrayfile.js //This is the part that I need to figure out properly gulp.task('javascript', () => { gulp.src(array) //where 'array' comes from arrayfile.js .pipe() //etc }); As you can see, I'm using ES2015, however I haven't been able to get import to work with gulp. What else could I do to be able to use the array defined in arrayfile.js as the src parameter in the gulpfile? The versions I'm using: Gulp cli: 1.2.1 Gulp local version: 3.9.1 Node: 6.2.1 Thanks, Denno
  14. I think your best bet would be to add this to your CSS: .hidden_textarea, .hidden_edit_4_session, .hidden_edit_4_friend { display: none; } Then in your javascript, when you actually want to show something, you toggle the class on that element $('#element-i-want-to-toggle-visibility-of').toggleClass('hidden_textarea'); That will mean that any dynamically loaded data will be hidden by default, and only show once your code triggers it to be shown. However, if you want to keep your implementation, then all you would need to do is add $(".hidden_textarea").hide(); $(".hidden_edit_4_session").hide(); $(".hidden_edit_4_friend").hide(); to the end of your $.post(); callback function, like so $.post("st&com.php", {load:load},function(data){ $("#status_area").append(data); $(".hidden_textarea").hide(); $(".hidden_edit_4_session").hide(); $(".hidden_edit_4_friend").hide(); });
  15. You need to re-initialise TinyMCE once the AJAX (I assume) response has come back from the server and you're finished putting the data into the DOM. You will also want to fix up the ID, because you're going to have multiple <textarea> elements on the page with the same ID, which is invalid HTML, and could also mess with the initialisation of TinyMCE
  16. Look for tutorials using Paypal IPN. It's a tricky concept at first, but if you can get your head around it, you'll be able to use it to handle payments from Paypal accounts, and payments from credit cards (using the Paypal site as a checkout)
  17. Also, CSV's don't have "tabs", that's only a feature of spreadsheets. The fact that a CSV file opens up in your spreadsheet program is probably what's throwing you off here..
  18. You could use CSS to get the same functionality. Add the mobile only content to a div, give it a class, and then in your stylesheet, set display: none; on that div, with a style directly after inside a media query, that will set display: inline; Example .mobileOnly { display: none; } @media (max-width: 300px) { .mobileOnly { display: inline; } } Set the max width to your desired "mobie only" size. Denno
  19. A really crude but easy way is to do the exact same thing that you've done for determining which file to include: <?php $page = $_GET['page']; ?> <li<?php if($page == "home") { ?> class="active"<?php } ?>> <a href="?page=home">Home</a> </li> Note where the php tags open and close. You'll just do that for each link, with the appropriate checks for each Denno Edit: Actually I don't know if that would work the way I've written it.. It's been ages since I've done inline php like that.. You may have to do it like this: <li<?php if($page == "home") { echo ' class="active"'; } ?>>
  20. What error do you get? What is the response data from the server?
  21. If you want to use flexbox: div { display: flex; align-items: center; } More info on flexbox: https://css-tricks.com/snippets/css/a-guide-to-flexbox/
  22. I'm assuming that you meant to say "... then second magnific popup should not open till first is open closed." One option, when the document is loaded, as well as checking that #myModal exists, also check if the first popup is visible. If it is visible, then attach a click hander to the close button of that first popup, which will trigger the second popup to show. That will ensure the second popup will show directly after closing the first. Denno
  23. You're going to have to have 2 array entries for each of your shortcuts, but if you don't want to double up the name for the smiley, you could use a constant define("SMILIES__SMILE", "smiley.png"); $people = array( ":d" => SMILIES__SMILE, ":D" => SMILIES__SMILE ); That way, you still only have 1 place where you define the actual name for the smiley image. Denno
  24. Whenever I've seen media queries, they've never used the same number as both the min and max, as that would be rather confusing to the browser I would think.. Try changing the min-width for the desktop version and see what that does. @media screen and(max-width: 1024px) { } @media screen and(min-width: 1025px) { } Denno
  25. You can put it either side of the setTimeout. Putting it after won't delay it from being executed.
  • 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.