Professional Web Applications Themes

How to add Tooltips to image at runtime ? - ASP

I have created a VB app that generates a wireless network status map several times a day. The app adds hidden controls in specific areas of the image (on a form) with extra info in the tooltips so that the user can hover over a site and see the extra info pop up. I have been asked to host this info on a web page, which I have done for the map only - I copy and overwrite the source image of a simple ASP. Question: How should I go about adding the tooltip functionality? Remember this has to be ...

  1. #1

    Default How to add Tooltips to image at runtime ?

    I have created a VB app that generates a wireless network status map
    several times a day.
    The app adds hidden controls in specific areas of the image (on a
    form) with extra info in the tooltips so that the user can hover over
    a site and see the extra info pop up.

    I have been asked to host this info on a web page, which I have done
    for the map only - I copy and overwrite the source image of a
    simple ASP.

    Question: How should I go about adding the tooltip functionality?
    Remember this has to be done at runtime. Even the number of sites can
    change.

    In VB I added a new control to the image for each site in the database
    at its Lat and Lon but I am not sure how to approch this for an ASP.


    A good ogy would be a web page with a weather map of the USA
    where hovering over bad weather pops up a tooltip showing the current
    temp etc


    Any suggestions?

    Thanks

    Bill
    bill.. Guest

  2. #2

    Default Re: How to add Tooltips to image at runtime ?

    Bill, I would create a grid overlay of the graphic using a transparent
    graphic to the grid size..

    Then set coordinates dynamically from the data

    --
    -dlbjr

    invariable unerring alien


    dlbjr Guest

  3. #3

    Default Re: How to add Tooltips to image at runtime ?

    Gazing into my crystal ball I observed bill.. <bc.com> writing in
    news:i6dcmv4254g1o4nqoojpp4ik69k6a3rc4g4ax.com:
    > A good ogy would be a web page with a weather map of the USA
    > where hovering over bad weather pops up a tooltip showing the current
    > temp etc
    >
    If you're going to be using an image map, then use both the Alt attribute
    and Title attribute in the Area element.

    --
    Adrienne Boswell
    Please respond to the group so others can share
    [url]http://www.arbpen.com[/url]
    Adrienne Guest

  4. #4

    Default Re: How to add Tooltips to image at runtime ?

    <img src=myimage.jpg alt="You are hovering over the great state of Wyoming"
    Title="Up yours">

    "Adrienne" <arbpensbcglobal.net> wrote in message
    news:Xns93F7B282D4A98arbpenyahoocom207.115.63.158 ...
    > Gazing into my crystal ball I observed bill.. <bc.com> writing in
    > news:i6dcmv4254g1o4nqoojpp4ik69k6a3rc4g4ax.com:
    >
    > > A good ogy would be a web page with a weather map of the USA
    > > where hovering over bad weather pops up a tooltip showing the current
    > > temp etc
    > >
    >
    > If you're going to be using an image map, then use both the Alt attribute
    > and Title attribute in the Area element.
    >
    > --
    > Adrienne Boswell
    > Please respond to the group so others can share
    > [url]http://www.arbpen.com[/url]

    Bite My Bubbles Guest

  5. #5

    Default Re: How to add Tooltips to image at runtime ?

    On Mon, 15 Sep 2003 17:18:45 -0500, "dlbjr" <dontknowdo.u> wrote:
    >Bill, I would create a grid overlay of the graphic using a transparent
    >graphic to the grid size..
    >
    >Then set coordinates dynamically from the data

    Ok but how do I reference it in the correct location? - I am pretty
    much a beginner at asp stuff!

    How do I say add a tooltip at x=10, y = 30 and another at x= 100,
    y=100

    An example would really help

    Thanks

    Bill
    bill.. Guest

  6. #6

    Default Re: How to add Tooltips to image at runtime ?

    Bill,
    Here is a simple html with javascript.
    Save as a html and load in your browser.
    I have commented the section of javascript
    where you need to add logic.

    <html>
    <head>
    <title></title>
    <script language="javascript">
    function getCoord(e){
    var x = e.layerX || e.offsetX ;
    var y = e.layerY || e.offsetY ;
    hide();
    show(x,y);
    }
    function show(x,y){
    popup.value = getnote(x,y)
    popup.style.left = x + 15
    popup.style.top = y + 36
    popup.style.height = 50
    popup.style.width = 100
    }
    function hide(){
    popup.value = ""
    popup.style.height = 0
    popup.style.width = 0
    }
    function getnote(x,y){
    /**
    Use server side ASP logic
    to create client side logic here
    Example:
    Have a 2 Dimensional array full of messages to use.
    */
    return "x = " + x + " , y = " + y;
    }
    </script>
    <style>
    ..message
    {
    position:absolute;
    background-color:yellow;
    color:black;
    border-color:black;
    height:0;
    width:0
    }
    </style>
    </head>
    <body>
    <input type=button class="message" id="popup">
    <img src="pic.jpg"
    style="cursor: hand;"
    width="300"
    height="300"
    onmousemove="getCoord(event)"
    onmouseout="hide()"/>
    </body>
    </html>

    HTH,

    -dlbjr

    Discerning resolutions for the alms


    dlbjr Guest

  7. #7

    Default Re: How to add Tooltips to image at runtime ?

    "bill.." <bc.com> wrote in message
    news:i6dcmv4254g1o4nqoojpp4ik69k6a3rc4g4ax.com...
    > Question: How should I go about adding the tooltip functionality?
    > Remember this has to be done at runtime. Even the number of sites
    can
    > change.
    I think the image map as Adrienne and Bubbles described is the way to
    go, but there is something in your terminology (runtime) that hints at
    some expectations that you will not get.

    There is really no such thing as "run time" in the sense I think you
    mean it. In ASP "runtime" occurs only as the server generates the
    page. Runtime ends as soon as the Server finishes sending the page to
    the browser. By the time you can view the page in the browser, the
    "runtime" has already come to an end. The page will never update no
    matter how long you sit and watch it. The only way to display new
    changes is to send a new request to the server and have it send a new
    page based on new data. Now you could have the page rigged to
    automatically refresh every few seconds, like maybe 15 seconds or
    something. But even that isn't really "live" data, it is just static
    data that is updated every 15 seconds.

    The only way to have "live" data is to use some type of streaming
    (like with video) or to have some kind of component on the client that
    maintains a constant connection to the server (which has nothing to do
    with ASP).


    --

    Phillip Windell [CCNA, MVP, MCP]
    [email]pwindellwandtv.com[/email]
    WAND-TV (ABC Affiliate)
    [url]www.wandtv.com[/url]


    Phillip Windell Guest

  8. #8

    Default Re: How to add Tooltips to image at runtime ?

    On Wed, 17 Sep 2003 15:09:11 -0500, "Phillip Windell"
    <pwindellwandtv.com> wrote:
    >"bill.." <bc.com> wrote in message
    >news:i6dcmv4254g1o4nqoojpp4ik69k6a3rc4g4ax.com.. .
    >> Question: How should I go about adding the tooltip functionality?
    >> Remember this has to be done at runtime. Even the number of sites
    >can
    >> change.
    >
    >I think the image map as Adrienne and Bubbles described is the way to
    >go, but there is something in your terminology (runtime) that hints at
    >some expectations that you will not get.
    >
    >There is really no such thing as "run time" in the sense I think you
    >mean it. In ASP "runtime" occurs only as the server generates the
    >page. Runtime ends as soon as the Server finishes sending the page to
    >the browser. By the time you can view the page in the browser, the
    >"runtime" has already come to an end. The page will never update no
    >matter how long you sit and watch it. The only way to display new
    >changes is to send a new request to the server and have it send a new
    >page based on new data. Now you could have the page rigged to
    >automatically refresh every few seconds, like maybe 15 seconds or
    >something. But even that isn't really "live" data, it is just static
    >data that is updated every 15 seconds.
    >
    >The only way to have "live" data is to use some type of streaming
    >(like with video) or to have some kind of component on the client that
    >maintains a constant connection to the server (which has nothing to do
    >with ASP).

    Good point but all I need is a refresh every 5 minutes or so and I
    will be fine

    Thanks

    Bill
    bill.. Guest

Similar Threads

  1. Image control runtime creation issue
    By Jinglesthula in forum Macromedia Flex General Discussion
    Replies: 5
    Last Post: March 15th, 11:06 AM
  2. import a linked bitmap at the runtime crops image.
    By McBeaver in forum Macromedia Director Lingo
    Replies: 1
    Last Post: September 12th, 07:42 PM
  3. Custom Tooltips text at Runtime.
    By Richie Bisset in forum Macromedia Director Lingo
    Replies: 4
    Last Post: September 3rd, 09:59 AM
  4. ToolTips in Safari
    By Scott Heath in forum Mac Networking
    Replies: 4
    Last Post: August 22nd, 07:18 PM
  5. how to change an image url at runtime
    By Mark Kamoski in forum ASP.NET General
    Replies: 0
    Last Post: July 20th, 04:44 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139