How to parse the DOM of a page on another domain [closed] - html

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 8 years ago.
Improve this question
I've been having a lot of trouble parsing the DOM of a remote webpage using AJAX. I don't seem to be able to find any example or tutorials demonstrating this procedure.
I basically want to search through the DOM of a remote page, find a tag with a specific id/class, take the inner contents of that tag and print it out on my own page.
If anyone can help i'd appreciate it.

The same-origin-policy browsers have do not allow you to access external pages for security reasons. You need to use e.g. a PHP script on your server to retrieve the external site's HTML. Then you can make an AJAX call to that script instead.

You could always use this: http://simplehtmldom.sourceforge.net
Easy to use.

Related

How to write for auto update [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 2 years ago.
Improve this question
(I'm new to all this... instead of closing my question, it would help if I could have an idea of what needs to be done) (please excuse if I'm not asking the proper question for what I'm trying to achieve, new to code)
New to coding: web development Learning HTML, CSS and then JS.
I see websites where data is automatically updated. How is this achieved?
I would like to create a website that will display economic data but not have to manually input the data. How would I incorporate code to automatically do this for me?
Would I use a websites API?
Example of the type of information I would like to display on my own website: https://www.marketwatch.com/economy-politics/calendar
Automatically updated data on a website can be achieved by using an API call. You make a request to an API that has the data and then render the data on your HTML page.
The process requires a good understanding of modern JS concepts.
Search for an API that offers the service you need and read the documentation to understand how to use it.
Let me know if there' anything else.

how to make gmail confirmation for my website? [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 2 years ago.
Improve this question
Anybody know how to do like this one?(refer to image)i want to make something like this(refer to image) for gmail confirmation on my website, but i don't know where to start.
sample image
This is a broad question, but I'll try to provide some help to get you started.
If you are referring to how to send an email from a website in general, you need to use a script to do so. How you do this is highly dependent on how you are hosting your website. If you are using Node.js, you could take a look at Nodemailer. You will have to do a bit of research with respect to what you are using to host your website.
You would also need some code to generate a link for each users email.
If you are rereferring on how to style email, you can do this with standard HTML and CSS. As far as I know, there is unfortunately no good method to insert HTML source code using Gmail.

How to make an executable game accessible for users to play online [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 6 years ago.
Improve this question
There's a little .exe file which contains a game I want to make available on a website (pure HTML), but I don't know how to do it.
What I want to achieve is: when clicked, users shouldn't have to install it but be able to play it on the site.
You can't use or run executables with html. Html and js can not modify directly contents in your PC and use system functions, they can do what they are allowed to by the browser, that communicates with the system and restricts some functioning.
That is why they can be considered "virtual" - they run on the browser that take care of their parsing and viewing.
For the same way you can't either embed it, since embedding requires the ability to run it.

How to have a a url be like example.com/projects/projectName? [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 7 years ago.
Improve this question
I would like to know how I can have a website that has links to deeper pages like so: www.example.com/ then I click on "Projects" (that becomes www.example.com/Projects) and then I click on a project (Which now becomes www.example.com/Projects/projectName/) How would I do that??? Please help, I really need these.
EDIT: Why are people down voting my question?
This is usually done with folders.
When you open www.example.com/Projects you are actually accessing www.example.com/Projects/index.html then let's say you want to access the project the folder Foobar so you type in www.example.com/Projects/Foobar/ and you are served www.example.com/projects/Foobar/index.html
However this can also be done with PHP URL rewriting and the use of a .htaccess fie.
Also when linking make sure that you start with a backslash (Absolute URLs) e.g.
href="/projects/test"
If the link was to "projects/test" and you were on that page then if you clicked on that link you would be taken to "projects/test/projects/test"
Well, usually to write a Web page you should learn html and then css. While learning html you will learn how to create a link.
In html a link is such as
my link

Anything Else Like An Iframe? I want to do Whatever we can do with Iframe [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 9 years ago.
Improve this question
Really, i like to use iframe. because iframe will reduce the transferring data between server & client. We can display the static contents in out of iframe & dynamic content in iframe. But many developers are saying "iframe isn't good". I don't know whether it's correct or not. If anybody know about iframe please don't forget to answer. and i need to know any other ideas such as iframe.
Just use ajax (XMLHttpRequest). You can send/receive requests from the client and server without the use and problems that come with iframes.
Probably I would recommend SPA.