views:

46

answers:

1

http://rndnext.blogspot.com/2009/02/jquery-ajax-tooltip.html

I want to implement something like the link above..Now this pop up box's fetching data from some page..using PageID and what not...I want the content of that popup box to have simple HTML stuff in it..will bind it later...the one above's got Ajax that I am not familiar with..

Could someone plz tell me what do I need to change in the code ...All I want is a simple pop up box that looks exactly like the one above..opens up the same way n all BUT has got simple HTMl stuff in it...what and where do I make changes ??

+1  A: 

Although you haven't posted any of your attempts at doing this yourself, I will try to help you out.

If I understand correctly, you want to get rid of the AJAX and just add normal HTML right? Well, I will at least tell you where to put your HTML to get you started.

You see on their website, at line 51 it says:

$('#personPopupContent').html(' ');

You can change the nbsp bit to any HTML you want. For example:

$('#personPopupContent').html('<strong>My strong text</strong>');

You can also delete from lines 53 to 74 where it says:

$.ajax({
    type: 'GET',
    url: 'personajax.aspx',
    data: 'page=' + pageID + '&guid=' + currentID,
    success: function(data)
    {
      // Verify that we're pointed to a page that returned the expected results.
      if (data.indexOf('personPopupResult') < 0)
      {
          $('#personPopupContent').html('<span >Page ' + pageID + ' did not return a valid result for person ' + currentID + '.Please have your administrator check the error log.</span>');
      }

      // Verify requested person is this person since we could have multiple ajax
      // requests out if the server is taking a while.
      if (data.indexOf(currentID) > 0)
      {                  
          var text = $(data).find('.personPopupResult').html();
          $('#personPopupContent').html(text);
      }
    }
});

Since you won't be using it.

I hope that helped you.

Sour Lemon
Thanks..it did help :)
Serenity