-
Posts
31,575 -
Joined
-
Last visited
-
Days Won
77
Content Type
Profiles
Forums
Events
Everything posted by justsomeguy
-
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
- 3 replies
-
- 1
-
- javascript
- object
-
(and 1 more)
Tagged with:
-
That example works, so you need to provide more information.
-
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.
-
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
- 4 replies
-
- javascript
- php
-
(and 1 more)
Tagged with:
-
Automatic upgrade to HTML5 from HTML4.01
justsomeguy replied to Herb O. Buckland's topic in Suggestions
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. -
What happens when you run that? What exactly are you having problems with?
-
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.
-
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.
-
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.
-
Check your browser console for error messages, you'll see that "Confirm" is not defined.
-
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.
- 4 replies
-
- localstorage
- storage
-
(and 1 more)
Tagged with:
-
Use a server-side language and a database.
- 4 replies
-
- localstorage
- storage
-
(and 1 more)
Tagged with:
-
The window object is just window. Javascript does not have access to the actual browser process or any of the chrome or other controls.
- 2 replies
-
- javascript
- window
-
(and 1 more)
Tagged with:
-
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.
-
Are these websites Genuine (or related to w3schools)?
justsomeguy replied to B. Goswami's topic in General
I wouldn't expect any others to be related, people always try to sponge off of well-known names. -
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.
-
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.
-
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.
-
It looks like you're trying to use variables like qty_1 and qtyact_1 that aren't defined.
-
What SQL language is this? In which product can I use it?
justsomeguy replied to pzambrano7's topic in SQL
Most databases support creating procedures. -
It doesn't send the file to the browser, it just saves it in the same directory as that PHP file.
-
No, I don't use Apple products.
-
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.
-
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
-
I think the body element is used for scrolling, if that doesn't work try just the html element.