Hello All,

I need to implement this functionality using clueTip (great Karl for
the plugin)
Using OpenLayers if a user clicks on a point:

OpenLayers.Control.Click = OpenLayers.Class(OpenLayers.Control,
{******
},
trigger: function(e)
{
//AJAX call
var url = "../libs/ajax/identify.php?type=map&*****"
OpenLayers.loadURL(url, '', this, getPopUpPoint);

***
**

function getPopUpPoint(response)
{
    if (response.responseText.indexOf('no result') == -1)
        {
               // response.responseText = 
http://www.website/data/page_12_89000.html
                CreateClueTip(response.responseText);
    }
        else
        {
                alert("No result");
        }
}

The variable response.responseText is the html page (rel or href) to
open within the clueTip.

And I declared:

<div class="tip" href="" rel="" title="Checking Point"
style="display:none"></div>

$().ready(function()
{
        $('.tip').cluetip({
                width:'300',
                height:'600',
          cluetipClass: 'jtip',
          arrows: true,
          dropShadow: false,
          hoverIntent: false,
          sticky: true,
          mouseOutClose: false,
          closePosition: 'title',
          closeText: '<img src="/images/cross.png" alt="close" />'
        });

***

function CreateClueTip(html_page)
{
        //change rel value with html_page
        $('.tip').trigger('mouseover');
}


>From JS I call the function CreateClueTip and it has to make visible
the <div class="tip"> and it has to change the rel value with  the
response.responseText (html page path), is that possible?

I checked this:
http://groups.google.it/group/jquery-en/browse_thread/thread/5bc757451f2ebf8c?q=cluetip+from+javascript#aa4a2ffb8d2b2382

I need to call the CreateClueTip when the user clicks on the map
(trigger: function(e)) and it doesn't work, why?


Thanks!

Reply via email to