BookmarkSubscribeRSS Feed
Filipvdr
Pyrite | Level 9

Hi Milts, i did not check this anymore. But recently I had some extra time and I managed to get it working!

In this example I am building 3 autocomplete textboxes and a datetime picker to let the user filter his data.

data _null_;

file _webout;

set lots end=lastobs;

if _N_ = 1 then do;

put '<!DOCTYPE html>

<html>

<head>

  <link href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/themes/base/jquery-ui.css" rel="stylesheet" type="text/css"/>

  <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.5/jquery.min.js"></script>

  <script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/jquery-ui.min.js"></script>

  <script scr="http://www.kelvinluck.com/assets/jquery/datePicker/v2/demo/scripts/jquery.datePicker.js"></script>

  ';

  put '

  <script>

  $(function() {

  $( "#datepicker" ).datepicker({ dateFormat: "dd/mm/yy",maxDate: "+0D" });

  });

  $(document).ready(function() {

    $("input#lot").autocomplete({source: [';

end;

temp = '"' || strip(LotId) || '",';

put temp;

if lastobs then do;

put ']

});});';

end;

run;

SGB
Obsidian | Level 7 SGB
Obsidian | Level 7

Hi Filipvdr

I need to create similar thing for our UI. FriedEgg, an user in this community suggested to use Jquery for a datepicker.

I tried it, but I see only the textbox but I dont see a pop-up calender to pick the date. I will post the code that I used in the morning.

I will appreciate your inputs in this regard, as I am working on a time sensitive deliverable.

Thanks

SGB

milts
Pyrite | Level 9

Wow that's great! Smiley Happy Good for you.

For me unfortunately I haven't been involved on such projects yet which involves exploring JQuery.

But we have another project which I'm hoping to use Jquery for form validation.

Milton

SGB
Obsidian | Level 7 SGB
Obsidian | Level 7

Hi Filipvdr

I have tried your code..

I am getting a warning for 'unbalance quotation marks' although everything seems to be balanced. And output with all the put statement values.

Could you able to run the exact same code without warnings?!

I need to finish this task by friday. Any input is highly appreciated.


Thanks

SGB

Filipvdr
Pyrite | Level 9

HI Bhuvana. I'm at home today. I will try to answer tomorrow.

Filipvdr
Pyrite | Level 9

I have indeed 3 or 4 warnings. But as long as it works it is fine by me.

WARNING: The quoted string currently being processed has become more than 262 characters long. You may have unbalanced quotation marks.
WARNING: The quoted string currently being processed has become more than 262 characters long. You may have unbalanced quotation marks.
WARNING: The quoted string currently being processed has become more than 262 characters long. You may have unbalanced quotation marks.

There is an option to supress this warnings

http://support.sas.com/documentation/cdl/en/lrdict/64316/HTML/default/viewer.htm#a002233891.htm


Is it working?

SGB
Obsidian | Level 7 SGB
Obsidian | Level 7

It is not working for me yet?!:smileycry:

Filipvdr
Pyrite | Level 9

send your code and detailed questions to filipvdr@gmail.com - i will try to answer them then

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 22 replies
  • 7244 views
  • 3 likes
  • 5 in conversation