I need a bit of help

Greetings. I am new to this forum and I am in need of a bit of help. I have a project I am working on. I am needing to take information from a Javascript page (textbox) and use the value from it to query a database using an aspx page. When the query is run, I will then have to display information from the database back onto the Javascript page.

For example, I want to enter a product number on the Javascript page and display an image and brief desciption of the product. The image and description are fields in the database whose primary key is the product number. I know I can do this using aspx pages for both (datagrids) but I want the "form" on a Javascript page. I also know that I will need a table to display the data coming from the database.

My main problem is getting the value of the textbox on the Javascript page to be "recognized" in the sql query in VB code of the aspx page to pull the data from the database.

The database will either be Access or Microsoft SQL Server.

Thank you.

Comments

  • : Greetings. I am new to this forum and I am in need of a bit of help. I have a project I am working on. I am needing to take information from a Javascript page (textbox) and use the value from it to query a database using an aspx page. When the query is run, I will then have to display information from the database back onto the Javascript page.
    :
    : For example, I want to enter a product number on the Javascript page and display an image and brief desciption of the product. The image and description are fields in the database whose primary key is the product number. I know I can do this using aspx pages for both (datagrids) but I want the "form" on a Javascript page. I also know that I will need a table to display the data coming from the database.
    :
    : My main problem is getting the value of the textbox on the Javascript page to be "recognized" in the sql query in VB code of the aspx page to pull the data from the database.
    :
    : The database will either be Access or Microsoft SQL Server.
    :
    : Thank you.
    :
    I would use an URL query for that. I don't know the asp code for it but the javascript code is pretty simple:
    [code]
    function getURL(productCode)
    {
    window.location = "mypage.asp?pc="+productcode;
    }
    [/code]
    Obviously you need to change the location to match your page. The HTML code for a button and edit would then look like this:
    [code]




    [/code]
    Then you can use the asp to produce the correct page for the product.
  • : : Greetings. I am new to this forum and I am in need of a bit of help. I have a project I am working on. I am needing to take information from a Javascript page (textbox) and use the value from it to query a database using an aspx page. When the query is run, I will then have to display information from the database back onto the Javascript page.
    : :
    : : For example, I want to enter a product number on the Javascript page and display an image and brief desciption of the product. The image and description are fields in the database whose primary key is the product number. I know I can do this using aspx pages for both (datagrids) but I want the "form" on a Javascript page. I also know that I will need a table to display the data coming from the database.
    : :
    : : My main problem is getting the value of the textbox on the Javascript page to be "recognized" in the sql query in VB code of the aspx page to pull the data from the database.
    : :
    : : The database will either be Access or Microsoft SQL Server.
    : :
    : : Thank you.
    : :
    : I would use an URL query for that. I don't know the asp code for it but the javascript code is pretty simple:
    : [code]
    : function getURL(productCode)
    : {
    : window.location = "mypage.asp?pc="+productcode;
    : }
    : [/code]
    : Obviously you need to change the location to match your page. The HTML code for a button and edit would then look like this:
    : [code]
    :
    :
    :
    :
    : [/code]
    : Then you can use the asp to produce the correct page for the product.
    :
    Thanks zibadian for your assistance. When I saw that you concatenated in the window.location line, I knew where I had made my mistake: I did not concatenate it . When I used your suggestion, it worked like I needed it to. Thank you so very much for your help.
  • hi,
    i need to connect the sql data base with the jsp code
    this is my 1st project and can u please send me any code that can help
    the form will have some text boxes and takes the input to feed into the sql data base and it must also get data from sql and print in the text boxes




Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories