Skip to main content
New Participant
March 29, 2022
Answered

Combo Box to Pre-populate Form Fields - error when using space between the "ID"

  • March 29, 2022
  • 1 reply
  • 464 views

Hello everyone, i hope i can get some answers from the gurus in this forum.

 

I have managed to make an Combo box who pre-populate form fields, with copying a tutorial. 

But when i add space between the "id" from the dropdownmenu i getting error message: "SyntaxError: Missing : after property ID"

 

Can anyone please help me with this issue? 

 

The code in the jacascript who gets the error:

var DeptData = { CSS Frogner:{ adresse: "Frederik Stangs Gate 4",
poststed: "0272 Oslo", },

 

And the code without any error:

var DeptData = { Frogner:{ adresse: "Frederik Stangs Gate 4",
poststed: "0272 Oslo", },

 

The custom keystroke (if that is to any help):

if( event.willCommit )
{
if(event.value == " ")
this.resetForm(["Adresse","Poststed"]);
else
SetFieldValues(event.value);
}

 

Hope someone can help me. 

 

Best regards

Newbie to jacascripting

 

This topic has been closed for replies.
Correct answer Bernd Alheit

Use "CSS Frogner"

1 reply

Bernd Alheit
Bernd AlheitCorrect answer
Community Expert
March 29, 2022

Use "CSS Frogner"

New Participant
March 29, 2022

Thank you, that worked perfectly!