0 Replies Latest reply on Feb 25, 2011 5:25 AM by Loffen89

    I have made my script static instead of making it to load dynamic script

    Loffen89

      This code is static,  how do i do this over to dynamical.

      The  thing is that i must be able to open several loke alike dokuments so it  makes no deference what the user writes on the internett page of my,

      here is my code is it is now:

       

       

      <?xml version="1.0" encoding="utf-8"?>
      <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
                     xmlns:s="library://ns.adobe.com/flex/spark"
                     xmlns:mx="library://ns.adobe.com/flex/mx">
          <fx:Declarations>
              <fx:XML id="myXML"
                      source="http://www.student.hint.no/~100471/mmt134/images/Reiseregning-Konradi_ Kare_2011-01-30.xml" />
              <fx:XML id="yourXML"
                      source="http://www.student.hint.no/~100471/mmt134/images/Reiseregning-Konradi_ Kare_2011-02-01.xml" />
              <fx:XML id="howXML"
                      source="http://www.student.hint.no/~100455/Reiseregning-Toff_Tor_2011-02-01.xm l" />
              <fx:XML id="thisXML"
                      source="http://www.student.hint.no/~100455/Reiseregning-Thorson_Thor_2011-02-0 3.xml" />
          </fx:Declarations>
         
          <mx:TabNavigator x="72" y="34" width="539" height="288">
              <s:NavigatorContent label="Tab 1" width="100%" height="100%">
                  <mx:DataGrid dataProvider="{myXML.descendants('TravelSpecificationVO')}" x="3" y="0" width="524" height="245">
                      <mx:columns>
                          <mx:DataGridColumn dataField="to_destination" headerText="Til destinasjon"/>
                          <mx:DataGridColumn dataField="from_date" headerText="Klokkeslett"/>
                          <mx:DataGridColumn dataField="from_destination" headerText="Fra destinasjon"/>
                          <mx:DataGridColumn dataField="to_date" headerText="Klokkeslett"/>
                      </mx:columns>
                  </mx:DataGrid>
              </s:NavigatorContent>
              <s:NavigatorContent label="Tab 2" width="100%" height="100%">
                   <mx:DataGrid  dataProvider="{yourXML.descendants('TravelSpecificationVO')}" x="3"  y="0" width="524" height="245">
                      <mx:columns>
                          <mx:DataGridColumn dataField="to_destination" headerText="Til destinasjon"/>
                          <mx:DataGridColumn dataField="from_date" headerText="Klokkeslett"/>
                          <mx:DataGridColumn dataField="from_destination" headerText="Fra destinasjon"/>
                          <mx:DataGridColumn dataField="to_date" headerText="Klokkeslett"/>
                      </mx:columns>
                  </mx:DataGrid>
              </s:NavigatorContent>
              <s:NavigatorContent label="Tab 3" width="100%" height="100%">
                   <mx:DataGrid  dataProvider="{howXML.descendants('TravelSpecificationVO')}" x="3" y="0"  width="524" height="245">
                      <mx:columns>
                          <mx:DataGridColumn dataField="to_destination" headerText="Til destinasjon"/>
                          <mx:DataGridColumn dataField="from_date" headerText="Klokkeslett"/>
                          <mx:DataGridColumn dataField="from_destination" headerText="Fra destinasjon"/>
                          <mx:DataGridColumn dataField="to_date" headerText="Klokkeslett"/>
                      </mx:columns>
                  </mx:DataGrid>
              </s:NavigatorContent>
              <s:NavigatorContent label="Tab 4" width="100%" height="100%">
                   <mx:DataGrid  dataProvider="{thisXML.descendants('TravelSpecificationVO')}" x="3"  y="0" width="524" height="245">
                      <mx:columns>
                          <mx:DataGridColumn dataField="to_destination" headerText="Til destinasjon"/>
                          <mx:DataGridColumn dataField="from_date" headerText="Klokkeslett"/>
                          <mx:DataGridColumn dataField="from_destination" headerText="Fra destinasjon"/>
                          <mx:DataGridColumn dataField="to_date" headerText="Klokkeslett"/>
                      </mx:columns>
                  </mx:DataGrid>
              </s:NavigatorContent>
          </mx:TabNavigator>
         
      </s:Application>