You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In this UI i have a drop down . user will select the value of dropdown and submit and that dropdown value will reflect in python console.
but i am unable to receive value from javascript
this is my python code:
from random import randint
import eel
eel.init("web")
# Exposing the random_python function to javascript
@eel.expose
def random_python():
print("Random function running")
return randint(1,100)
@eel.expose
def getList():
lst = ["a","b","c","d"]
return lst
eel.spawn(eel.js_myval()())
eel.start("index.html")
this is my javascript:
let lst =document.getElementById("cate")
document.getElementById("submit").addEventListener("click",()=>{
eel.expose(js_myval)// here i am using eel expose
function js_myval(){
return lst.value;
}
})
i am creating a GUI using python EEL
In this UI i have a drop down . user will select the value of dropdown and submit and that dropdown value will reflect in python console.
but i am unable to receive value from javascript
this is my python code:
this is my javascript:
this is my html:
The text was updated successfully, but these errors were encountered: