Web Dialog

advice

#1

Good evening to everyone

I am converting some parametric plugins (parametric.rb) from imput type dialog box to Web Dialog in order to implement different languages. However, I have a problem of visualization that does not depend on the PC or the version of Sketchup, in practice wrapped it happens that the web dialog appears empty and passing on it with the mause you discover the fields of imput. pressing the F5 key solves the problem momentarily.


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><title>SOFTDEG_vetrate</title>

<style type="text/css">

body {
	background-color: #fff;
	font-family: Arial,Helvetica;
	font-size:10pt;
	margin:0px;
	padding:20px;
}

table {
	font-size:10pt;
}

input {
	border-color:#aaa; 
	border-style:solid; 
	border-width:1px; 
	font-size:10pt;
}

button {
	border-style:outset; 
}

  </style></head><body>
<table style="text-align: left; width: 821px; height: 365px;" border="0" cellpadding="2" cellspacing="2">

  <tbody>
    <tr>
      <td style="vertical-align: top;">
      <table id="settings" style="padding: 3px; margin-top: 3px; margin-bottom: 3px; height: 645px; width: 507px;">
        <tbody>
          <tr style="background-color: rgb(238, 238, 238); width: 406px;">
            <td style="width: 349px;">01 - Larghezza</td>
            <td style="width: 119px;"><input id="w" value="" type="text"></td>
          </tr>
          <tr>
            <td style="width: 349px;">02 - Altezza - (compreso spessore
soglia)</td>
            <td style="width: 119px;"><input id="h" value="" type="text"></td>
          </tr>
          <tr style="background-color: rgb(238, 238, 238);">
            <td style="width: 349px;">03 - Inverti misure
Larghezza/Altezza <br>
            <div style="text-align: right;">(0=No/1=Si)</div>
</td>
            <td style="width: 119px;"><select id="g" size="1" style="width: 100%;"></select></td>
          </tr>
          <tr>
            <td style="width: 349px;">04 - Intradosso - Esterno </td>
            <td style="width: 119px;"><input id="ie" value="" type="text"></td>
          </tr>
          <tr style="background-color: rgb(238, 238, 238);">
            <td style="width: 349px;">05 - --------------- - Interno
(compreso infisso)</td>
            <td style="width: 119px;"><input id="ii" value="" type="text"></td>
          </tr>
          <tr>
            <td style="width: 349px;">06 - Infisso - Spessore</td>
            <td style="width: 119px;"><input id="sf" value="" type="text"></td>
          </tr>
          <tr style="background-color: rgb(238, 238, 238);">
            <td style="width: 349px;">07 - --------- - ProfonditĂ 
Incasso </td>
            <td style="width: 119px;"><input id="pif" value="" type="text"></td>
          </tr>
          <tr>
            <td style="width: 349px;">08 - Destra - Sguancio Interno
(infisso) </td>
            <td style="width: 119px;"><input id="dx_si" value="" type="text"></td>
          </tr>
          <tr style="background-color: rgb(238, 238, 238);">
            <td style="width: 349px;">09 - --------- - Sguancio Esterno
(filo parete) </td>
            <td style="width: 119px;"><input id="dx_se" value="" type="text"></td>
          </tr>
          <tr>
            <td style="width: 349px;">10 - Sinistra - Sguancio Interno
(infisso) </td>
            <td style="width: 119px;"><input id="sx_si" value="" type="text"></td>
          </tr>
          <tr style="background-color: rgb(238, 238, 238);">
            <td style="width: 349px;">11 - ----------- - Sguancio
Esterno
(filo parete) </td>
            <td style="width: 119px;"><input id="sx_se" value="" type="text"></td>
          </tr>
          <tr>
            <td style="width: 349px;">12 - Alto - Sguancio Interno
(infisso) </td>
            <td style="width: 119px;"><input id="top_si" value="" type="text"></td>
          </tr>
          <tr style="background-color: rgb(238, 238, 238);">
            <td style="width: 349px;">13 - ------ - Sguancio Esterno
(filo parete) </td>
            <td style="width: 119px;"><input id="top_se" value="" type="text"></td>
          </tr>
          <tr>
            <td style="width: 349px;">14 - Basso - Sguancio Interno
