Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Java
  4. set database value to java script var on Js file

set database value to java script var on Js file

Scheduled Pinned Locked Moved Java
javajavascripthtmldatabasetools
3 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    swapnil66
    wrote on last edited by
    #1

    i have created one java servlet code from which i get 3 field from database table and i want to show this field on my js(java script) page in html tag like Name= and i want to show first name field from datbase infront of lable Name..

    D 1 Reply Last reply
    0
    • S swapnil66

      i have created one java servlet code from which i get 3 field from database table and i want to show this field on my js(java script) page in html tag like Name= and i want to show first name field from datbase infront of lable Name..

      D Offline
      D Offline
      David Skelly
      wrote on last edited by
      #2

      OK, now we know what you want. What's your question?

      S 1 Reply Last reply
      0
      • D David Skelly

        OK, now we know what you want. What's your question?

        S Offline
        S Offline
        swapnil66
        wrote on last edited by
        #3

        i have created a one java script file in that i have written a html code in boilerplate variable and ajax to call servlet . in java servlet i have written a code for select query as to select data from database table and store tihs value in resultset i want to store this resultset value in to javascript variable. how i store it ??????? eg:-suppose i have table with firstname and Lastname fields and if i retrive this column in java servlet then i want this two column value to save/store in a java script variable on java script file like var fname=???? var lname=????

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups