markakapops
06-16-2009, 10:54 AM
I have taken on the task to improve our company store web site. I am trying to create an orderverify page that allows the user to make changes to payment method, ship to address and shipping vendor, via list boxes rather than links that load a new page for each category. This would effect existing customers and the data is pulled using stored procedures.
Server side, the stored procedure runs and we move the data into arrays.
For x = 0 to AddressCount-1
ShippingAddress(x) = rs.fields("ShippingAddress") 'key numeric field
CountryName(x) = trim(rs.fields("CountryName"))
StateAbv(x) = trim(rs.fields("StateAbv"))
StateName(x) = trim(rs.fields("StateName"))
Zip(x) = trim(rs.fields("ZIP"))
County(x) = trim(rs.Fields("County"))
City(x) = trim(rs.fields("City"))
Street2(x) = trim(rs.fields("Street2"))
Street(x) = trim(rs.fields("Street"))
Attention(x) = trim(rs.fields("Attention"))
Name(x) = trim(rs.fields("Name"))
rs.MoveNext
Next
As far as I have gone.
Filling the select list box with the available ship to names
<select id="Ship_fullname" name="Ship_fullname" onchange="getIndex()">
<%
For x = 0 to AddressCount-1
Response.Write("<option value=" & ShippingAddress(x) & "'>" & Name(x) & "</option>")
Next
%>
</select>
I then use the default choice of X(0) to fill in the remaining fields
<div>
<label for="Ship_street_1">address:</label>
<input id="Ship_street_1" type="text" name="Ship_street_1" value=" <%Response.Write(Street(0))%>" />
</div>
So the array is server side, and the any change to the list box would be client side, from the information I have gathered this sounds like a job for ajax.
Any help would be appreciated, even a none ajax solution.
Thank you
Mark
Server side, the stored procedure runs and we move the data into arrays.
For x = 0 to AddressCount-1
ShippingAddress(x) = rs.fields("ShippingAddress") 'key numeric field
CountryName(x) = trim(rs.fields("CountryName"))
StateAbv(x) = trim(rs.fields("StateAbv"))
StateName(x) = trim(rs.fields("StateName"))
Zip(x) = trim(rs.fields("ZIP"))
County(x) = trim(rs.Fields("County"))
City(x) = trim(rs.fields("City"))
Street2(x) = trim(rs.fields("Street2"))
Street(x) = trim(rs.fields("Street"))
Attention(x) = trim(rs.fields("Attention"))
Name(x) = trim(rs.fields("Name"))
rs.MoveNext
Next
As far as I have gone.
Filling the select list box with the available ship to names
<select id="Ship_fullname" name="Ship_fullname" onchange="getIndex()">
<%
For x = 0 to AddressCount-1
Response.Write("<option value=" & ShippingAddress(x) & "'>" & Name(x) & "</option>")
Next
%>
</select>
I then use the default choice of X(0) to fill in the remaining fields
<div>
<label for="Ship_street_1">address:</label>
<input id="Ship_street_1" type="text" name="Ship_street_1" value=" <%Response.Write(Street(0))%>" />
</div>
So the array is server side, and the any change to the list box would be client side, from the information I have gathered this sounds like a job for ajax.
Any help would be appreciated, even a none ajax solution.
Thank you
Mark