My plan is to make a page of product details. When customer view my product page, they can only see product ID, the name and the price, if they want to see more information or want to add the product to basket online, They can click on "more details" to go on.
On product page, I input "More Details" in the cell of table as below:
then, I highlight the text and switch to Server Behavior panel of Dreamweaver. Next, I drop down a server behavior menu by clicking on a sign "+" and choose a function called "Go to Detail Page"
A pop up window appear as a picture shown below:
As the link shown as "More Details", the detailed product page is in process.
I create a new ASP page called "productDetail.asp" then upload to the hosting server. this page is to store what product a customer want to view more detail . After that, I browse and choose productDetails.asp.
If the connection is still available, the product ID will be put in a text field of "Pass URL parameter" by default, then Set Value of Recordset "the name of recordset that we created "
column is also automatically setup with product ID.
Finally, I tick URL Parameters of "Passing Existing Parameters"
My next step is to create a product detail page
at this stage, I replace a cell of "more details" with Description row
Following the tutorial from webthang , I create a form, that contains 3 hidden text fields and a submit button, is named "addForm" with action="shopCart.asp" and "POST" method.
I click on each hidden textfield and name them as pid, productName, productPrice respectively
Then clicking on the button in order to change its name to "Add to Cart"
In case, If I would like to add an image for the button, I can follow a method shown below:
On the bottom right of Dreamweaver, there is a Quick Tag Editor which can help me edit a code directly instead switching to Code View.
When it is done, I can see it like
However, it is looked badly so I make up my mind to use simple button.
Moreover, I need to do a binding technique which makes hidden textfield of "addForm" Form link to shopCart.asp
First of all, selecting a hidden textfield such as productID, then clicking on proID on Binding Panel , on a row of "Bind to", choose "input.value" then clicking on Bind button.
At final stage, I preview my work on the browser.
Unfortunately, there is a error for the form with hidden textfields. Following the hint of error message. I switch to Code View then pick up a root of error.
Finally, I post my question on forum online
then get the answer relevant to my considering queston:
Following the hint above, I fix recordset in the web page then get the working result.
No comments:
Post a Comment