Results 1 to 2 of 2

Thread: shahira

  1. #1
    Join Date
    Dec 1969

    Default shahira

    hi guys<BR>I am new to ASP and Javascript and have been asked to develop a prototype site - I have had real trouble trying to read a variable pulled from the database - the value I have inserted into a form from moving through the database is - &#060;%=strProductPrice%&#062; and multiplying this with a quantity selected by the User - ideally through a select box.<BR>I want the result to be written into a text box - p_quantity<BR>I am not sure how the javascript and asp communicate with each other - is it better to set up an html page with asp tags in it/ an asp page with html and javascript embedded within it.<BR><BR>Are there any resources you can recommend.<BR><BR>any references / answers gratefully received<BR>shahira

  2. #2
    Join Date
    Dec 1969

    Default I will say one thing...

    I *definitely* think that, especially when you are learning, you should create your entire HTML page, as well as you possibly can, and *THEN* modify it to add the ASP coding.<BR><BR>For example, you want to multiply something from ASP (a product price) by a value from a &#060;SELECT&#062; list. Fine. Design the HTML page so it does all of that, but *temporarily* just use a constant value for the price (e.g., just always multiply the quantity by 2.75). Then, when the HTML *and* the JavaScript code all works (and you can get the value $11.00 to appear when 4 items are chosen from the &#060;SELECT&#062;), *then* go add the ASP code to put a value from the DB into the JS code in place of that constant 2.75. <BR><BR>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts