Dear All,
I have 2 form, form Sales Order and form Customer list (table), when i want to entry Customer it will click on button that will show a new form of Customer list like dialog box or message box, from it i will select a customer with click on check box then that value will come to first form (sales Order)
Can somebody help me for
1. open form on form like dialog box or message box
2. can transfer value from one form to other form
I have download sample of dialog box on http://forum.ebasetech.com/forum/viewto ... ght=dialog
but don't know how to learn it, can someone help for a little bit explain for this sample
Regards
Juned
Open othe form as dialog/message box nd get value from it
Moderators: Jon, Steve, Ian, Dave
-
- Ebase User
- Posts: 35
- Joined: Mon Jul 14, 2014 11:55 pm
-
- Moderator
- Posts: 1342
- Joined: Wed Sep 12, 2007 12:49 pm
The sample form ES030513_DIALOG uses jQuery to pop up a dialog box. First question is are you sure you want to do this? If you just want to give the user a list of customers you can do that with a dynamic list or you could implement an autocomplete field (also uses jQuery). These would be faster to implement than a separate popup form.
But assuming you want to carry on with the popup dialog, the ES030513_DIALOG sample form works like this (you need to open it in your Ebase Xi designer to understand this):
The popup panel is PANEL3 - at the bottom of the page. This is configured with CSS display:none which downloads it to the browser but keeps it hidden. To see this, right click on PANEL3, select Style, then click Advanced Properties. Then take a look at client script ES030513_DIALOG - this is client-side Javascript - it binds the jQuery click event for the clickable panels to the showDialog() function. The clickable panels are identified with CSS class urlLaunchPanel - to see this right click on panel PANEL2_2 and select HTML Element Properties and you will see the class towards the top.
The showDialog() function dynamically creates an iframe with a URL that launches an Ebase form.
Note that to implement any of this, you need the jQuery Javascript. To see this click on Form Properties on the form editor toolbar, then Web Resources, Client Scripts.
Some of this jQuery stuff can be quite difficult to implement for the first time if you aren't used to it. I suggest that you read the pages in the Ebase Xi documentation first - under the heading Client-Side Programming on the documentation index page. This will introduce the basic building blocks that are used to construct rich client behaviour like a popup dialog. You might also do the Creating Rich Clients Using JQuery tutorial (click Tutorials on the documentation index page);
Regards
Jon
But assuming you want to carry on with the popup dialog, the ES030513_DIALOG sample form works like this (you need to open it in your Ebase Xi designer to understand this):
The popup panel is PANEL3 - at the bottom of the page. This is configured with CSS display:none which downloads it to the browser but keeps it hidden. To see this, right click on PANEL3, select Style, then click Advanced Properties. Then take a look at client script ES030513_DIALOG - this is client-side Javascript - it binds the jQuery click event for the clickable panels to the showDialog() function. The clickable panels are identified with CSS class urlLaunchPanel - to see this right click on panel PANEL2_2 and select HTML Element Properties and you will see the class towards the top.
The showDialog() function dynamically creates an iframe with a URL that launches an Ebase form.
Note that to implement any of this, you need the jQuery Javascript. To see this click on Form Properties on the form editor toolbar, then Web Resources, Client Scripts.
Some of this jQuery stuff can be quite difficult to implement for the first time if you aren't used to it. I suggest that you read the pages in the Ebase Xi documentation first - under the heading Client-Side Programming on the documentation index page. This will introduce the basic building blocks that are used to construct rich client behaviour like a popup dialog. You might also do the Creating Rich Clients Using JQuery tutorial (click Tutorials on the documentation index page);
Regards
Jon
0 x
-
- Ebase User
- Posts: 35
- Joined: Mon Jul 14, 2014 11:55 pm
Hello jon,
Why I use form(table) than dynamic list for display customer list cause with table it wil show many information and i can make a query field for filter.
OK. I will try to understand it like what you say and many thanks for you, after acouple day on ebase forum, it's fast response from forum people. Thanks again
Regards
Juned
Why I use form(table) than dynamic list for display customer list cause with table it wil show many information and i can make a query field for filter.
OK. I will try to understand it like what you say and many thanks for you, after acouple day on ebase forum, it's fast response from forum people. Thanks again
Regards
Juned
0 x
-
- Ebase User
- Posts: 35
- Joined: Mon Jul 14, 2014 11:55 pm
Hai Jon,
I was success implement to open form on form like dialog box, now the problem is how to read a value from dialog box form to main form.
example i have field entry (customer) on main form, for entry it i click on button that open dialog box which view list of customer than i pick one customer on check box and that value (customer) will come to customer entry field on main form
hope you or anyone in here can give an answer, many thanks for all of you
regards,
Juned
I was success implement to open form on form like dialog box, now the problem is how to read a value from dialog box form to main form.
example i have field entry (customer) on main form, for entry it i click on button that open dialog box which view list of customer than i pick one customer on check box and that value (customer) will come to customer entry field on main form
hope you or anyone in here can give an answer, many thanks for all of you
regards,
Juned
0 x
-
- Moderator
- Posts: 1342
- Joined: Wed Sep 12, 2007 12:49 pm
Juned,
I think I would do it like this: at the point where you close the popup, call a client Javascript function on your main form - you can do this with window.parent... The function you call then sets a field value and refreshes the page - it does this using the Ebase client API - this allows you to call the server from client-side Javascript, see documentation for details.
The function would look something like this and you need to create this in a client script and associate this with your main form:
Note: third parameter value of true is important as it causes a page refresh with the new value.
Then invoke this when you close your popup with:
There are other ways of doing this e.g. you could just set the customer selection field value directly in the browser without asking the server to do it for you. To do this you need to give the customer selection field an id (HTML element properties), then change the function above to find the field using its id then set it (using jQuery for both of these).
Regards
Jon
I think I would do it like this: at the point where you close the popup, call a client Javascript function on your main form - you can do this with window.parent... The function you call then sets a field value and refreshes the page - it does this using the Ebase client API - this allows you to call the server from client-side Javascript, see documentation for details.
The function would look something like this and you need to create this in a client script and associate this with your main form:
Code: Select all
function setCustomer(customer)
{
$eb.setFieldValue("CUSTOMER_ID", customer, true);
}
Then invoke this when you close your popup with:
Code: Select all
window.parent.setCustomer(value);
Regards
Jon
0 x
-
- Ebase User
- Posts: 35
- Joined: Mon Jul 14, 2014 11:55 pm
Who is online
Users browsing this forum: No registered users and 19 guests