Skip to main content
Question

javascript prompt with a dropdown menu

  • Jul 26, 2018 6:11 AM UTC
  • 2 replies
  • 589 views

Below is my code page: What I want to do is, have the prompt show a dropdown of values they can select from, instead of having the user enter any text.

Thanks

(function(){
  var dbid = "bnt8grwvt";
  var dbidTable = dbid;
  var apptoken = "mytoken";
  $.ajaxSetup({data: {apptoken: apptoken}});
  var description= prompt("Enter a brief description of the work done in this session: ", "");
  if (description == null || description == "")  {
  alert("You did not enter a description I will cancel this Time Out.");
  Return;
}
  var promise = $.get(dbidTable, {
    act: "API_EditRecord",
    rid: QBU_rid,
   _fid_7: "Active",
   // _fid_6: "Out"
  }).then(function(xml) {
    console.dirxml(xml);
 $.get() & location.reload(true);
  });
})();
This topic has been closed for replies.

2 replies

  • Qrew Corporal
  • Jul 26, 2018 2:10 PM UTC
There are eight examples of using the jQueryUI Dialog Box in this demo:

How To Dialog
https://community.quickbase.com/quickbase/topics/how-to-dialog

The last two examples demonstrate using <select> controls.

  • Author
  • Qrew Corporal
  • Jul 26, 2018 5:47 PM UTC
Thanks for the reply Dan!

So I would code something like this?

var description = $("record", xmlDescriptions).map(function(xmlDescriptions) {.......}

Thanks again