jQuery UI Widgets Forums General Discussions input field – with source property set – on window

This topic contains 4 replies, has 3 voices, and was last updated by  mathygreen 1 year, 11 months ago.

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author

  • Bobo
    Participant

    Hi to all.
    I have an input field with source property set. When i type some value into the field, the list of values appears but it’s hidden behind the window.
    Is there a solution?


    Hristo
    Participant

    Hello Bobo,

    It is important when creating a widget inside the jqxWindow to use the initContent callback.
    Please, take a look at this demo.

    Best Regards,
    Hristo Hristov

    jQWidgets team
    https://www.jqwidgets.com


    Bobo
    Participant

    Below my code, where is the issue??

    $(“#tblRelazioni”).jqxGrid({
    width: ‘99%’,
    height: tHeight,
    source: relSogAdapter,
    rowsheight: rowsH,
    columnsresize: true,
    sortable: true,
    editable: true,
    filterable:true,
    theme: style,
    localization: getLocalization(‘it’),
    selectionmode: ‘singlerow’,
    columns: [
    {text: ‘Anno’, datafield: ‘ANNO’, columntype: ‘int’, editable:false, hidden: true } ,
    {text: ‘Sog.’, datafield: ‘ID_SOGGETTO’, columntype: ‘int’, editable:false, hidden: true} ,
    {text: ‘Sog.’, datafield: ‘ID_SOGG_PAR_TUT’, columntype: ‘int’, editable:false, hidden: true} ,
    {text: ‘TipoSogg.’, datafield: ‘CD_TIPO_SOGGETTO’, columntype: ‘int’, editable:false, hidden: true} ,
    {text: ‘Rel.’, datafield: ‘ID_RELAZIONE’, columntype: ‘int’, editable:false, hidden: true} ,
    {text: ‘Relazione’, datafield: ‘DS_RELAZIONE’, columntype: ‘int’, editable:false, hidden: false, width: ‘10%’} ,
    {text: ‘Codice fiscale’, datafield: ‘CF’, columntype: ‘string’, editable: false, hidden: false, width: ‘20%’} ,
    {text: ‘M12’, datafield: ‘FL_MOD12’, columntype: ‘checkbox’, editable: true, hidden: false, width: ‘5%’} ,
    {text: ‘Nome’, datafield: ‘NOME’, columntype: ‘string’, editable: false, hidden: false, width: ‘13%’} ,
    {text: ‘Cognome’, datafield: ‘COGNOME’, columntype: ‘string’, editable: false, hidden: false, width: ‘13%’} ,
    {text: ‘Nato il’, datafield: ‘DT_NASCITA’, columntype: ‘date’, cellsformat: ‘dd/MM/yyyy’, width: “13%”, editable:false },
    {text: ‘CdNas’, datafield: ‘CD_COMUNE_NAS’, columntype: ‘string’, editable: false, hidden: true, width: ‘15%’} ,
    {text: ‘A’, datafield: ‘DS_COMUNE_NAS’, columntype: ‘string’, editable: false, hidden: false, width: ‘15%’} ,
    {text: ‘CdRes’, datafield: ‘CD_COMUNE_RES’, columntype: ‘string’, editable: false, hidden: true, width: ‘15%’} ,
    {text: ‘Residente a’, datafield: ‘DS_COMUNE_RES’, columntype: ‘string’, editable: false, hidden: false, width: ‘15%’} ,
    {text: ‘Indirizzo’, datafield: ‘INDIRIZZO_RES’, columntype: ‘string’, editable:false, width: “15%” },
    ],
    showtoolbar: true,
    rendertoolbar: function (statusbar) {
    var container = $(“<div style=’overflow: hidden; position: relative; margin: 5px;’></div>”);
    var addButton = $(“<div style=’float: left; margin-left: 5px;’><span style=’margin-left: 4px; position: relative; top: -3px;’>Nuovo</span></div>”);
    var deleteButton = $(“<div style=’float: left; margin-left: 5px;’><span style=’margin-left: 4px; position: relative; top: -3px;’>Elimina</span></div>”);
    var viewRelButton = $(“<div style=’float: left; margin-left: 5px;’><span style=’margin-left: 4px; position: relative; top: -3px;’>Vai a…</span></div>”);
    container.append(addButton);
    container.append(deleteButton);
    container.append(viewRelButton);
    statusbar.append(container);
    addButton.jqxButton({ width: 60, height: 20 });
    deleteButton.jqxButton({ width: 65, height: 20 });
    viewRelButton.jqxButton({ width: 65, height: 20 });
    addButton.click(function (event) {
    var offset = $(“#tblRelazioni”).offset();
    $(“#relazioniPopup”).jqxWindow({
    position: { x: parseInt(offset.left) + 5, y: parseInt(offset.top) – 100 },
    width: 280,
    resizable: false,
    isModal: false,
    autoOpen: false,
    cancelButton: $(“#relazioniCancel”),
    modalOpacity: 0.01,
    theme: style,
    initContent: function () {
    $(“#flM12”).jqxCheckBox({ width: ‘100%’, height: 25 });
    $(“#fldNomeRel”).jqxInput({ width: ‘100%’, height:23, height:23, theme: style });
    $(“#fldCognomeRel”).jqxInput({ width: ‘100%’, height:23, height:23, theme: style });
    $(“#fldDtNasRel”).jqxDateTimeInput({ culture: ‘it’, width: 150, height:23, theme: style });
    $(“#fldComuneNasRel”).jqxInput({ source: comuneAdapter, displayMember: “DATI_RICERCA”, placeHolder: “Citta nascita”, width: ‘100%’, height: 25, minLength: 1, maxLength: 30, theme:style});
    $(“#fldCdComuneNasRel”).jqxInput({});
    $(“#fldComuneResRel”).jqxInput({ source: comuneAdapter, displayMember: “DATI_RICERCA”, placeHolder: “Citta residenza”, width: ‘100%’, height: 25, minLength: 1, maxLength: 30, theme:style});
    $(“#fldCdComuneResRel”).jqxInput({});
    $(“#fldIndirizzoRel”).jqxInput({ placeHolder: “Indirizzo residenza”, width: ‘100%’, height: 25, minLength: 1, maxLength: 100, theme:style});
    }
    });
    $(“#relazioniPopup”).jqxWindow(‘open’);
    });
    deleteButton.click(function (event) {
    var selectedrowindex = $(“#tblRelazioni”).jqxGrid(‘getselectedrowindex’);
    var id = $(“#tblRelazioni”).jqxGrid(‘getrowid’, selectedrowindex);
    var row = $(“#tblRelazioni”).jqxGrid(‘getrowdatabyid’,id);
    $(“#tblRelazioni”).jqxGrid(‘deleterow’, id);
    });
    viewRelButton.click(function (event) {
    var selectedrowindex = $(“#tblRelazioni”).jqxGrid(‘getselectedrowindex’);
    var id = $(“#tblRelazioni”).jqxGrid(‘getrowid’, selectedrowindex);
    var row = $(“#tblRelazioni”).jqxGrid(‘getrowdatabyid’,id);
    if (row) {
    var pag;
    switch(row.CD_TIPO_SOGGETTO) {
    case ‘A’:
    pag = ‘Tesserato’;
    break;
    case ‘C’:
    pag = ‘Contatto’;
    break;
    case ‘R’:
    pag = ‘Contatto’;
    break;
    default:
    alert(“Paramentro non gestito”);
    }
    window.open(‘Rcm.php?Act=Nav&Pag=’+pag+’&IDS=’+row.ID_SOGGETTO, ‘_self’);
    }
    });
    }
    });


    Hristo
    Participant

    Hello Bobo,

    Please, take a look at this example:
    https://jsfiddle.net/6c5zvxfL/

    Best Regards,
    Hristo Hristov

    jQWidgets team
    https://www.jqwidgets.com


    mathygreen
    Participant

    //creates a listener for when you press a key
    window.onkeyup = keyup;

    //creates a global Javascript variable
    var inputTextValue;

    function keyup(e) {
    //setting your input text to the global Javascript Variable for every key press
    inputTextValue = e.target.value;

    //listens for you to press the ENTER key, at which point your web address will change to the one you have input in the search box
    if (e.keyCode == 13) {
    window.location = “http://www.myurl.com/search/” + inputTextValue;
    }
    }
    try this might work….
    ________

Viewing 5 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic.