Exploit JSON values coming from a get mappingHow can I get query string values in JavaScript?How to get the value from the GET parameters?Get selected value in dropdown list using JavaScript?Get selected text from a drop-down list (select box) using jQueryGet all unique values in a JavaScript array (remove duplicates)Getting a random value from a JavaScript arrayRemove duplicate values from JS arrayjQuery Get Selected Option From DropdownGet Value from JQuery Modal Dialog Submit to another Input TypeWhy can't I get the alert to show?

Why is the underscore command _ useful?

Why do distances seem to matter in the Foundation world?

Co-worker works way more than he should

Is there metaphorical meaning of "aus der Haft entlassen"?

What is this word supposed to be?

Is there really no use for MD5 anymore?

Multiple options vs single option UI

What is the best way to deal with NPC-NPC combat?

Complex numbers z=-3-4i polar form

std::unique_ptr of base class holding reference of derived class does not show warning in gcc compiler while naked pointer shows it. Why?

Apply a different color ramp to subset of categorized symbols in QGIS?

`microtype`: Set Minimum Width of a Space

Is Diceware more secure than a long passphrase?

Does the damage from the Absorb Elements spell apply to your next attack, or to your first attack on your next turn?

Can a level 2 Warlock take one level in rogue, then continue advancing as a warlock?

What is the unit of time_lock_delta in LND?

What's the difference between using dependency injection with a container and using a service locator?

Which big number is bigger?

Retract an already submitted recommendation letter (written for an undergrad student)

Prove that the countable union of countable sets is also countable

Work requires me to come in early to start computer but wont let me clock in to get paid for it

What *exactly* is electrical current, voltage, and resistance?

All ASCII characters with a given bit count

What is the most expensive material in the world that could be used to create Pun-Pun's lute?



Exploit JSON values coming from a get mapping


How can I get query string values in JavaScript?How to get the value from the GET parameters?Get selected value in dropdown list using JavaScript?Get selected text from a drop-down list (select box) using jQueryGet all unique values in a JavaScript array (remove duplicates)Getting a random value from a JavaScript arrayRemove duplicate values from JS arrayjQuery Get Selected Option From DropdownGet Value from JQuery Modal Dialog Submit to another Input TypeWhy can't I get the alert to show?






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty height:90px;width:728px;box-sizing:border-box;








0















I trying to find in my database an order via a webservice integrated in the order controller like below :



@GetMapping("/view" )
@ResponseBody
public Optional<Ordre> view(String id)

return ordreRepository.findById(id) ;




Then display the details of the order in a modal by using a javascript code like below :






$('.view').on('click', function(e) 
e.preventDefault();

var href2 = $(this).attr('href2');
$.get(href2, function(ordre, status)
$('#Modalview #num_ord').val(ordre.num_ord);
$('#Modalview #dte_ord').val(ordre.dte_ord);
$('#Modalview #dir_ord').val(ordre.dir_ord);
$('#Modalview #ref_ord').val(ordre.ref_ord);
$('#Modalview #pap_ord').val(ordre.pap_ord);
$('#Modalview #boss_ord').val(ordre.boss_ord);
$('#Modalview #suj_ord').val(ordre.suj_ord);
);

$('#Modalview').modal();
);

<div class="modal fade" id="Modalview" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true" style="padding-left: 10px;">&times;</button>

</div>
<div class="modal-body" style="padding-bottom: 50px;">

<form class="form-horizontal" id="formview">

<div class="form-group">

<div class="col-sm-10">
<input type="text" class="form-control pull-right" id="num_ord" name="num_ord" />
</div>
</div>

<div class="form-group">

<div class="col-sm-10">
<input class="form-control pull-right" type="date" id="dte_ord" name="dte_ord" />
</div>
</div>

<div class="form-group">

<div class="col-sm-10">
<input type="text" class="form-control pull-right" id="dir_ord" name="dir_ord" />
</div>
</div>

<div class="form-group">

<div class="col-sm-10">
<input type="text" class="form-control pull-right" id="ref_ord" name="ref_ord" />
</div>
</div>

<div class="form-inline">
<div class="form-group pull-right">
</div>
</div>

<br/>
<br/>

<div class="form-group " id="pap">

<div class="col-sm-6 col-sm-push-3">
<select class="form-control" id="pap_ord">
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
<option value="4">4</option>
<option value="5">5</option>
</select>
</div>
</div>
<br/>
<div class="form-group" id="boss">

