0
Hello, I have an input field in my HTML, I want to make that depending on the typed text, it goes to page x or y. I also need that depending, go to a page and on this page change the src of an image to a specific path.
I thought to use a javascript and take the entered value and change the value of a variable, with this do a series of comparisons with ifs or whiles and when the value is equal to the correct name it goes to page x.
I know there are a lot of frameworks out there that would make the process easier, but I’m new and I’m trying to take it one step at a time.
NOTE: pages x and y are pages inside the project folder and not internet urls.
Page x or y differ only in
src
of an image? or there are more differences?– Sergio
then, are different pages, with a different body. but the head, css, javascript or msm.
– Guilherme S. Santos
wanted something like
if (var = sanduíche) {vai para pagina tal} else if (var = salamandra) {vai para outra página e nessa página mude a src da imagem para o caminho tal}
It would be great to record this variable in cache, not in a database. since the msm site will be used by more than one person, and need to operate independently.– Guilherme S. Santos