change datasource via javascript

View: New views
1 Messages — Rating Filter:   Alert me  

change datasource via javascript

by -Oliver- :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,

I am a beginner in using xul, so i have the first problem, which I can not solve alone.

I have a very simple xul page.

<?xml version="1.0"?>
<window xmlns:html="http://www.w3.org/1999/xhtml"
                xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
        <hbox>
                <vbox>
                        <label value="resource a" onclick="document.getElementById('abc').datasources='SearchResources_a.rdf';" />
                        <label value="resource c" onclick="document.getElementById('abc').datasources='SearchResources_c.rdf';"/>
                        <label value="resource null" onclick="document.getElementById('abc').datasources='rdf:null';"/>
                </vbox>
                <vbox id="abc" datasources="SearchResources_a.rdf" ref="metahunt#sequence" style="border:1px red solid">
                        <template>
                                <label uri="rdf:*" value="rdf:http://metahunt.technikum-wien.at#title" />
                        </template>
                </vbox>
        </hbox>
</window>


At the begin, searchresources_a is load, but i can not switch to c. however if a switch to null and back to a, it works.

what is wrong?

Thank you very much!!!!!
Oliver