Hi guys,
please, how can i add āpasswordā to āusernameā in
document.getElementById(āu_nameā).innerText = ${currentUser.get('username')}
i try to show them in the same field.
Thank you
Hi guys,
please, how can i add āpasswordā to āusernameā in
document.getElementById(āu_nameā).innerText = ${currentUser.get('username')}
i try to show them in the same field.
Thank you
You canāt show the userās current password (it is hashed in the server database) if thatās what youāre trying to do.
Otherwise you can just add another value at the end:
document.getElementById("u_name").innerText = `${currentUser.get('username')} test`
Thank you,
opps forget about the password, it was a mistake from me to give it as exampleā¦i was tired yesterday
i try to show the āusernameā+ @ + āzoneā in the same span
to show this in final
jhon@zone1
document.getElementById(āu_nameā).innerText = ${currentUser.get('username')}
Thank you again
Then you can do
document.getElementById("u_name").innerText = `${currentUser.get('username')}@zone`
Or so itās a bit clearer
document.getElementById("u_name").innerText = currentUser.get('username') + "@zone"
Thank you Glad
sorry to not been clear in my question. āzonenumberā is a value too . only @ is a text .
my problem is how to show the two values in the same html line
username@zonenumber
example
tar@zone12
is this correct this way?
document.getElementById("userID").innerText = currentUser.get('username') + "@" ('zone')
Thank you Glad
Then you just add that variable to the end - itās not any different from your use of currentUser.get('username')
.
document.getElementById("u_name").innerText = currentUser.get('username') + "@" + zonenumbervariable
is it correct this way?
document.getElementById("userID").innerText = currentUser.get('username') + "@" + ('zone')
āzonenumberā is a value too . only @ is a text .
What you posted will just do text like @. If zonenumber is a variable (that has a value), then use that last example I posted.
I suggest reading this tutorial.
thank you Glad.
this is for a registration form.
username
password
zonenumber
after login in . i try to show the username@zonenumber in dashboard
i made it by making
tow lines of code
one for username
document.getElementById("u_name").innerText = currentUser.get('username')
and one for the zonenumber
document.getElementById("z_num").innerText = currentUser.get('zonenumber')
then put them side by side in html.
but if is it possible to put them in one JS line it will be fine
document.getElementById("userID").innerText = currentUser.get('username') + "@" +....
Thanks again
document.getElementById("userID").innerText = currentUser.get('username') + "@" + currentUser.get('zonenumber')
oh Thank you Glad!! this is what i try to do.
see you Mage