Hi Yee,

You could do something like this instead (using the subcontent trick):

    <img ex:src-subcontent="http://foo.com/...?param={{.graphUtil}}"; />

More documentation here:

    http://simile.mit.edu/wiki/Exhibit/Dynamic_URLs

As for multiple popups: not at the moment. What's the usage scenario?

David

Yee-Ting Li wrote:
> Hi David,
>
> I've been trying to get the dynamic graphs which i described earlier  
> to respond to some user information. specifically, the user input  
> from a <select><option/></select> list controls the history period of  
> the graph.
>
> i have backend scripts that will draw the graphs on supplying a  
> parameter to the end of the url of the graph.
>
> the idea is that i would create some simple javascript that will  
> getElementById on the <img/> tag for the graph and rewrite the src  
> attribute to fetch a new graph (basically amending an argument to the  
> url).
>
> so i have
>
> <img id="graphUtil" ex:src-content=".graphUtil"/>
>
> however, upon inspecting the dom with firebug, i've noticed that the  
> <img/> on the display no longer contains the id; also the entire div  
> for the popup bubble also does not contain any id's on the divs.  
> therefore, i cannot actually reliably rewrite the url for the graph :(
>
> is the stripping of the id's intentional in exhibit?
>
> is there a way i can retrieve the value and write to the value  
> of .graphUtil at run time?
>
> also, is there a way i can have multiple popup bubbles? each with  
> their own content?
>
> thanks,
>
> Yee.
>
> On 25 Jul 2007, at 20:19, David Huynh wrote:
>
>   
>> Then you need to put in this code:
>>
>> SimileAjax.WindowManager._cancelPopups = function() {
>>     // don't do anything
>> };
>>
>>
>> Cheers,
>>
>> David
>>
>> Yee-Ting Li wrote:
>>     
>>> thanks David, that worked like a charm.
>>>
>>> to give some background to my next question: i have a popup with
>>> shows graphs of the utilisation of router ports. i would like to be
>>> able to control the time range of these graphs with a drop down list
>>> using the standard html <select><option/></select> and some backend
>>> javascript.
>>>
>>> however, because the bubble closes if you click anywhere within it,
>>> the drop down list becomes useless as the bubble closes as soon as i
>>> let go of the mouse.
>>>
>>> is there an option to only close the bubble when the 'close' icon is
>>> clicked on within the bubble?
>>>
>>> also, for the type of information that i am presenting, it is useful
>>> to have multiple popup bubbles with different content within each
>>> one. is this possible within exhibit?
>>> thanks,
>>>
>>> Yee.
>>>
>>> On 25 Jul 2007, at 06:32, David Huynh wrote:
>>>
>>>
>>>       
>>>> Yee-Ting Li wrote:
>>>>
>>>>         
>>>>> great, thanks David - that helped a lot.
>>>>>
>>>>> on a related matter, is there a way i can define the size of the
>>>>> popup? because i'm including graphs in the popup bubble, they are
>>>>> often larger than the default size of the popup and hence i have to
>>>>> scroll to see them...
>>>>>
>>>>>
>>>>>           
>>>> Yee, unfortunately there is no setting for that in version 1.0  
>>>> (there
>>>> will be in 2.0). For now, you can override the size with some
>>>> javascript
>>>> code that you include after you include exhibit-api.js.
>>>>
>>>> <script>
>>>> Exhibit._Impl.prototype.showItemInPopup = function(itemID, elmt) {
>>>>     var coords = SimileAjax.DOM.getPageCoordinates(elmt);
>>>>     var bubble = SimileAjax.Graphics.createBubbleForPoint(
>>>>         document,
>>>>         coords.left + Math.round(elmt.offsetWidth / 2),
>>>>         coords.top + Math.round(elmt.offsetHeight / 2),
>>>>         400, // px
>>>>         300  // px
>>>>     );
>>>>
>>>>     var itemLensDiv = document.createElement("div");
>>>>     var itemLens = new Exhibit.Lens(itemID, itemLensDiv, this,
>>>> this._configuration);
>>>>     bubble.content.appendChild(itemLensDiv);
>>>> };
>>>> </script>
>>>>
>>>>
>>>> You can change where it says 400 and 300.
>>>>
>>>> Cheers,
>>>>
>>>> David
>>>>
>>>>         
>>>>> cheers,
>>>>>
>>>>> Yee.
>>>>>
>>>>> On 20 Jul 2007, at 18:57, David Huynh wrote:
>>>>>
>>>>>
>>>>>
>>>>>           
>>>>>> Yee-Ting Li wrote:
>>>>>>
>>>>>>
>>>>>>             
>>>>>>> Hi David,
>>>>>>>
>>>>>>> thanks for the reply. i'm not too fussed about duplicating  
>>>>>>> data at
>>>>>>> the moment, so your first suggestion is a good one. once we get
>>>>>>> to a
>>>>>>> production system for our exhibit'd data, then we will consider
>>>>>>> using
>>>>>>> version 2... unless there are features in version 2 which may be
>>>>>>> useful to us now... ;)
>>>>>>>
>>>>>>> unfortunately, due to the security sensitive nature of the  
>>>>>>> data we
>>>>>>> are presenting, we can not provide you a url of our exhibit. :(
>>>>>>>
>>>>>>> One feature of exhibit that i do like is the popup lenses that  
>>>>>>> work
>>>>>>> on the thumbnail views. is there a way i can make this work on  
>>>>>>> the
>>>>>>> Tabular view? ie if we click on a particular cell, then it will
>>>>>>> bring
>>>>>>> up a bubble of other data. i've tried just copy and pasting the
>>>>>>> relevant code into the Exhibit.TabularView for a  
>>>>>>> ex:role="exhibit-
>>>>>>> lens", but it doesn't work :(
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>               
>>>>>> What you need to do is declare the value type of the property (in
>>>>>> that
>>>>>> column) to be "item". So you data file will look something like
>>>>>> this,
>>>>>> if, say, your data is about products and manufacturers:
>>>>>>
>>>>>> {
>>>>>>     items: [
>>>>>>        {   "label":   "Segway",
>>>>>>             "type" : "Product",
>>>>>>             "manufactured-by" : "Segway Inc.",
>>>>>>             "sold-at" : "Walmart"
>>>>>>        },
>>>>>>        {   "label": "Segway Inc.",
>>>>>>              "type": "Company"
>>>>>>        },
>>>>>>        {   "label": "Walmart",
>>>>>>             "type": "Company"
>>>>>>        }
>>>>>>     ],
>>>>>>     properties: {
>>>>>>        "manufactured-by" : {
>>>>>>           valueType: "item"
>>>>>>        },
>>>>>>        "sold-at" : {
>>>>>>           valueType: "item"
>>>>>>        }
>>>>>>     }
>>>>>> }
>>>>>>
>>>>>>
>>>>>>
>>>>>>             
>>>>>>> also i'm not completely sure of the syntax of the lens reference:
>>>>>>> does the <span ex:content="value".> always create a link to the
>>>>>>> popup
>>>>>>> of the definition <div ex:role="exhibit-lens">? what if i want  
>>>>>>> more
>>>>>>> than one type of popup on the same page?
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>               
>>>>>> Many lens templates can be defined for different item types, e.g.,
>>>>>>
>>>>>>     <div ex:role="exhibit-lens" ex:itemTypes="Product"> ... </div>
>>>>>>
>>>>>>     <div ex:role="exhibit-lens" ex:itemTypes="Company"> ... </div>
>>>>>>
>>>>>> Version 2.0 will be more flexible.
>>>>>>
>>>>>> Hope that helps,
>>>>>>
>>>>>> David
>>>>>>
>>>>>> _______________________________________________
>>>>>> General mailing list
>>>>>> [email protected]
>>>>>> http://simile.mit.edu/mailman/listinfo/general
>>>>>>
>>>>>>
>>>>>>             
>>>>> _______________________________________________
>>>>> General mailing list
>>>>> [email protected]
>>>>> http://simile.mit.edu/mailman/listinfo/general
>>>>>
>>>>>
>>>>>           
>>>> _______________________________________________
>>>> General mailing list
>>>> [email protected]
>>>> http://simile.mit.edu/mailman/listinfo/general
>>>>
>>>>         
>>> _______________________________________________
>>> General mailing list
>>> [email protected]
>>> http://simile.mit.edu/mailman/listinfo/general
>>>
>>>       
>> _______________________________________________
>> General mailing list
>> [email protected]
>> http://simile.mit.edu/mailman/listinfo/general
>>     
>
> _______________________________________________
> General mailing list
> [email protected]
> http://simile.mit.edu/mailman/listinfo/general
>   

_______________________________________________
General mailing list
[email protected]
http://simile.mit.edu/mailman/listinfo/general

Reply via email to