Jump to content

All Activity

This stream auto-updates     

  1. Today
  2. How to make this?

    Hi, i think codeminer post helped you to overcome the issue facing by you. would like to suggest instead of developing website through manually by encrypting code, it is better to utilise web development sites like word press, magneto and many more..
  3. Yesterday
  4. Two Forms, Two Actions, Same Page

    Yes, this was the question. And, what a great answer! I wish you and everyone else at W3Schools a fabulous Happy Thanksgiving! With a little good fortune it could prove to be one very productive holiday. Roddy
  5. How to compare two numbebrs

    I am trying to say that if first two characters are like "2m, 3k", it returns true. I mean it prints "a>b". Instead, it should not print any thing. First two characters can be numbers or strings. If strings(i.e. 2m, 3k, jj) , it should not print "a>b" at all. If numbers (i.e. 11, 44, 08), then print "a>b" if greater than 8, else do not print. It should print "a>b" if first two characters are numeric and greater than 8. Else, do nor print "a>b".
  6. How to compare two numbebrs

    Yeah that's what you're telling it to do, convert the the first 2 characters to a number and check if it's greater than 8. If that's not what you want to do, what do you want to do?
  7. How to compare two numbebrs

    miless = "2mile(s)" myMile = Left(miless,2) print myMile myMile = cint(myMile) print myMile If myMile > 8 then print "a>b" End If first line miless variable can have value like "20 miles, 35 miles, empty, no miles, etc". It works only if first two characters are numeric.
  8. loop input for each string

    When you click submit button, the first thing it should do to prevent duplication of created inputs IS remove any existing created inputs that may exist already, using jquery each loop again looking for attribute 'name' whose value begins with 'txtbox'. Example for selector is here https://api.jquery.com/attribute-equals-selector/ Here describes characters you can use to filter out specific inputs https://www.w3schools.com/css/css_attribute_selectors.asp Then use remove() to remove these elements that match https://api.jquery.com/remove/
  9. loop input for each string

    ok thanks, I don't understand
  10. loop input for each string

    You don't need join, you can just use the parameter variable from function directly. You need to clear any of these created inputs first before creating new inputs, ignoring the user input text box, either by class name or name attribute that begins with specific string name.
  11. loop input for each string

    I change the join += valeur + "<br>" join = valeur and now it's go well, but the problem now is that when you click two or more times on the submits, the inputs are multiplied so that I want it remains the same even if you always click on, do you know how we do for that?
  12. touchstart and click on refresh only

    Any Javascript errors will be on the console. You can also add some console.log statements in that code to have it print out what it's doing and verify.
  13. Date time not working...

    You have to realize that when you tell it Sunday, it's going to get the next Sunday. If you run that at Monday at 1am, and tell it you want Sunday, it's going to get the next Sunday, not yesterday. You may need more logic to figure out what you want. For example, get the current day of the week first and go from there. If the current day is Sunday, and it's after 9:55, or the current day is Monday and it's before 1:30, then do whatever you want to happen.
  14. Two Forms, Two Actions, Same Page

    I don't think your question is worded correctly, $_POST is available on every request but your browser will only send one request at a time. Meaning you can only submit one form at a time. Anything that you want to be submitted all needs to be in the form. Of course, you can use Javascript to add or remove form elements if you want to build an interface like that. But each request to the server is only 1 request, you don't send multiple requests at the same time other than if you're using ajax to send a bunch of requests, but even so that's not the best idea. If you find yourself sending multiple requests in a short period you probably need a more efficient design, requests have overhead. If you're just asking how you can structure a page with multiple forms where you can figure out which form was submitted, there's a post about that here: http://w3schools.invisionzone.com/topic/12509-php-tips-and-tutorials/ I would assume that the trigger would update the timestamp, but the final word there is to just test it.
  15. touchstart and click on refresh only

    The developer tools in Chrome is not showing that there are nay errors! Any other place I can go that may identified errors? Thank you
  16. How to compare two numbebrs

    If you want to read the first 2 characters you can use left: https://www.w3schools.com/asp/func_left.asp You're comparing characters and numbers. When you do that it converts the characters to numbers, and if you look at a character table, "A" is 65 and "a" is 97, so it's never going to be less than 8. If you want to compare them like numbers then convert the characters to numbers first. You can use CInt. https://docs.microsoft.com/en-us/dotnet/visual-basic/language-reference/functions/type-conversion-functions
  17. touchstart and click on refresh only

    There's not really enough context to suggest what the problem is, but the first step is to make sure you're finding Javascript error messages if there are any.
  18. Last week
  19. Date time not working...

    Can you give me a hand with the code? I need to open a stream between sunday 9:55PM and monday 1:30AM. I have solved the problem with 2 PHP's but I think it's not the best way.
  20. I have a very simple code that often only works after I get to the page, then ask for the page to reload. If I click the button without reloading, nothing happens. If I click after page refresh, it works perfect. Thank you for your help. This page has a few tables all brought in by PHP select statements etc. Could that possible have some anything to do with it? <script> $(document).ready(function(){ //OPENING PRIMARY $('.OpenerPri').on ('touchstart click',function() { var ppNum = ($(this).val()); var callType = 'opener_pri'; ($(this).prop('disabled', true)); ($(this).html('Thx')); $.post("reservecall.php", { ppnum:ppNum, calltype:callType }, function(data, status){ alert("Data: " + data + "\nStatus: " + status); }); }); }); </script>
  21. Two Forms, Two Actions, Same Page

    BACKGROUND: Good ideas are sometimes like luck, they come in streaks. Thanks to the experiential wisdom of this forum and those around me in the Galvanize collective workspace, I have decided to tarry a little longer with the reconstruction of my data base. Indeed, I have learned a new term -- normalization. What before I intended to achieve with row duplication I hope now to achieve with simple updates. In order to achieve this important structural change and still retain the benefits of the old structure, I must disengage one of my form's <fieldset>s and create from it a new form that is submitted manually and only occasionally. It would appear that the small changes to the separate table that this fieldset previously replenished with each new form submission can now be achieved with MySQL TRIGGER and UPDATE statements. This strategy has led to the following two questions: QUESTION ONE: Under the assumption that one can have only one $_POST variable per page how does one typically go about using the same $_POST variable for multiple forms on the same page? If I were to implement this task on my own, without the advice of others, I would create a bivariate if-. else if-, else- statement that tests for the present of one of two variables and then handles only that data associated with the form submitted. Is there another, perhaps more thorough, separation that does not include the creation of a separate form page? QUESTION TWO: When executing a MySQL TRIGGER that updates a single row value of a single column of a table different from the one that executes the trigger, will the DEFAULT setting for the UPDATE statement trigger a timestamp with the ON UPDATE CURRENT_TIMESTAMP? As always your wisdom would be well-appreciated. Roddy
  22. How to compare two numbebrs

    Hi, First I will have to read a value. Then read first two characters of the value. Then compare the value to see it it is greater than 8. First two characters sometimes can be null, string, alphanumeric or numeric. miless = "2mile(s)" myMile = mid(miless,1,2) print myMile If myMile>8 then print "a>b" End If It is always returning true even though first two characters are not numbers or less than 8. How can I do it?
  23. why the damn (')?

    ORDER BY order You should have noticed that when you were writing the code, ORDER is obviously a reserved word. If you're going to use reserved words as identifiers then you need to surround them with backticks so that MySQL knows you are referring to an identifier instead of the reserved word.
  24. How Is W3Schools Now ?

    i like the place no matter how it looks one possible reason might be relate to the latest php update a lot of sites had troubles
  25. loop input for each string

    Well i don't understand that? I ran the code with submit and it ran fine! That suggests you are gathering all the values and placing in a single input?
  26. loop input for each string

    ok I've wrong with the submit button, now the input appears with the string like this,
  27. why the damn (')?

    'order' or ORDER? 'order' is the problem, it is treated as SQL ORDER and in the wrong position, therefore an error is produced. even 'name' and 'level' are keywords, with as mentioned order being reserved https://dev.mysql.com/doc/refman/5.7/en/keywords.html#keywords-5-7-detailed-N
  1. Load more activity