Friday 15 May 2015

javascript - Show ajax tooltip from an SVG onclick event -


I have a SVG with this code for some shapes (a map of it)

 < Code> onclick = "top.traeDatos (evt.target.id);"   

I have an html file:

  function tray.ditos (field) {warning (area); }   

So, I click on an area, I have the alert window with the field name and the variable in the HTML file. Now I want to click on the map to display a popup with more information, I am using AJAX from one of several files, for example "getdetails.php".

I am new to JS and AJAX, I know how to make a standard call in AJX, it has been given an ID (or name of this name), I know the value of the text field How to change I look for AJAX calls ... but I can not call AJAX and show a tooltip in that Javascript code in SVG or how to understand HTML.

I'm not sure what tolltip to use, but a problem at the time;)

Can you highlight me a bit.

Thank you!

Here's the beginning:

  function tray ditos (region) {Var domn = document.domain; Document.domain = domn; Var detURL = "http: //" + domn + "/getDetails.php"; $ Ajax ({url: detURL, type: 'POST', data: {field: area}, cache: incorrect, success: function (jsn) {var data = jQuery.parseJSON (json); // PHP using json_encode () You can return an item in an array / / in the example 'array' $ ('# insert_place') in the example below. Val (data.info);}}); }   

Let me know that you have a problem with it.

No comments:

Post a Comment