Hello,
I am trying to get an alert box to pop up as a result of a user
clicking on a button inside a custom display. The alert would show
what a variable inside that particular exhibit was. The code for the
view is shown in detail at the end but the basics of what I need is
this:
<td><span ex:content=".label"></span><input type="button"
onclick="show_alert(.label)" value="Add new tag" /></td>
where .label is the value inside the exhibit. Is it possible to pass
it to a function? I have seen another post where the function was
declared like Exhibit.Functions["show_alert"] but I couldn't get that
to work and it seems that it doesn't like the show_alert(.label) bit.
So far everything else in Exhibit has been really simple and quick to
use so well done to all involved.
Cheers,
Ian
<div ex:role="view"
ex:label="Variables"
ex:collectionID="variableTypes"
ex:viewClass="TabularView"
ex:columns=".label, .description, .tag, .survey"
ex:columnLabels="name, description, tags, year"
ex:columnFormats="list, list, list, list"
ex:sortColumn="2"
ex:sortAscending="false"
ex:showToolbox='true'
style="display: none;">
<table style="display: none;">
<tr>
<td><span ex:content=".label"></span></
td>
<td><span ex:content=".description"></
span></td>
<td><span ex:content=".tag"></span><input
type="button"
onclick="show_alert(.label)" value="Add new tag" + .label /></td>
<td><span ex:content=".survey"></
span></td>
</tr>
</table>
</div>
and the function it would call is
<script type="text/javascript">
function show_alert(varType)
{
alert("You could add a tag here for " + varType);
}
</script>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"SIMILE Widgets" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/simile-widgets?hl=en
-~----------~----~----~----~------~----~------~--~---