Hi, I have this problem I'm doing a shoppincart in ASP with a bidimensional array where insert folowing items:id, name, price and quantity(isn't important, 'couse I don't use it)
<%
' Define Constants
CONST CARTPID = 0
CONST CARTPNAME = 1
CONST CARTPPRICE = 2
CONST CARTPQUANTITY = 3
'Define
DIM localCart( 4, 20 )
localCart = Session( "cart" )
%>

The index.asp page send variable codigo to the shoppincart.asp page:
<a href="shoppingcart.asp?codigo=<%=RS("codigo")%>

and shoppincart page receive codigo:
productID = TRIM( Request( "codigo") )
then request DB to read name of product and price. I use a SQL Server DB
<%
SQL ="SELECT * FROM dbo.PrecioPublicaciones WHERE (codigo='"&productID&"')"
Set RSDatos=Conn.Execute(SQL)
productName = CStr(RSDatos( "titulo" ))
productPrice = RSDatos( "precio" )
%>
Later in a loop insert items in the cart

FOR i = 0 TO UBOUND( localCart, 2 )
IF localCart( CARTPID, i ) = "" THEN
localCart( CARTPID, i ) = productID
localCart( CARTPNAME, i ) = productName
localCart( CARTPPRICE, i ) = CInt(productPrice)
localCart( CARTPQUANTITY, i ) = 1
EXIT FOR
END IF
NEXT
I have a listbox ( a select) where customer must choose a country to receive the merchandise, prices must depend on which country the customer will choose. Here is the code:
<select name="CodPaisArea" class="combo" onChange="CambiarPrecio(this.form);CodPaisArea.value=this.value;" >
<option value="none" selected>Choose country........</option>
<%do while not RSPais.EOF
sel = ""
if RSPais("Cod") = CodPais then
sel = "selected"
end if%>
<option value="<%=RSPais("Area")%><%=RSPais("Cod")%>" <%=sel%>><%=RSPais("nombre_esp")%></option>
<%RSPais.MoveNext
Loop%>
</select>

here comes my doubt on the Function CambiarPrecio():

<SCRIPT LANGUAGE="JavaScript">
function CambiarPrecio(form) {
if (form.CodPaisArea.options[form.CodPaisArea.selectedIndex].value != "none") {
CodArea=(form.CodPaisArea.value).substring(0,1)
alert(CodArea)
<%
SQL1 ="SELECT * FROM dbo.PrecioPublicaciones WHERE (codigo='"&productID&"') and (Area='"&CodArea&"')"
Set RSDatos1=Conn.Execute(SQL1)
'response.write(productID)
%>
.............

Here I'd like to change the price of which items in a localCart array something like this: CARTPPRICE, i )=new_price , but I donīt know how.
If someone can help me.....

Greetings,

Arsenio.