Web Dialog and HTML (datalist)


#1

In Sketchup WebDialog does not work datalist:
>

       <datalist id='Door_type'> 
       <option value='spf_110'>
       <option value='spf_210'> 
       <option value='spf_310'>
       <option value='spf_320'> 
       <option value='spf_410'>
     </datalist>	

In chrome it is works properly.

Do you have any ideas why?


#2

Standards information from the <datalist> page:

HTML5 and MS IE 10 min.

Ref: https://msdn.microsoft.com/en-us/library/hh772925(v=vs.85).aspx

SketchUp may be setting the IE emulation to something pre-10.
HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Main\FeatureControl\FEATURE_BROWSER_EMULATION

https://msdn.microsoft.com/en-us/library/ee330730(v=vs.85).aspx#browser_emulation


WORKAROUND

Use <optgroup> in a <select> element instead. It only requires HTML v4.01:

<select>
  <optgroup label="Alkaline Metals">
    <option>Lithium (Li)</option>
    <option>Sodium (Na)</option>
    <option>Potassium (K)</option>
  </optgroup>
  <optgroup label="Halogens">
    <option>Fluorine (F)</option>
    <option>Chlorine (Cl)</option>
    <option>Bromine (Br)</option>
  </optgroup>
</select> 

#3

[quote=“mamjankowski, post:1, topic:26881”]
Do you have any ideas why?
[/quote]IE…

tags work in both IE and Safari…

dan beat me to it…

john


#4

I have changed value in registry to “Internet Explorer 11” (was IE9) and now it works quite well.
Thanks Dan!


#5

Good. But,… you cannot expect the average user to be able to change that, and … the setting is likely optimized for the current behavior of the internal webdialogs for Trimble EW and 3DW.

You might also be able to use a higher document compatibility mode with a <meta> tag in the <head> element.

see:


WebDialog doesn't display images
#6

Dan, of course, you’re right. As usual;-)
I added to html something like that:
> <meta http-equiv='X-UA-Compatible' content='IE=EmulateIE10'>
and I changed registers to IE version 9999.
And everything works properly.
By the way do you remember what registration should be for Sketchup 15.2.685 65 bit?


#7

I think browser emulation has been set to 0x270F (9999) since SketchUp stopped supporting Windows XP, which was v 15.0.


WebDialog doesn't display images
#8

I have the same problem but on Mac/Chrome. Datalist does not work. Setting the document compatibility mode seems to be a Windows thing and optgroup does not provide the filtering functionality I need. Any thoughts?


#9

datalist doesn’t work in Chrome Embedded Framework used by SU…

it is to do with Chrome [not CEF] adding it as part of autocomplete…

you can use Ruby to emulate it…

john


#10

Before suggesting any thoughts, it would be helpful if you first tell whether you are using a UI::WebDialog or UI::HtmlDialog (SketchUp 2017+) and which SketchUp version…


#11

htmlDialog.

…ongoing discussion at: