javascript - How to send binded data from on site to another? -


ok, got problem looks this:

i got class student id, name, last name... got class bankaccount id, name, amount...

i have site, table data (few students(id, name, last name)) on it...and input fields...and list box call this:

http://localhost:8080/creditcardweb/indexstud.html 

once press row on table, students id, name , lastname shown in input fields... , students bankaccounts (if any) shown on listbox

so far good....

step 1: select 1 student table step 2: press button, once pressed, opens site...

http://localhost:8080/creditcardweb/indexbankarskiracun.html 

but want this:

http://localhost:8080/creditcardweb/indexbankarskiracun?stud_id=1          1 @ end id of student.... 

there got input field id of student, , id, name , amount account... , there table, students accounts...but empty...because have no idea how data...

how it? code far:

on first site got this: input fields:

        <p>id</p>         <input ng-model="student.id">         <p>name</p>         <input ng-model="student.firstname">         <p>last name</p>         <input ng-model="student.lastname"> 

the button load new page:

<button ng-click="gotoaccounts()">manage accounts</button> 

the listbox:

<select style="width: 100px;"                 ng-model="student.accounts"                   multiple="multiple"                 ng-options="account.name account in selectedstudent.accounts track account.id"          >          </select> 

the table:

    <table border="1" name="tablestud" arrow-selector>         <tbody>             <tr>                 <td>id</td>                 <td>first name</td>                 <td>last name</td>             </tr>              <tr ng-repeat="student in result"                 ng-class="{'selected':$index == selectedrow}"                 ng-click="setselected(student,$index)">                 <td>{{ student.id }}</td>                 <td>{{ student.firstname }}</td>                 <td>{{ student.lastname }}</td>             </tr>         </tbody>     </table> 

the second site:

       <p>students id</p>         <input ng-model="student.id">   <!--here need -->         <p>id</p>         <input ng-model="account.id">   <!--here need -->         <p>ime</p>         <input ng-model="account.name">    <!--here need -->         <p>iznos</p>         <input ng-model="account.amount">    <!--here need -->   <a href=http://localhost:8080/creditcardweb/indexstud.html>back students</a>           <table name="tablebr" border="1" arrow-selector>         <tbody>             <tr>                  <td>id</td>                 <td>name</td>                 <td>amount</td>             </tr>              <tr ng-repeat="racun in result"                 ng-class="{'selected':$index == selectedrow}"                 ng-click="setselected(account,$index)">                 <td>{{ account.id }}</td>                 <td>{{ account.name }}</td>                 <td>{{ account.amount}}</td>             </tr>          </tbody>     </table> 

and controllers:

    $scope.gotoaccounts = function() {         window.location = "http://localhost:8080/creditcardweb/indexbankarskiracun.html";}  //dont know if helps understand     $scope.setselected = function(student, index) {         $scope.student = student;         $scope.selectedrow = index;         $scope.selectedstudent = student;     }; 

thats all, hope can me....thx in advance


Comments

Popular posts from this blog

asynchronous - C# WinSCP .NET assembly: How to upload multiple files asynchronously -

aws api gateway - SerializationException in posting new Records via Dynamodb Proxy Service in API -

asp.net - Problems sending emails from forum -