Popup Windows and Shopping Carts
I've created a shopping cart, that brings back the results when someone does a search for a part. I have a display parts page where you can add or delete parts from the shopping cart. I'm wondering if anyone has any idea about, it there are multiple parts with the same part number but different condition of the part to be able to hot link the part number on the main display parts page, to open a new window to display all the different conditions with checkboxs and check the part number with the part condition to add it to the cart. But on the main page, display the checkbox as grayed out?
Thanks in advance.....
[640 byte] By [
PatLy] at [2007-9-27 14:50:34]

i dont know if i clearly under stand what you want.
but some ideas that you may need.you can tell the opener in javascript to disable a form element.so if you click on a part in your new window have it also onclick=opener.document.form1.part234.enable=false
is that sorta what you want?just have jsp draw the forms so that they have names and ids that are numberd the same as the part so that when you touch that part on another window (drawn similarly) you can disable or whatever that same thing on the previous page..
does that help?
Sort of.....I have the parts being returned in a page with next and previous buttons....when there are multiple parts with same number...I need to mark that part as a href maybe and then on click open a new window with the parts listed and their condition. On the main page disable the checkbox, they can only check the checkbox in the pop up window, click add to cart and then close the window. I don't want them to pick the part from the main page, if there are multiple parts. So on load of the the jsp, I need the box disabled and the parts number href'd. All other parts without multiple will show the checkbox as enabled on the main page....I was thinking in the database which resides on the AS/400, I should add a field called Multiple and flag as either Y or N. If the results bring back a Y, then on the jsp page so that part as being href'd and the checkbox disabled. Make sense?
PatLy at 2007-7-5 22:50:35 >

are you listing those multiple parts on the first page?
like:
_ neckbone
_tarsel
_metatarsel
_metatarsel
_hip bone
so then on the metatarsel's, because you have two there, you want them to be href'ed up to another page instead of checkable here...
then on the next page you get the listing when you click either metatarsel here:
_ metatarsel (broken)
_ metatarsel (mended since 2/2/01)
etc etc
and there you actualy click it and submit into the session cart or whatever eh?
also if its part of your query you can maybe group by part no if its the same.. then whenever that count aggregate is >1 you draw it w/o a check box and use an ahref or have the checkbox with enable=false
or something like that, eh?
can you group them in your query to see if the count is more then one?
as far as any ideas-->
are you using any object for these parts?you could dump them into a vector or something.. then cycle through to see if there are others like the one your on..classify them by types or just go by their names..
you could also do this in the query i suppose..order them by type/name .. then in the for loop, put something in the end that says what the lastPart was.so at the beginning of the loop if this part.equals(lastPart) then you ahve something like
out.println("<a href=popup.jsp?blah=partNO">):
else
out.println("<input type=checkbox...")
you get the idea..
on the popup page that should be pretty straight forward..
dont forget to initialize the lastPart before the loop..or do it backwards from what i wrote..something..>