Search Results

Search found 2 results on 1 pages for 'user1726508'.

Page 1/1 | 1 

  • unable to calculate textfield values

    - by user1726508
    i am trying to change the input field when users changes the quantity of items in a text field. Here i am iterating my list from my database. Now i have to make invoice for customer. In my code , if i am changing quantity of a single item, then it is effecting all the other items in the list. I want to change only to the specific items,where its quantity has been change. Below code is giving me error. It is changing all the items value on single change of item quantity. my code; <script type="text/javascript"> $(document).ready(function(){ $(function() { $('input[name="quantity"]').change(function() { var unitprice = $('input[name^="unitprice"]').val(); $(this).parents('tr').find('input[name^="price"]').val($(this).val() * unitprice); }); }); }); </script> <tr> <td height="65%" valign="top" width="100%"> <table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0"> <s:iterator value="#session.BOK" status="userStatus"> <tr style="height: 10px;"> <td width="65%" align="left"><s:property value="bookTitile"/></td> <td width="10%" align="left"><s:textfield name="unitprice" value="%{price}" size="4"/></td> <td width="10%" align="center"><s:textfield name="quantity" value="%{quantity}" size="2"/></td> <td width="15%" align="center"><s:textfield name="price" size="6"></s:textfield> </td> </tr> </s:iterator> </table> </td> </tr> output looks like this image...

    Read the article

  • how to get email id from google api response

    - by user1726508
    i am able to get user information from Google API response using oath2 . But i do't know how to get those responses individually . Response i am getting from Google Api: * Access token: ya29.AHES6ZQ3QxKxnfAzpZasdfd23423NuxJs29gMa39MXV551yMmyM5IgA { "id": "112361893525676437860", "name": "Ansuman Singh", "given_name": "Ansuman", "family_name": "Singh", "link": "https://plus.google.com/112361893525676437860", "gender": "male", "birthday": "0000-03-18", "locale": "en" } Original Token: ya29.AHES6ZQ3QxKxnfAzpZu0lYHYu8sdfsdafdgMa39MXV551yMmyM5IgA New Token: ya29.AHES6ZQ3QxKxnfdsfsdaYHYu8TNuxJs29gMa39MXV551yMmyM5IgA But i want only "id" & "name" indiviually to save in my Database table. How can i do this? I got those above response/output By using the below code. public static void main(String[] args) throws IOException { ------------------------- ------------------------- ------------------------- String accessToken = authResponse.accessToken; GoogleAccessProtectedResource access = new GoogleAccessProtectedResource(accessToken, TRANSPORT, JSON_FACTORY, CLIENT_ID, CLIENT_SECRET, authResponse.refreshToken); HttpRequestFactory rf = TRANSPORT.createRequestFactory(access); System.out.println("Access token: " + authResponse.accessToken); String url = "https://www.googleapis.com/oauth2/v1/userinfo?alt=json&access_token=" + authResponse.accessToken; final StringBuffer r = new StringBuffer(); final URL u = new URL(url); final URLConnection uc = u.openConnection(); final int end = 1000; InputStreamReader isr = null; BufferedReader br = null; isr = new InputStreamReader(uc.getInputStream()); br = new BufferedReader(isr); final int chk = 0; while ((url = br.readLine()) != null) { if ((chk >= 0) && ((chk < end))) { r.append(url).append('\n'); } } System.out.print(""); System.out.println(); System.out.print(" "+ r ); //this is printing at once but i want them individually access.refreshToken(); System.out.println("Original Token: " + accessToken + " New Token: " + access.getAccessToken()); }

    Read the article

1