How to show Multiple page having same content.? - javascript

I am creating a simple website which basic e-commerce website.it consist of product dropdown.on which multiple products display.like this.
My question is I have to make html pages for every product?(Keeping in mind layout and everything is same just content is different).
Is there any solution i can make only single page.and display product when i click on particular category.

Related

Multiple Record Lines

I want to add multiple records in the registration screen. For example, when adding a price menu, there are columns such as "price","menu name","menu description". I want to design a multi-product page and have the user enter more than one record on the same page. I know how to do this while saving it to the database. I am a Net Core expert. But on the razor page side, that is, on the html side, I don't know how to design it. For this, if there is a javascript module or library that will make my job easier, could you please share it with me? What I need is an html page with multiple data entries.

Javascript, cannot change product pages dynamically

I am teaching myself Javascript at the moment and I am creating a small website project for fun. My issue is:
I have a homepage that has a button in a navbar called "Products". When I press it, I am redirected in a page where I have a grid layout with 5-6 categories (as images). When I press the images, I am redirected to the relevant products. For example Products > Cars > Fiesta 2009 and more cars.
The thing is that for every different product category I have a different HTML page, but I know that I can just have an HTML page and change its content dynamically(DOM). Is there a good guide that describes this specific functionality? I have tried many different approaches but I don't really know how to do that and my site doesn't work.
Posting it after 15 hours on working on my code and not finding a solution myself*
You can consider using a UI framework/library such as ReactJS, Angular ...
Then use a routing handler (react-router, #angular/router ...).
Another alternative is to use plain javascript (VanillaJS).
I submitted a sample few days ago nearly around this topic.

Dealing with search results and bootstrap modal

I have a php file that searches for a keyword in a MySQL database table. This script builds a page with a lot of products organized by brands… When you click a product it shows a bootstrap modal with more info (calling another php file that looks for the particular id of the product). The modal has two buttons and needs to be able to go to the previous and the next product of that brand and this buttons should be disable when reaching the first or last product.
This is what I’ve been doing:
While inserting the data from the products in the page I generate an XML file with all the brands and inside each brand, all the ids of the DIVs corresponding to the product. Then I have to build arrays in Javascript to handle this data. The code is getting really messy so I’ve been wondering:
What’s the best way to link all the products so I can go back and forward in my modal?
I ended up building something like this:
<div id='231' data-brand='somebrand' data-brand-index='3'>
then i can get the id with jquery:
var x = $("div[data-brand='somebrand'][data-brand-index='2']");
alert(x.attr("id")); //shows 231

real-time html links on github pages?

Is there a way you could render links as a streaming data input w/ css/html or js?
Ex: say you have 10 github repos. and you want them all to appear on your webpage in a dropdown(as a series of links). Then user deletes one so only 9 should appear. Is there a name for this or is this possible? *assuming this is being done with github pages.

dynamically embedding a surveymonkey survey into a div

Let's say I made around 5 surveys on surveymonkey, and I am using a developer surveymonkey account to try and manipulate these surveys.
My end goal is to dynamically give them a survey based on what actions they took on a page. Let's just say for a brief example there are 5 buttons they can press, and on each, a new, different survey would appear in a sidebar or something along those lines
I can use their API to return details of the surveys in my account, but I can't seem to find a way to add a new collector or dynamically embed one of my surveys.
Is there a way to go about this?

Categories

Resources