0

JavaScript HTML DOM problem

https://code.sololearn.com/W7Ty7cH0Cpq8/?ref=app Can't get the javascript to see my html. What's wrong?

3rd Aug 2020, 9:49 PM
Eric Geiger
Eric Geiger - avatar
12 Answers
+ 1
But I have sent it in previous post see up my second message in this post
4th Aug 2020, 3:21 AM
Divya Mohan
Divya Mohan - avatar
+ 1
Now check that my code it's all set
4th Aug 2020, 2:56 AM
Divya Mohan
Divya Mohan - avatar
+ 1
Isn't it working good ???
4th Aug 2020, 2:57 AM
Divya Mohan
Divya Mohan - avatar
0
Would you explain what are you expecting from the code differ to the result
4th Aug 2020, 1:50 AM
Divya Mohan
Divya Mohan - avatar
0
I have just caught these faults 1. You have define email and emails while both is same So comment all commands related emails. 2. Var test = document.getElementById("test").innerHTML = preferred contacts.value You can't use two = in same line Just remove var test = And make it document.getElementById("test").innerHTML = preferred contacts.value 3.comment the whole change function (don't know why you have define it); And yes change getElemenstByName. To getElementById for defining Prefferedcontacts and emails. Then hope you will get it work.
4th Aug 2020, 2:29 AM
Divya Mohan
Divya Mohan - avatar
0
Divya Mohan the goal is to have each field disappear/reappear as the drop-down selection is chosen. I had the two functions, as a test to make sure and see if it was a making issue, that it might have been having.
4th Aug 2020, 2:38 AM
Eric Geiger
Eric Geiger - avatar
0
Divya Mohan The test variable is obviously just that. Just to test to see what the output of the drop-down selection is showing.
4th Aug 2020, 2:39 AM
Eric Geiger
Eric Geiger - avatar
0
Do you want it to work like this https://code.sololearn.com/Wgell7rx28nG/?ref=app
4th Aug 2020, 2:44 AM
Divya Mohan
Divya Mohan - avatar
0
Divya Mohan yes, but their is a flaw in it. It is displaying the email field, instead of the telephone field.
4th Aug 2020, 2:50 AM
Eric Geiger
Eric Geiger - avatar
0
Divya Mohan And the test variable keeps getting stuck. It sticks to one choice, even after changing the drop-down selection choice.
4th Aug 2020, 2:53 AM
Eric Geiger
Eric Geiger - avatar
0
Divya Mohan could you post what you did, please. So that I can mark it.
4th Aug 2020, 3:18 AM
Eric Geiger
Eric Geiger - avatar
0
How to open next level of html
4th Aug 2020, 10:49 PM
Shahin Banu