<div class="col-sm-8 col-sm-push-1">
<input class="form-control pull-right" type="text" id="boss_ord" name="boss_ord" />
</div>
</div>

<div class="form-group" id="suj" style="padding-top: 10px;">

<div class="col-sm-10">
<textarea class="form-control pull-right" id="suj_ord" name="suj_ord"></textarea>
</div>
</div>

<div class="modal-footer" style="margin-right: -15px;">
<button type="button" class="btn btn-default" data-dismiss="modal">Return Back</button>
</div>
</form>
<!--/modal-body-collapse -->

<!--/modal-footer-collapse -->

</div>

</div>
<!-- /.modal-content -->
</div>
<!-- /.modal-dialog -->
</div>





But nothing displayed in the modal i don't know and there is no error or crash in the console in my editor . any one can help me and thanks .










share|improve this question






























    0















    I trying to find in my database an order via a webservice integrated in the order controller like below :



    @GetMapping("/view" )
    @ResponseBody
    public Optional<Ordre> view(String id)

    return ordreRepository.findById(id) ;




    Then display the details of the order in a modal by using a javascript code like below :






    $('.view').on('click', function(e) 
    e.preventDefault();

    var href2 = $(this).attr('href2');
    $.get(href2, function(ordre, status)
    $('#Modalview #num_ord').val(ordre.num_ord);
    $('#Modalview #dte_ord').val(ordre.dte_ord);
    $('#Modalview #dir_ord').val(ordre.dir_ord);
    $('#Modalview #ref_ord').val(ordre.ref_ord);
    $('#Modalview #pap_ord').val(ordre.pap_ord);
    $('#Modalview #boss_ord').val(ordre.boss_ord);
    $('#Modalview #suj_ord').val(ordre.suj_ord);
    );

    $('#Modalview').modal();
    );

    <div class="modal fade" id="Modalview" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
    <div class="modal-dialog">
    <div class="modal-content">
    <div class="modal-header">
    <button type="button" class="close" data-dismiss="modal" aria-hidden="true" style="padding-left: 10px;">&times;</button>

    </div>
    <div class="modal-body" style="padding-bottom: 50px;">

    <form class="form-horizontal" id="formview">

    <div class="form-group">

    <div class="col-sm-10">
    <input type="text" class="form-control pull-right" id="num_ord" name="num_ord" />
    </div>
    </div>

    <div class="form-group">

    <div class="col-sm-10">
    <input class="form-control pull-right" type="date" id="dte_ord" name="dte_ord" />
    </div>
    </div>

    <div class="form-group">

    <div class="col-sm-10">
    <input type="text" class="form-control pull-right" id="dir_ord" name="dir_ord" />
    </div>
    </div>

    <div class="form-group">

    <div class="col-sm-10">
    <input type="text" class="form-control pull-right" id="ref_ord" name="ref_ord" />
    </div>
    </div>

    <div class="form-inline">
    <div class="form-group pull-right">
    </div>
    </div>

    <br/>
    <br/>

    <div class="form-group " id="pap">

    <div class="col-sm-6 col-sm-push-3">
    <select class="form-control" id="pap_ord">
    <option value="1">1</option>
    <option value="2">2</option>
    <option value="3">3</option>
    <option value="4">4</option>
    <option value="5">5</option>
    </select>
    </div>
    </div>
    <br/>
    <div class="form-group" id="boss">

    <div class="col-sm-8 col-sm-push-1">
    <input class="form-control pull-right" type="text" id="boss_ord" name="boss_ord" />
    </div>
    </div>

    <div class="form-group" id="suj" style="padding-top: 10px;">

    <div class="col-sm-10">
    <textarea class="form-control pull-right" id="suj_ord" name="suj_ord"></textarea>
    </div>
    </div>

    <div class="modal-footer" style="margin-right: -15px;">
    <button type="button" class="btn btn-default" data-dismiss="modal">Return Back</button>
    </div>
    </form>
    <!--/modal-body-collapse -->

    <!--/modal-footer-collapse -->

    </div>

    </div>
    <!-- /.modal-content -->
    </div>
    <!-- /.modal-dialog -->
    </div>





    But nothing displayed in the modal i don't know and there is no error or crash in the console in my editor . any one can help me and thanks .










    share|improve this question


























      0












      0








      0








      I trying to find in my database an order via a webservice integrated in the order controller like below :



      @GetMapping("/view" )
      @ResponseBody
      public Optional<Ordre> view(String id)

      return ordreRepository.findById(id) ;




      Then display the details of the order in a modal by using a javascript code like below :






      $('.view').on('click', function(e) 
      e.preventDefault();

      var href2 = $(this).attr('href2');
      $.get(href2, function(ordre, status)
      $('#Modalview #num_ord').val(ordre.num_ord);
      $('#Modalview #dte_ord').val(ordre.dte_ord);
      $('#Modalview #dir_ord').val(ordre.dir_ord);
      $('#Modalview #ref_ord').val(ordre.ref_ord);
      $('#Modalview #pap_ord').val(ordre.pap_ord);
      $('#Modalview #boss_ord').val(ordre.boss_ord);
      $('#Modalview #suj_ord').val(ordre.suj_ord);
      );

      $('#Modalview').modal();
      );

      <div class="modal fade" id="Modalview" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
      <div class="modal-dialog">
      <div class="modal-content">
      <div class="modal-header">
      <button type="button" class="close" data-dismiss="modal" aria-hidden="true" style="padding-left: 10px;">&times;</button>

      </div>
      <div class="modal-body" style="padding-bottom: 50px;">

      <form class="form-horizontal" id="formview">

      <div class="form-group">

      <div class="col-sm-10">
      <input type="text" class="form-control pull-right" id="num_ord" name="num_ord" />
      </div>
      </div>

      <div class="form-group">

      <div class="col-sm-10">
      <input class="form-control pull-right" type="date" id="dte_ord" name="dte_ord" />
      </div>
      </div>

      <div class="form-group">

      <div class="col-sm-10">
      <input type="text" class="form-control pull-right" id="dir_ord" name="dir_ord" />
      </div>
      </div>

      <div class="form-group">

      <div class="col-sm-10">
      <input type="text" class="form-control pull-right" id="ref_ord" name="ref_ord" />
      </div>
      </div>

      <div class="form-inline">
      <div class="form-group pull-right">
      </div>
      </div>

      <br/>
      <br/>

      <div class="form-group " id="pap">

      <div class="col-sm-6 col-sm-push-3">
      <select class="form-control" id="pap_ord">
      <option value="1">1</option>
      <option value="2">2</option>
      <option value="3">3</option>
      <option value="4">4</option>
      <option value="5">5</option>
      </select>
      </div>
      </div>
      <br/>
      <div class="form-group" id="boss">

      <div class="col-sm-8 col-sm-push-1">
      <input class="form-control pull-right" type="text" id="boss_ord" name="boss_ord" />
      </div>
      </div>

      <div class="form-group" id="suj" style="padding-top: 10px;">

      <div class="col-sm-10">
      <textarea class="form-control pull-right" id="suj_ord" name="suj_ord"></textarea>
      </div>
      </div>

      <div class="modal-footer" style="margin-right: -15px;">
      <button type="button" class="btn btn-default" data-dismiss="modal">Return Back</button>
      </div>
      </form>
      <!--/modal-body-collapse -->

      <!--/modal-footer-collapse -->

      </div>

      </div>
      <!-- /.modal-content -->
      </div>
      <!-- /.modal-dialog -->
      </div>





      But nothing displayed in the modal i don't know and there is no error or crash in the console in my editor . any one can help me and thanks .










      share|improve this question
















      I trying to find in my database an order via a webservice integrated in the order controller like below :



      @GetMapping("/view" )
      @ResponseBody
      public Optional<Ordre> view(String id)

      return ordreRepository.findById(id) ;




      Then display the details of the order in a modal by using a javascript code like below :






      $('.view').on('click', function(e) 
      e.preventDefault();

      var href2 = $(this).attr('href2');
      $.get(href2, function(ordre, status)
      $('#Modalview #num_ord').val(ordre.num_ord);
      $('#Modalview #dte_ord').val(ordre.dte_ord);
      $('#Modalview #dir_ord').val(ordre.dir_ord);
      $('#Modalview #ref_ord').val(ordre.ref_ord);
      $('#Modalview #pap_ord').val(ordre.pap_ord);
      $('#Modalview #boss_ord').val(ordre.boss_ord);
      $('#Modalview #suj_ord').val(ordre.suj_ord);
      );

      $('#Modalview').modal();
      );

      <div class="modal fade" id="Modalview" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
      <div class="modal-dialog">
      <div class="modal-content">
      <div class="modal-header">
      <button type="button" class="close" data-dismiss="modal" aria-hidden="true" style="padding-left: 10px;">&times;</button>

      </div>
      <div class="modal-body" style="padding-bottom: 50px;">

      <form class="form-horizontal" id="formview">

      <div class="form-group">

      <div class="col-sm-10">
      <input type="text" class="form-control pull-right" id="num_ord" name="num_ord" />
      </div>
      </div>

      <div class="form-group">

      <div class="col-sm-10">
      <input class="form-control pull-right" type="date" id="dte_ord" name="dte_ord" />
      </div>
      </div>

      <div class="form-group">

      <div class="col-sm-10">
      <input type="text" class="form-control pull-right" id="dir_ord" name="dir_ord" />
      </div>
      </div>

      <div class="form-group">

      <div class="col-sm-10">
      <input type="text" class="form-control pull-right" id="ref_ord" name="ref_ord" />
      </div>
      </div>

      <div class="form-inline">
      <div class="form-group pull-right">
      </div>
      </div>

      <br/>
      <br/>

      <div class="form-group " id="pap">

      <div class="col-sm-6 col-sm-push-3">
      <select class="form-control" id="pap_ord">
      <option value="1">1</option>
      <option value="2">2</option>
      <option value="3">3</option>
      <option value="4">4</option>
      <option value="5">5</option>
      </select>
      </div>
      </div>
      <br/>
      <div class="form-group" id="boss">

      <div class="col-sm-8 col-sm-push-1">
      <input class="form-control pull-right" type="text" id="boss_ord" name="boss_ord" />
      </div>
      </div>

      <div class="form-group" id="suj" style="padding-top: 10px;">

      <div class="col-sm-10">
      <textarea class="form-control pull-right" id="suj_ord" name="suj_ord"></textarea>
      </div>
      </div>

      <div class="modal-footer" style="margin-right: -15px;">
      <button type="button" class="btn btn-default" data-dismiss="modal">Return Back</button>
      </div>
      </form>
      <!--/modal-body-collapse -->

      <!--/modal-footer-collapse -->

      </div>

      </div>
      <!-- /.modal-content -->
      </div>
      <!-- /.modal-dialog -->
      </div>





      But nothing displayed in the modal i don't know and there is no error or crash in the console in my editor . any one can help me and thanks .






      $('.view').on('click', function(e) 
      e.preventDefault();

      var href2 = $(this).attr('href2');
      $.get(href2, function(ordre, status)
      $('#Modalview #num_ord').val(ordre.num_ord);
      $('#Modalview #dte_ord').val(ordre.dte_ord);
      $('#Modalview #dir_ord').val(ordre.dir_ord);
      $('#Modalview #ref_ord').val(ordre.ref_ord);
      $('#Modalview #pap_ord').val(ordre.pap_ord);
      $('#Modalview #boss_ord').val(ordre.boss_ord);
      $('#Modalview #suj_ord').val(ordre.suj_ord);
      );

      $('#Modalview').modal();
      );

      <div class="modal fade" id="Modalview" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
      <div class="modal-dialog">
      <div class="modal-content">
      <div class="modal-header">
      <button type="button" class="close" data-dismiss="modal" aria-hidden="true" style="padding-left: 10px;">&times;</button>

      </div>
      <div class="modal-body" style="padding-bottom: 50px;">

      <form class="form-horizontal" id="formview">

      <div class="form-group">

      <div class="col-sm-10">
      <input type="text" class="form-control pull-right" id="num_ord" name="num_ord" />
      </div>
      </div>

      <div class="form-group">

      <div class="col-sm-10">
      <input class="form-control pull-right" type="date" id="dte_ord" name="dte_ord" />
      </div>
      </div>

      <div class="form-group">

      <div class="col-sm-10">
      <input type="text" class="form-control pull-right" id="dir_ord" name="dir_ord" />
      </div>
      </div>

      <div class="form-group">

      <div class="col-sm-10">
      <input type="text" class="form-control pull-right" id="ref_ord" name="ref_ord" />
      </div>
      </div>

      <div class="form-inline">
      <div class="form-group pull-right">
      </div>
      </div>

      <br/>
      <br/>

      <div class="form-group " id="pap">

      <div class="col-sm-6 col-sm-push-3">
      <select class="form-control" id="pap_ord">
      <option value="1">1</option>
      <option value="2">2</option>
      <option value="3">3</option>
      <option value="4">4</option>
      <option value="5">5</option>
      </select>
      </div>
      </div>
      <br/>
      <div class="form-group" id="boss">

      <div class="col-sm-8 col-sm-push-1">
      <input class="form-control pull-right" type="text" id="boss_ord" name="boss_ord" />
      </div>
      </div>

      <div class="form-group" id="suj" style="padding-top: 10px;">

      <div class="col-sm-10">
      <textarea class="form-control pull-right" id="suj_ord" name="suj_ord"></textarea>
      </div>
      </div>

      <div class="modal-footer" style="margin-right: -15px;">
      <button type="button" class="btn btn-default" data-dismiss="modal">Return Back</button>
      </div>
      </form>
      <!--/modal-body-collapse -->

      <!--/modal-footer-collapse -->

      </div>

      </div>
      <!-- /.modal-content -->
      </div>
      <!-- /.modal-dialog -->
      </div>





      $('.view').on('click', function(e) 
      e.preventDefault();

      var href2 = $(this).attr('href2');
      $.get(href2, function(ordre, status)
      $('#Modalview #num_ord').val(ordre.num_ord);
      $('#Modalview #dte_ord').val(ordre.dte_ord);
      $('#Modalview #dir_ord').val(ordre.dir_ord);
      $('#Modalview #ref_ord').val(ordre.ref_ord);
      $('#Modalview #pap_ord').val(ordre.pap_ord);
      $('#Modalview #boss_ord').val(ordre.boss_ord);
      $('#Modalview #suj_ord').val(ordre.suj_ord);
      );

      $('#Modalview').modal();
      );

      <div class="modal fade" id="Modalview" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
      <div class="modal-dialog">
      <div class="modal-content">
      <div class="modal-header">
      <button type="button" class="close" data-dismiss="modal" aria-hidden="true" style="padding-left: 10px;">&times;</button>

      </div>
      <div class="modal-body" style="padding-bottom: 50px;">

      <form class="form-horizontal" id="formview">

      <div class="form-group">

      <div class="col-sm-10">
      <input type="text" class="form-control pull-right" id="num_ord" name="num_ord" />
      </div>
      </div>

      <div class="form-group">

      <div class="col-sm-10">
      <input class="form-control pull-right" type="date" id="dte_ord" name="dte_ord" />
      </div>
      </div>

      <div class="form-group">

      <div class="col-sm-10">
      <input type="text" class="form-control pull-right" id="dir_ord" name="dir_ord" />
      </div>
      </div>

      <div class="form-group">

      <div class="col-sm-10">
      <input type="text" class="form-control pull-right" id="ref_ord" name="ref_ord" />
      </div>
      </div>

      <div class="form-inline">
      <div class="form-group pull-right">
      </div>
      </div>

      <br/>
      <br/>

      <div class="form-group " id="pap">

      <div class="col-sm-6 col-sm-push-3">
      <select class="form-control" id="pap_ord">
      <option value="1">1</option>
      <option value="2">2</option>
      <option value="3">3</option>
      <option value="4">4</option>
      <option value="5">5</option>
      </select>
      </div>
      </div>
      <br/>
      <div class="form-group" id="boss">

      <div class="col-sm-8 col-sm-push-1">
      <input class="form-control pull-right" type="text" id="boss_ord" name="boss_ord" />
      </div>
      </div>

      <div class="form-group" id="suj" style="padding-top: 10px;">

      <div class="col-sm-10">
      <textarea class="form-control pull-right" id="suj_ord" name="suj_ord"></textarea>
      </div>
      </div>

      <div class="modal-footer" style="margin-right: -15px;">
      <button type="button" class="btn btn-default" data-dismiss="modal">Return Back</button>
      </div>
      </form>
      <!--/modal-body-collapse -->

      <!--/modal-footer-collapse -->

      </div>

      </div>
      <!-- /.modal-content -->
      </div>
      <!-- /.modal-dialog -->
      </div>






      javascript spring model-view-controller spring-data-jpa thymeleaf






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Mar 9 at 7:17









      adiga

      13k62745




      13k62745










      asked Mar 9 at 7:10









      mohamed91mohamed91

      13




      13






















          1 Answer
          1






          active

          oldest

          votes


















          0














          Have a try like below and bind your form object using th:field or th:value



          $('.view').on('click', function(e) 
          e.preventDefault();

          $.ajax(
          type: 'get',
          url: /*[[ @'/view' ]]*/,

          success: function(returnedData)
          $('#formview').html(returnedData)
          $('#Modalview').modal('show');


          ,

          error: function(xhr, exception)
          console.log(xhr);



          );


          );





          share|improve this answer

























          • this is gives me a json response in the browser but not displayed in the modal

            – mohamed91
            Mar 9 at 10:51











          • gives also this error in the console of the browser [ SyntaxError: expected expression, got ',' ] in the line where you indicate the URL empty .

            – mohamed91
            Mar 9 at 11:13











          • here url is not empty. it is the way of writing url when you use thymeleaf. but inside script tag you have to mention it .like` this <script th:inline="javascript">`

            – Aritra Paul
            Mar 9 at 13:18











          • already the modal appears but without the data

            – mohamed91
            Mar 9 at 13:53











          • can you show your error from the console?

            – Aritra Paul
            Mar 9 at 14:02











          Your Answer






          StackExchange.ifUsing("editor", function ()
          StackExchange.using("externalEditor", function ()
          StackExchange.using("snippets", function ()
          StackExchange.snippets.init();
          );
          );
          , "code-snippets");

          StackExchange.ready(function()
          var channelOptions =
          tags: "".split(" "),
          id: "1"
          ;
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function()
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled)
          StackExchange.using("snippets", function()
          createEditor();
          );

          else
          createEditor();

          );

          function createEditor()
          StackExchange.prepareEditor(
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: true,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          imageUploader:
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          ,
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          );



          );













          draft saved

          draft discarded


















          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55074934%2fexploit-json-values-coming-from-a-get-mapping%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown

























          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes









          0














          Have a try like below and bind your form object using th:field or th:value



          $('.view').on('click', function(e) 
          e.preventDefault();

          $.ajax(
          type: 'get',
          url: /*[[ @'/view' ]]*/,

          success: function(returnedData)
          $('#formview').html(returnedData)
          $('#Modalview').modal('show');


          ,

          error: function(xhr, exception)
          console.log(xhr);



          );


          );





          share|improve this answer

























          • this is gives me a json response in the browser but not displayed in the modal

            – mohamed91
            Mar 9 at 10:51











          • gives also this error in the console of the browser [ SyntaxError: expected expression, got ',' ] in the line where you indicate the URL empty .

            – mohamed91
            Mar 9 at 11:13











          • here url is not empty. it is the way of writing url when you use thymeleaf. but inside script tag you have to mention it .like` this <script th:inline="javascript">`

            – Aritra Paul
            Mar 9 at 13:18











          • already the modal appears but without the data

            – mohamed91
            Mar 9 at 13:53











          • can you show your error from the console?

            – Aritra Paul
            Mar 9 at 14:02















          0














          Have a try like below and bind your form object using th:field or th:value



          $('.view').on('click', function(e) 
          e.preventDefault();

          $.ajax(
          type: 'get',
          url: /*[[ @'/view' ]]*/,

          success: function(returnedData)
          $('#formview').html(returnedData)
          $('#Modalview').modal('show');


          ,

          error: function(xhr, exception)
          console.log(xhr);



          );


          );





          share|improve this answer

























          • this is gives me a json response in the browser but not displayed in the modal

            – mohamed91
            Mar 9 at 10:51











          • gives also this error in the console of the browser [ SyntaxError: expected expression, got ',' ] in the line where you indicate the URL empty .

            – mohamed91
            Mar 9 at 11:13











          • here url is not empty. it is the way of writing url when you use thymeleaf. but inside script tag you have to mention it .like` this <script th:inline="javascript">`

            – Aritra Paul
            Mar 9 at 13:18











          • already the modal appears but without the data

            – mohamed91
            Mar 9 at 13:53











          • can you show your error from the console?

            – Aritra Paul
            Mar 9 at 14:02













          0












          0








          0







          Have a try like below and bind your form object using th:field or th:value



          $('.view').on('click', function(e) 
          e.preventDefault();

          $.ajax(
          type: 'get',
          url: /*[[ @'/view' ]]*/,

          success: function(returnedData)
          $('#formview').html(returnedData)
          $('#Modalview').modal('show');


          ,

          error: function(xhr, exception)
          console.log(xhr);



          );


          );





          share|improve this answer















          Have a try like below and bind your form object using th:field or th:value



          $('.view').on('click', function(e) 
          e.preventDefault();

          $.ajax(
          type: 'get',
          url: /*[[ @'/view' ]]*/,

          success: function(returnedData)
          $('#formview').html(returnedData)
          $('#Modalview').modal('show');


          ,

          error: function(xhr, exception)
          console.log(xhr);



          );


          );






          share|improve this answer














          share|improve this answer



          share|improve this answer








          edited Mar 9 at 14:12

























          answered Mar 9 at 7:38









          Aritra PaulAritra Paul

          488212




          488212












          • this is gives me a json response in the browser but not displayed in the modal

            – mohamed91
            Mar 9 at 10:51











          • gives also this error in the console of the browser [ SyntaxError: expected expression, got ',' ] in the line where you indicate the URL empty .

            – mohamed91
            Mar 9 at 11:13











          • here url is not empty. it is the way of writing url when you use thymeleaf. but inside script tag you have to mention it .like` this <script th:inline="javascript">`

            – Aritra Paul
            Mar 9 at 13:18











          • already the modal appears but without the data

            – mohamed91
            Mar 9 at 13:53











          • can you show your error from the console?

            – Aritra Paul
            Mar 9 at 14:02

















          • this is gives me a json response in the browser but not displayed in the modal

            – mohamed91
            Mar 9 at 10:51











          • gives also this error in the console of the browser [ SyntaxError: expected expression, got ',' ] in the line where you indicate the URL empty .

            – mohamed91
            Mar 9 at 11:13











          • here url is not empty. it is the way of writing url when you use thymeleaf. but inside script tag you have to mention it .like` this <script th:inline="javascript">`

            – Aritra Paul
            Mar 9 at 13:18











          • already the modal appears but without the data

            – mohamed91
            Mar 9 at 13:53











          • can you show your error from the console?

            – Aritra Paul
            Mar 9 at 14:02
















          this is gives me a json response in the browser but not displayed in the modal

          – mohamed91
          Mar 9 at 10:51





          this is gives me a json response in the browser but not displayed in the modal

          – mohamed91
          Mar 9 at 10:51













          gives also this error in the console of the browser [ SyntaxError: expected expression, got ',' ] in the line where you indicate the URL empty .

          – mohamed91
          Mar 9 at 11:13





          gives also this error in the console of the browser [ SyntaxError: expected expression, got ',' ] in the line where you indicate the URL empty .

          – mohamed91
          Mar 9 at 11:13













          here url is not empty. it is the way of writing url when you use thymeleaf. but inside script tag you have to mention it .like` this <script th:inline="javascript">`

          – Aritra Paul
          Mar 9 at 13:18





          here url is not empty. it is the way of writing url when you use thymeleaf. but inside script tag you have to mention it .like` this <script th:inline="javascript">`

          – Aritra Paul
          Mar 9 at 13:18













          already the modal appears but without the data

          – mohamed91
          Mar 9 at 13:53





          already the modal appears but without the data

          – mohamed91
          Mar 9 at 13:53













          can you show your error from the console?

          – Aritra Paul
          Mar 9 at 14:02





          can you show your error from the console?

          – Aritra Paul
          Mar 9 at 14:02



















          draft saved

          draft discarded
















































          Thanks for contributing an answer to Stack Overflow!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid


          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.

          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55074934%2fexploit-json-values-coming-from-a-get-mapping%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          AWS Lex not identifying response if by a variable The 2019 Stack Overflow Developer Survey Results Are In Announcing the arrival of Valued Associate #679: Cesar Manara Planned maintenance scheduled April 17/18, 2019 at 00:00UTC (8:00pm US/Eastern) The Ask Question Wizard is Live! Data science time! April 2019 and salary with experienceEnforcing custom enumeration in AWS LEX for slot valuesHow to give response based on user response in Amazon Lex?Intercepting AWS Lambda Response to a AWS Lex QueryLex chat bot error: Reached second execution of fulfillment lambda on the same utteranceamazon lex showing invalid responseLambda response send back to Lex slot?Response card in Amazon lexAmazon Lex - Lambda response return HTML to botHow can I solve 424 (Failed Dependency) (python) obtained from Amazon lex?

          Алба-Юлія

          Захаров Федір Захарович