3
Views
1
Comments
Javasript cannot work with outsystems datatype.
Discussion

Hi I am trying to develop a room booking systems.

So the UI must show like the 1st image.

And also have to select the available time slot with drag and drops. 

The problems is I cannot use javascript directly to get the total room numbers. Actually I don't know how to pass the outsystems variable types to javascript.And also we have external database. So, I can't fulfill my boss wish. 

Any help ? 

It will be very nice if someone guide me to make it easy :) .

P.S I am quite new to Outsystems. I just used it for almost a month plus i took online training for 2 weeks.



2018-09-22 14-36-02
Kurt Vandevelde
 
MVP

If you have the variable available during the load of the screen you can do it this way:

At the end of your page, add an expression and put Escape Content to No.


The content of the expression can then be:


"<script type='text/javascript'>
osjs(document).ready(function(){
   var custom1Mask = new InputMask([fieldBuilder.inputNumbers(4, 4)], '"+EditYearFieldsYear.Id+"');","")
});
</script>"


In the example above, I genereted some JS code using the EditYearFieldsYear.Id coming from the server side.

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.