Jump to content

justsomeguy

Moderator
  • Posts

    31,575
  • Joined

  • Last visited

  • Days Won

    77

Everything posted by justsomeguy

  1. It sounds like you think your code is the same as this: var jsonLikeObj = { getFoo: { value: function() { return this.foo = 1; }, enumerable: false } }; It's not, that's not what Object.create does. That second parameter is a description about how to create the object, it's not the actual object. jsonLikeObj.getFoo.enumerable is also undefined. Why? Because that's not the actual object, it's the specification for the object. It's metadata. https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/create
  2. That example works, so you need to provide more information.
  3. You can use a search and replace with a regular expression, several text editors offer that. You can make a web page and send an ajax request for the file, but Javascript isn't going to be able to save a file on your computer.
  4. Then you need different Javascript, don't you, because that's the value that gets submitted to the server. Put the eventname there if that's the value you want to submit to PHP, and use data attributes to store the other data instead of trying to cram all of the data in the value attribute. https://developer.mozilla.org/en-US/docs/Learn/HTML/Howto/Use_data_attributes
  5. That's a pretty serious AI you're suggesting that can figure out what the developer intended and write the appropriate code. It's not just about copying and pasting changes, it's different code to do the same thing, which means you need software to figure out what they meant to do.
  6. What happens when you run that? What exactly are you having problems with?
  7. I don't know how often the site gets updated, but in the past there have been problems with things that were out of date, or using bad examples.
  8. Neither of those match. You're telling it to look for "inst" between word boundaries, followed by a comma. That would match "inst:,", but not what you have.
  9. If you right-click on each of those and select Inspect Element, you can see the list of styles that are applied to it. The ones on top don't have any extra styles applied.
  10. Check your browser console for error messages, you'll see that "Confirm" is not defined.
  11. I don't know, I don't know what you did. It's pretty basic as far as programming goes, though. You can use ajax to send requests to the server with the data you want to save, and use ajax to read the data from the server and do whatever you want with it. On the server you either just get the data and save it, or read it and output it. Relative to programming, it's about as basic as it gets.
  12. Use a server-side language and a database.
  13. The window object is just window. Javascript does not have access to the actual browser process or any of the chrome or other controls.
  14. If all of the files are static then your only option is to change the actual files. You can use some Javascript to display some sort of message and set a cookie or something in localStorage to say not to show it again.
  15. I wouldn't expect any others to be related, people always try to sponge off of well-known names.
  16. It sounds like one of your functions isn't working right, but you didn't show the code for those functions. It's best to just copy and paste your code into a code block here in the forum.
  17. If there's a problem with the headers you should be able to open that script in a browser to see the error messages. Trying to send a header if they've already been sent will give you a warning and tell you where the first output was. You can also use an error log and check that.
  18. Don't assume that just because you put an ID on an element, that the browser will make a Javascript object for it. Get the element with document.getElementById.
  19. It looks like you're trying to use variables like qty_1 and qtyact_1 that aren't defined.
  20. It doesn't send the file to the browser, it just saves it in the same directory as that PHP file.
  21. No, I don't use Apple products.
  22. I'm not sure what else it would be, there might be another animation playing still. It seems like there are competing animations. The fact that it doesn't do it if you wait (presumably until after any animations finish) suggests that's the issue.
  23. If you have the invoice date then you can use datediff to compare it with another date to see how far it is: https://docs.microsoft.com/en-us/sql/t-sql/functions/datediff-transact-sql?view=sql-server-2017
  24. I think the body element is used for scrolling, if that doesn't work try just the html element.
×
×
  • Create New...