#How to pass a value to a request

1 messages · Page 1 of 1 (latest)

mystic mica
#

Hello, im trying to do the color scheme generator but idk how to pass the hex code i get from the color input value and the mode value to pass it to the api, i do get the value as you can see in the console but i don't know how to pass it to get a color scheme around that color, if i try ${colorScheme.value} and ${mode} i get an error

#

i did finally passed the mode value but the color value just dosent work

swift totem
#

It looks like colorScheme and mode are HTML elements in the DOM. Don't you want to get the values in those elements and send that data in the API call?

mystic mica
#

i do get the values from colorScheme and mode from the dom as you can see in the console, i succesfully used the values from the mode but cant use the values of the colorScheme, it just dosent work idk why

mystic mica
#

i did it, i forgot a & before mode=${mode} 6680_this_is_fine i searched for 3 hours why it dosen't work because the mode value was working but that one didn't 🙂

#

i kept the document.getelementById on the cholorScheme and added it to the api cal as cholorScheme.value.slice(1) to get rid of the #

swift totem
mystic mica
#

i did it its working now