(infisso) </td>
            <td style="width: 119px;"><input id="bot_si" value="" type="text"></td>
          </tr>
          <tr style="background-color: rgb(238, 238, 238);">
            <td style="width: 349px;">15 - --------- - Sguancio Esterno
(filo parete) </td>
            <td style="width: 119px;"><input id="bot_se" value="" type="text"></td>
          </tr>
          <tr>
            <td style="width: 349px;">16 - Soglia - Sporgenza Esterna e
Laterale </td>
            <td style="width: 119px;"><input id="dav_spe" value="" type="text"></td>
          </tr>
          <tr style="background-color: rgb(238, 238, 238);">
            <td style="width: 349px;">17 - --------- - Sporgenza
Interna </td>
            <td style="width: 119px;"><input id="dav_spi" value="" type="text"></td>
          </tr>
          <tr>
            <td style="width: 349px;">18 - --------- - Spessore </td>
            <td style="width: 119px;"><input id="dav_th" value="" type="text"></td>
          </tr>
          <tr style="background-color: rgb(238, 238, 238);">
            <td style="width: 349px;">19 - --------- - Tipologia <br>
            <div style="text-align: right;">(0=Piana/1=Sovrapposta)</div>
</td>
            <td style="width: 119px;"><select id="t" size="1" style="width: 100%;"></select></td>
          </tr>
          <tr>
            <td style="width: 349px;">20 - Incasso Sotto Soglia -
ProfonditĂ  </td>
            <td style="width: 119px;"><input id="dav_i" value="" type="text"></td>
          </tr>
          <tr style="background-color: rgb(238, 238, 238);">
            <td style="width: 349px;">21 - Rimuovi Veletta Pavimento <br>
            <div style="text-align: right;">(0=No/1=Si)</div>
</td>
            <td style="width: 119px;"><select id="r" size="1" style="width: 100%;"></select></td>
          </tr>
          <tr>
            <td style="width: 119px;" colspan="2">&nbsp;<br>
            </td>
          </tr>
          <tr>
            <td colspan="1" style="text-align: center; width: 349px;"><input value="Chiudi" onclick="window.location='skp:close@'" type="button"></td>
            <td style="vertical-align: top; text-align: center; width: 119px;"><input value="Applica" onclick="window.location='skp:submit@'" type="button"></td>
          </tr>
        </tbody>
      </table>
      </td>
      <td style="text-align: center;"><img src="Sguanci_img.jpg" alt="" style="padding: 3px; margin-top: 5px; margin-bottom: 3px; width: 376px; height: 606px;" align="middle"><br>
      </td>
    </tr>
  </tbody>
</table>

<script>
window.location="skp:populate@";
</script>
</body></html>

#2

I cannot reproduce it, for me the html displays completely. It looks more like a rendering problem in your browser.

  • Have you tried different doctypes?
  • Have you tried UI::HtmlDialog, which uses a different rendering engine? Possibly the same problem does not occur in both at the same time.

You should also add a <meta charset="utf-8" /> in the head, so that the browser is forced to dispay characters from the charset in which you provided the string (utf-8), otherwise old-fashioned browsers (like IE) default to a local charset and may display à instead of à.


#3

if you really are still using SU v8, there where a host of IE and Safari issues that required very specific ‘hacks’…

search for the ‘compatibility mode’ meta that was often needed…

john


#4

Buonasera, il problema è che l’errore di visualizzazione non si verifica sempre,
ad esempio tre o quatto volte va bene e una no ( sia in modalitĂ  Create che in modalitĂ  Edit).
Allego il plugin per le verifiche. ringrazio anticipatamente per la collaborazione.
SOFTDEG_sguanci_v1.20.rbz (502.5 KB)


#5

your html isn’t properly encoded…

all the ¿ chars can break html, most editors have a zap gremlins function to fix them, or set it to use unix line endings…

john


#6

Could it be that these are just DOS line endings (two character \r\n)? But I haven’t seen that an editor represents them as ¿. One could argue about what is the right way, but I personally find the more logical line ending style is \n (one thing one character). But DOS line endings do no real harm, and it should work as it is.

For me the dialog content renders in both WebDialog and HtmlDialog. I would be interested how it works for you when you use a UI::HtmlDialog?

And in many languages, molto bene!