• download
  • documentation
  • forums
  • demo
  • contact
  • blog

meteora

javascript widgets

Documentation

  • Autocomplete
  • Bubble
  • Calendar
  • Carousel
  • Datagrid
  • Dialog
  • Editor
  • Effect
  • Filebrowser
  • Form
  • Jsonrpc
  • Menu
  • Notebook
  • Picbox
  • Popup
  • Searchlist
  • Selection
  • Spinbutton
  • Tablesort
  • Toolbox
  • Treeview
In order to post messages on this forum, you must be registered and logged in
80x80:1760834185_unknown.png
Forums » Widgets and scripts » Help with Widgets

Dialog.prompt return 'undefined' value

Posted by gespert

That's it, dialog.prompt return a 'undefined' value.

Is correct to access form filled data use this.value? I'm testing documentation examples. Code:

<script type="text/javascript"> Meteora.uses('Meteora.Form'); Meteora.uses('Meteora.Dialog');

function novaLlicenciaPrompt() { Dialog.prompt( '{$npr_denominacio_nva_llicencia}', { 'title': '{$npr_titol_nova_llicencia}', 'onOk': function(dialog) { if (this.value != "") { Dialog.alert('Your password was: '+this.value); dialog.close(); } else { Dialog.alert('Please fill the blank'); } } } ); } </script> In the html page

<input type="button" value="{$npr_nou_tipus_llicencia}" onClick="novaLlicenciaPrompt();" />

The '{$npr_titol_nova_llicencia}' and '{$npr_denominacio_nva_llicencia}' are Smarty tags for internalization. I parse javascript templates as separate html templates.

The prompt is a option if in a <select> in the form is not present an <option> right for the user. In this case, user press a button that shows the prompt. In this prompt, user fill the desired data and this data is used in the main form.

  • Friday May 14, 2010 @ 13:43 date
  • gespert user
There are no replies yet.

Copyright © 2007-2009 Astrata Software.