itemfocuschanged no postback with my own event handler

?Powerbuilder 11.5.1.4843

With this simple javascript on client-side calling default event handler , 
the itemfocuschanged event is not postback to server-side :

function dw_perso1_ItemFocusChanged(sender, rowNumber, objectName) {
    PBDataWindow_ItemFocusChanged(sender, rowNumber, objectName);
}

After debugging, this.currentcontrol is null and is instantiated when there 
is no client-side javascript explaining the difference in behavior :

function PBDataWindow_ItemFocusChanged(sender,rowNumber,columnName)
{
    var nOutOfFocusTabSeq = sender.nOutOfFocusTabSeq;
    var nInFocusTabSeq = sender.nInFocusTabSeq;
    sender.nOutOfFocusTabSeq = -1;
    sender.nInFocusTabSeq = -1;

    if(sender.oPBNETData==null)
        sender.oPBNETData = new PBNETData();
    if(sender.oPBNETData.controlInFocus==this.currentControl)
    {
        PBDataWindow_ItemFocusChangedClientProcess(sender,rowNumber,columnName);
        return;
    }
.....

Documentation :
Although coding for a client-side event normally interrupts postbacks to the 
server, you can explicitly code for a postback in your customized JavaScript 
event handler by calling Document.Form.Submit or by calling a default event 
handler for the triggered event.

Thanks.

0
Philippe
1/13/2011 10:58:01 AM
sybase.powerbuilder.net 284 articles. 0 followers. Follow

0 Replies
402 Views

Similar Articles

[PageSpeed] 0

Reply:

Similar Artilces:

Itemchanged/clicked event handler for Datawindow.net in asp.net
Hi, I am evaluating datawindow.net 1.5 webdatawindow control in asp.net I don't know how to implement itemchanged/Item clicked for the datawindow.net Please anyone let me know how to do?Is any code example available? TIA Manikandan Look at the properties on the Web DataWindow control. You will see several client events (ClientEventItemChanged, ClientEventItemError, etc.). You need to code these events in Javascript as they will take place in the browser. There is no ClientItemClicked event but you will see that the ClientEventClicked event has a RowNumber and ObjectName ...

How to hook up a event handler using code only for asp.net control event?
Hi,  Here is the code: public partial class _Default : System.Web.UI.Page{    protected void Page_Load(object sender, EventArgs e)    {    }    protected void ObjectDataSource1_Updating(object sender, ObjectDataSourceMethodEventArgs e)    {        System.Threading.Thread.Sleep(2000);    }    protected void ObjectDataSource1_Selecting(object sender, ObjectDataSourceSelectingEventArgs e)    {     }} I want to sleep ...

.NET event handler
I have ASA 9.0.2.2451 Mobilink events can call .NET classes. Will a similar feature ever be created in ASA? so that the event handler is an external .NET assembly? Is there any way to launch an external process from ASA? Jim wrote: > > Mobilink events can call .NET classes. Will a similar feature ever be > created in ASA? so that the event handler is an external .NET assembly? Is > there any way to launch an external process from ASA? > I can't speak for calling .NET from within ASA. Neat idea, you might consider posting this as a request to the...

Event handler calling another event handler.
I want to know if an event handler can call another envent handler. Say you have two buttons. Button1 and Button2. Button1 has some code which executes when it is clicked. Now, I want Button2 to do the same thing as Button1, but I dont want to duplicate the code. Is there anyway Button1's click event handler execute when Button2 is clicked. I tried calling the event handler of button1 when button2 would get clicked, but it gave me errors. this.button1.Click += new System.EventHandler(this.button_Click);this.button2.Click += new System.EventHandler(this.button_Click);  p...

event handlers and postback
i m not aquainted with the postback concept...plzz help me understanding this concept http://www.google.com/search?complete=1&hl=en&q=asp.net+postback"If you make it idiot proof, they'll build a better idiot" What postback does is posts back values to the web form so you can process things like database transactons or other events using the values submitted on the form. This eliminates the need to post to another form in order to handle the posting of data. Take a look at the following article. How postback works in ASP.NET HTHRyan OlshanASPInsider | Mic...

ASP.NET 1.1 "multiple event handlers" for "single event"
I need to map multiple event handlers to single event in a user control. The control is used in different context in different pages. Depending upon context (could be stored globally in a property etc) need to redirect events to corresponding event handler. There is a existing spaghetti code which is preventing modularization. Also, a conditional code in single handler can be highly unmaintainable. Need a quick fix solution. Thanking in anticipation of help on this....

ASP.Net 2.0 Menu Item selection
Hi,  On a menu item selection (say Save), I would like to ask for a confirmation to save and then do some validation of the fields on the client side before sending the data to the server for database insert. How do I call a javascript o n a menu item selection and then based on user confirmation either cancel the action or send to server? I am sure this is a common situation.  I  checked various blogs and forums, but couldnt find the a good solution. Appreciate your help.  Thanks Karthik     If it helps, this sample shows how to use a client-side windo...

Events and Event handlers
 Hi ,What are the Events and Event Handlers and How we create events and events handlers in asp.netand where we use .   adilahmed Hi, You can find a video about Events http://www.asp.net/learn/videos/ "Lesson 3" In general , an Event is fired when some thing [an event] happens and then you should choose your Event Handler [a function that is executed when the Event is fired]. In C#, to know about Events I think you should start with delegates [they simply points to the Event Handler fn.] and then go to Events and Event Handlers. In ASP.NET , the ...

Forcing a PostBack in an event handler
I find myself in an awkward situation.I have a List stored as a session variable.In my code-behind file, I have a method (DrawButtons) that creates a button for each item in the List, assigns it an event handler, and adds it to a placeholder on my page.  I run this method in Page_Load, because dynamically-created controls must be created in either Page_Init or Page_Load (per http://support.microsoft.com/kb/317515).There is also a button (btnAddItem) on my page that is used to add items to the List.Here is my dilemma:The btnAddItem_Click handler is able to add an item to the List, ...

Event Handler not firing on postback
I've got a simple web form that queries a database based on a textbox value and populates a gridview. A button control's event handler does the db query on postback. It has suddenly stopped working since I installed ie7. I uninstalled ie7, but it still didn't work. No Errors. Postback works fine as I have a label that displays the time on each postback and I can see it change everytime I click the button. However, the gridview does not populate. For some reason, the event handler is not executed when I click the button. I was doing this using the IP address of the server. Th...

Forcing a PostBack in an Event Handler
I find myself in an awkward situation.I have a List stored as a session variable.In my code-behind file, I have a method (DrawButtons) that creates a button for each item in the List, assigns it an event handler, and adds it to a placeholder on my page.  I run this method in Page_Load, because dynamically-created controls must be created in either Page_Init or Page_Load (per http://support.microsoft.com/kb/317515).There is also a button (btnAddItem) on my page that is used to add items to the List.Here is my dilemma:The btnAddItem_Click handler is able to add an item to the List, no pro...

how to rewire an event handler after postback.
ok, I have a dynamically created web form control.  How can I rewire this so that it doesn't lose the event handler after a postback. Below is a snippet of my code.  The problem I have is that the form uses dynamically generated values that's needed for the form to update the correct sql record.  So I can't wire the event handler too early in the life cycle.  Each time the button is clicked, it would update sql and do a postback which will recreate the form.  Any ideas?protected Panel showForm(string id){ Button submit = new Button();submit.ID =...

Conditional Postback with event handler
Hi, Yesterday I had help from this forum in getting an event handler to only activate conditionally depending on the user clicking Ok or Cancel on a Javascript confirm box for a Button server control. The answer I received works well, however I have not been able to apply it to a Link Button server control (and before you say just use a Button control, the spec for the software I am building needs all buttons to simply look like normal text, hence the Link Button usage.). Here is what is supposed to happen. If no changes have been made to the page, then an alert displays advising there are...

.NET event and trigger handlers?
Mobilink events already can call .NET classes. Will a similar feature ever be created in ASA? so that the event handler is an external .NET assembly rather than an SQL procedure? I see it being particularly useful in connection with triggers and events in ASA. This sounds like something that would be very useful to us. It seems like a powerful addition, the foundation of which is already, at least partially, created (Mobilink can interface with .NET classes). Are there security concerns with this? Is there not a lot of demand for this type of thing? By the way, is there...

Web resources about - itemfocuschanged no postback with my own event handler - sybase.powerbuilder.net

Resources last updated: 12/28/2015 11:22:24 AM