New Editable Options

Topics: Developer Forum, Project Management Forum, User Forum
Nov 7, 2008 at 1:21 AM
Hey,


I am tying to setup my E-commerce system to allow attributes like size and color. 

The Templates example has something like this with the Questions for the Form page.
 But what I am trying to do now is change how the  OptionSelectQuestion is displayed  when editing.
 What i would like them to be shown as is a list of the  Option items and some of there properties like: price, description, SKU. then next to that list have a button to add a new option and one to delete the selected one and one to edit the selected one.  then to have the edit and add buttons open a popup with that items edit page just as if you where have to add like any other item.   

I have been able to get list but i have not been able to get the buttons to work has any one done this or can they point me in the right decoration


thanks for all the help
Elizabeth
Nov 7, 2008 at 6:38 AM
I'd suggest creating a usercontrol which you can use in N2. The usercontrol can have the list you want and set a button next to it. If you use a html button create a onclick function to open a window with a parameter (the selectedvalue)?
Nov 7, 2008 at 8:45 AM
thanks for the input ion


i have a user control now. what I am having the issue with is the script that I would have to right for the html button. can someone help with that or point out an example of what i need I know the Url and file manager  use this but have done little to no work with the java they use.

thanks for the help,
Elizabeth
Coordinator
Nov 7, 2008 at 7:42 PM
I'm not really following. Are you opening a window and don't know how to get data back to the opener window?
Nov 7, 2008 at 8:44 PM
Edited Nov 7, 2008 at 8:47 PM
 yes, that is part of it.  And using Java i don't even know how to open a popup or what page to popup? i think it should work if i where to use the edit.aspx but i am not sure that will work or how to make it  every time


thanks,
Elizabeth
Coordinator
Nov 7, 2008 at 9:04 PM
Basically you call:

window.open("url", "name", "features")

When I need to return data from a popup window I usually do it from the window:

window.opener.javascriptMethodOnTheOpeningPage("thedata")

These operations are different from postbacks. To pass data back to the server on the edit page I tend to store it in a hidden input field or text box.