javascript - Making ajax call to jsp page -


I am calling an Ajax on a jsp page like this:

  $ ( Document ("Image", Function (Event, Data URL) {Warning (Data URL); // Alert ($ ('# MyGuesUsRead')) ($ ('# mygroupuserid')); //alert(document.Clickpictures.OwnerId .value); // Alert (IMGDATA); $ .ajax ({url: 'upload vbikemej.jsp', type: "post", data: {encoded data url, owner id: document .Clickpictures.OwnerId.value, OwnPhone: document.Clickpictures.OwnerPhone.value, mobilepass: document.Clickpictures.mobilepass.value, e ("# Gallery"). $ ("# Gallery"). Show () .html ('' '' '' '' '' '' '' ' & Lt; img src = "'++++" "& gt;';);});});   

Now in that jsp page, Decisions have to be made:

  if (flag == true) {out.println ("& lt; script> warnings ('the mark is successfully detected and password is sent') ; Document. Location = 'main Jesp '& lt; / Script> ");} and if (flag == incorrect) {out.println (" & lt; script> warnings ('sorry, face can be detected. Try again') ; & Lt; / script & gt; ");}% & Gt;   

How can this be obtained? Is this warning box not being printed yet.

You need to read parameter values ​​and check what they expect from you:

  string owner came in = Request.getParameter ("OwnId"); if ("Target" .equals (Swamy ID)) {out.println ("& lt; script> ....");}   

And to get Javascript running after you receive a response on the client side, you have to use the eval () and you need to fix that missing semi-colon in its first JS script.

Comments

Popular posts from this blog

Verilog Error: output or inout port "Q" must be connected to a structural net expression -

jasper reports - How to center align barcode using jasperreports and barcode4j -

c# - ASP.NET MVC - Attaching an entity of type 'MODELNAME' failed because another entity of the same type already has the same primary key value -