Wierd Problem

1. Member
Join Date
Dec 1969
Posts
46

## Wierd Problem

I have a file which inserts data into a master table and the details table. the code is as below<BR><BR> if session("cartid")="" then<BR> set rs=conn.execute("exec createcart &#039;" & session<BR> ("username") & "&#039;,&#039;" & date() & "&#039;")<BR> cartid=rs.fields(0)<BR> session("cartid")=cartid<BR> end if<BR><BR> rates=request("txtrates")<BR> qty=request("txtquantity")<BR> if right(rates,1)="," then rates=left(rates,len(rates)-1)<BR> if right(qty,1)="," then qty=left(qty,len(qty)-1)<BR><BR> arrItems=split(request("itemwanted"),",")<BR> arrRates=split(rates,",")<BR> arrQty=split(qty,",")<BR> i=0<BR> do while i&#060;= ubound(arrItems)<BR> conn.execute("exec AddCartDetails " & session<BR> ("cartid") & "," & arrItems(i) & "," & arrQty(i) <BR> & "," & arrRates(i))<BR> i=i+1<BR> loop<BR><BR>When this page is executed it writes data into the master file and then the details table..But when writing in the details table, it writes each record twice..I have not been able to find out the error as to why it writes each record twice.<BR><BR>Also after submitting once, if i refres the page, then it writes each record once.. Only the first time, it writes each record twice.<BR><BR>Any clue?<BR><BR>thnx

2. Senior Member
Join Date
Dec 1969
Posts
972

## RE: Weird Problem

I have had a similar problem once. That was caused by an onclick="submit()" event on a submit button, so that the page was submitted twice. Sounds like a bug in IE...

#### Posting Permissions

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