TimBiesiek
Programmer
Hi all,
I am a bit of a newbie to Javascript, only starting to use it now with AJAX.
I have an ASP page that lists products, and next to each product is a button. I want this button to call a Javascript function that updates a div area that shows an included ASP page (The shopping cart). The code I have is:
The part in red just shows an ASP part of the page that returns the Product ID.
When the page loads it shows an error notification at the bottom of the IE page, stating:
If I take out the onclick event bit, the page loads fine, but it obviously doesn't do what I want when the button is clicked.
Can anyone help me here? I've tried all sorts...
Thanks!
I am a bit of a newbie to Javascript, only starting to use it now with AJAX.
I have an ASP page that lists products, and next to each product is a button. I want this button to call a Javascript function that updates a div area that shows an included ASP page (The shopping cart). The code I have is:
Code:
response.Write("<td><button type='button' onclick='RefreshCart('Add', "[red] & RsProducts("ProductID") & [/red]", 1)'>Add to Cart</button></td>")
The part in red just shows an ASP part of the page that returns the Product ID.
When the page loads it shows an error notification at the bottom of the IE page, stating:
Code:
Line: 120
Char: 1
Error: Syntax Error
Code: 0
If I take out the onclick event bit, the page loads fine, but it obviously doesn't do what I want when the button is clicked.
Can anyone help me here? I've tried all sorts...
Thanks!