Fracture
asked on
Onclick add/remove from array with divs
Hi all experts,
I am using ASP to loop through my customer table and dynamically create some div tags, the div id is a unique Customer ID value from the ASP.
Ive got a bit of javascript code that changes the appearance of the div on the onclick method. I would like to also during this onclick function, create an array of these customer values that i can then pass the the next page.
I dont really mind how this array is created or even if a different way might be more suitable, watever gets the selected customer id values to the next page.
Was thinking maybe
Any ideas? Im a bit rusty on my javascript syntax so however much info you can give me would be greatly appreciated.
Thanks in advance.
Fracture
ASKER
Hi B_Dorsey,
Yeah i've actually modified the way im doing it now. While i have you was wondering if you could help me with a different problem, should be simpler and less vague -
Im opening a new window where the user can select a customer from a grid of divs. Onclick i would like to set a textbox in the opener document to the div id value.
This is the code i currently have -
Opener window has this code -
<a href="javascript:void window.open('SearchTalent.
In the popup window -
onclick="Change('<%=Reques
function Change(varFormName, varValue) {
//alert(opener.document.va
window.opener.document.var
window.close();
}
But the line window.opener.document.var
ASKER
Oh and the window.close() command isnt working either, and no errors...
ASKER
its 11:30pm here, and this is my third all nighter in a row, chances are im delerious and missing something...
Appreciate any help.
Appreciate any help.
sry just looking at this, 1 sec
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Hey B_Dorsey,
Yeah figured out what the problem was, looking at your code helped a great deal. The problem was my function looked like this -
opener.document.varFormNam
When it should have looked like this -
opener.document[varFormNam
What I think you are asking is that if the user clicks to change one of the divs, you want to pass it to an array so you can (when the next page is called) use that array?
I would suggest, during the onclick, pass whatever info you want to another funciton and have that function create/recreate a cookie and then use that data on the next page.
b