| 56 | | a. Add a new page to the working folder, in this case MyTest. Call your page whatever you like. In my case, I have called it MyTestForm.aspx (as I am running .NET) |
| 57 | | b. In the buttonpress, type... editor._popupDialog(_editor_url + "plugins/MyTest/MyTestForm.aspx"); (changing the URL to what you need). |
| 58 | | This will give you a pop-up on the button press, however, it will be small. You will need to handle the sizing. |
| | 62 | a. Add a new page to the working folder, in this case !MyTest. Call your page whatever you like. In my case, I have called it !MyTestForm.aspx (as I am running .NET) |
| | 63 | b. In the buttonpress, type... editor._popupDialog(_editor_url + "plugins/MyTest/MyTestForm.aspx"); (changing the URL to what you need).[[BR]]This will give you a pop-up on the button press, however, it will be small. You will need to handle the sizing. |
| 60 | | i. Change the buttonPress to... editor._popupDialog(_editor_url + "plugins/MyTest/MyTestForm.aspx", function(value){alert(value);}); and in your popped-up page, you need to ensure your return button has an onclick event. You can put any event name in the onclick, but ensure you have the event. For simple return just make the button onclick to onclick="__dlg_close('some value');" |
| 61 | | You will also require <script src="../../popups/popup.js" type=text/javascript></script> somewhere in the HTML of the pop-up page (in my case, MyTestForm.aspx) prior to the call to __dlg_close(). |
| 62 | | ii. You can change the alert(value) to do whatever you want to the parent Xinha element, such as... editor.insertHTML(value); This will put the 'some value' from my example into your editor. |
| | 65 | i. Change the buttonPress to... editor._popupDialog(_editor_url + "plugins/MyTest/MyTestForm.aspx", function(value){alert(value);}); and in your popped-up page, you need to ensure your return button has an onclick event. You can put any event name in the onclick, but ensure you have the event. For simple return just make the button onclick to onclick="!__dlg_close('some value');"[[BR]][[BR]]You will also require <script src="../../popups/popup.js" type=text/javascript></script> somewhere in the HTML of the pop-up page (in my case, !MyTestForm.aspx) prior to the call to !__dlg_close().[[BR]][[BR]] |
| | 66 | |
| | 67 | ii. You can change the alert(value) to do whatever you want to the parent Xinha element, such as... editor.insertHTML(value); This will put the 'some value' from my example into your editor. |
| 67 | | function Init() |
| 68 | | { |
| 69 | | __dlg_init(null,{width:410,height:400}); |
| 70 | | var Incoming = window.dialogArguments; |
| 71 | | alert(Incoming["FirstArg"]); |
| 72 | | alert(Incoming["SecArg"]); |
| 73 | | } |
| | 72 | function Init() |
| | 73 | { |
| | 74 | __dlg_init(null,{width:410,height:400}); |
| | 75 | var Incoming = window.dialogArguments; |
| | 76 | alert(Incoming["FirstArg"]); |
| | 77 | alert(Incoming["SecArg"]); |
| | 78 | } |