function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Vandana Rattan 4Vandana Rattan 4 

Salesforce1 HTML select onChange function not working in Salesforce1 IPAD app

I have created an HTML5 VF page to be used in Salesforce1 app. It has a select list Called Event Name with values:

Presenation
Lecture
Other

There is another text field called Type. This has to be displayed only if Event Name is Presenation. Otherwise it should be hidden. I implemented it using onChange event for the select list. It works perfectly if I run the page using https://[InstanceName].salesforce.com/one/one.app

But when I try to access the page using Salesforce1 IPAD app the page hangs. Kindly Suggest. Code:
 
HTML

<select name="EventName" id="EventName" data-mini="false" onChange='CheckEvent(this.value)'>
               	
               <option value="Presentation">Presentation</option> 
  	       <option value="Lecture">Lecture</option>
                <option value="Other">Other</option> 
</select>

<input name="Type" for="Type" id="Type" style='display:block;'> </input>
 
JS

function CheckEvent(val){
       
     var element=document.getElementById('Type');
       
     if(val=='Presentation'){
       
       element.style.display='block';
     }
     else{
         
         element.value='';
       element.style.display='none';
     }
    }

 
kgilkgil
I took a few minutes and tried your code out in my own demo org. This code works as described in one.app, my iPhone, and my iPad. Have you tested this code as the only thing on the Visualforce page, or do you have other code in place? 

Just to cover some basics:
- Ensure you are on a supported device and OS (iOS 8+).
- Check for any Salesforce1 updates.
- Fully restart Salesforce1 (double-tap home button and swipe app up off screen).

Salesforce1 requirements for reference:
https://help.salesforce.com/apex/HTViewHelpDoc?id=sf1_requirements.htm&language=en_US

Try these steps and also use this code in a blank Visualforce page to test again if there is other code in place.

When the page hangs, are you saying that you are able to change the select list value but the input field does not hide/show? Or do you mean you cannot even use the select list to pick a value?