Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Passing Variables

Status
Not open for further replies.

anastasia

Programmer
Dec 13, 2000
111
GB
Hi, My problem is that I have a form ceated which lets the user type in a Quantity in a form. This is then passed onto the next form.

the problem occurs when I have to click on a delete button to delete an item from an Array. This goes through all of the code on this page as this page is referenced in the button. Because it starts again through the code from the start of the page an error occurs in that it cannot find:

<CFSET session.basket[ArrayLen(session.basket)][9]=form.quantity>

As the Quanity has not been passed as it was previously from the previous form. I need a way of getting this value from the previous form and storing it on this form?

Thanks.
 
this question has been answered many many many times
please perform a search, in this forum, in the jscript one, and in the html/dhtml one - and check for the faqs as well
after that, if you still haven't found out, then come back and i'll answer
but you won't need to come back as the answer has been given more than 10 times !!! ;-)
 
iza thanks again for your reply, however I have tried hidden forms not working and passing the variable through the url also doesnt work. I am not sure what I am trying to do. Whether the code is all in the button or not? I still get the error looking for the form.quantity which exists beore as it was put into the array and displayed in the table.

I am finding this a very difficult task as I have not done anything like this before.

Thanks anyway.

Anne.
 
&quot;I am not sure what I am trying to do&quot; --> this is why it is though. As soon as you KNOW what you want to do then it'll be easy !!!
 
iza, thanks for your reply. I do know what I have to do and that is to somehow store the for,.quantity in such a way that it is accessible through the cehckout form when loaded again. As when the form is first loaded the form.quantity is passed through but because the form is loaded agian by clicking on the delete button the alue is obviously lost. I know that hidden values are sometimes used for passin form data from form to form but not sure how they work exactly in Cold Fusion, however this may be the wrong idea?

Thanks anyway.
 
hidden forms are an html problem
go to the html forum, i've seen the answer there
anyway why do you want to ADD when you press DELETE ?
 
Thanks again iza for your reply, however I have now estalished what I have to do or what I am going to do. I have started a new thread called Update Array.

Bye for now

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top