Client side event handling

I have the following function on a client side event for
when a button in the detail view of a webdatawindow is
clicked. This works fine, but is not much use.

function WebDataWindowControl1_Clicked(sender, rowNumber,   
objectName)
    {
            if(objectName=="b_call")
            {

                confirm("You clicked the " + objectName +   
        " column in row " + rowNumber)
        }
    }

What I want to do is add some data to the confirm message.
From the example I have seen on code exchange I should be
able to add the following

var sname
sname= WebDataWindowControl1.GetItem(rowNumber,"FamilyName")

and then use the string in the confirm box.

When the function is called I get the error

'Object doesn't support this property or method'

So the question is how do I access data from a client side
event handler?

I am using DataWindow.NET 2.5, and Visual Studio 2005.

ALan
0
Alan
1/22/2008 1:21:42 PM
sybase.datawindow.net 2302 articles. 0 followers. Follow

10 Replies
715 Views

Similar Articles

[PageSpeed] 12
Get it on Google Play
Get it on Apple App Store

is it

dwControl.GetItemString(RowNumber,ColumnName)




<Alan> wrote in message news:4795ede6.3a8c.1681692777@sybase.com...
>I have the following function on a client side event for
> when a button in the detail view of a webdatawindow is
> clicked. This works fine, but is not much use.
>
> function WebDataWindowControl1_Clicked(sender, rowNumber,
> objectName)
>    {
>            if(objectName=="b_call")
>            {
>
>                confirm("You clicked the " + objectName +
>        " column in row " + rowNumber)
>        }
>    }
>
> What I want to do is add some data to the confirm message.
> From the example I have seen on code exchange I should be
> able to add the following
>
> var sname
> sname= WebDataWindowControl1.GetItem(rowNumber,"FamilyName")
>
> and then use the string in the confirm box.
>
> When the function is called I get the error
>
> 'Object doesn't support this property or method'
>
> So the question is how do I access data from a client side
> event handler?
>
> I am using DataWindow.NET 2.5, and Visual Studio 2005.
>
> ALan 


0
jeff
1/22/2008 2:21:31 PM
No, that produces the same error.

That is correct for server side coding in c#. The client
side equivalent for javascript is just GetItem, according to
the documentation.

Thanks anyway.

> is it
>
> dwControl.GetItemString(RowNumber,ColumnName)
>
>
>
>
> <Alan> wrote in message
> news:4795ede6.3a8c.1681692777@sybase.com... >I have the
> > following function on a client side event for when a
> > button in the detail view of a webdatawindow is clicked.
> This works fine, but is not much use. >
> > function WebDataWindowControl1_Clicked(sender, rowNumber
> > , objectName)
> >    {
> >            if(objectName=="b_call")
> >            {
> >
> >                confirm("You clicked the " + objectName +
> >        " column in row " + rowNumber)
> >        }
> >    }
> >
> > What I want to do is add some data to the confirm
> > message. From the example I have seen on code exchange I
> > should be able to add the following
> >
> > var sname
> > sname= WebDataWindowControl1.GetItem(rowNumber
> ,"FamilyName") >
> > and then use the string in the confirm box.
> >
> > When the function is called I get the error
> >
> > 'Object doesn't support this property or method'
> >
> > So the question is how do I access data from a client
> > side event handler?
> >
> > I am using DataWindow.NET 2.5, and Visual Studio 2005.
> >
> > ALan
>
>
0
Alan
1/22/2008 2:48:15 PM
This is a multipart message in MIME format.
--=_alternative 004ADA9BC12573D9_=
Content-Type: text/plain; charset="ISO-8859-2"
Content-Transfer-Encoding: quoted-printable

Check this :

Set ClientScriptable to true.
To write scripts that call methods of the client control, the=20
ClientScriptable
property in the Properties window or in DataWindow Designer must be set to
true?the default is false. If this property is not set, you receive the=20
error:
Object doesn't support this property or method.
--=_alternative 004ADA9BC12573D9_=
Content-Type: text/html; charset="ISO-8859-2"
Content-Transfer-Encoding: quoted-printable


<br><font size=3D2 face=3D"sans-serif">Check this :</font>
<br>
<br><font size=3D2 face=3D"sans-serif">Set ClientScriptable to true.</font>
<br><font size=3D2 face=3D"sans-serif">To write scripts that call methods of
the client control, the ClientScriptable</font>
<br><font size=3D2 face=3D"sans-serif">property in the Properties window or
in DataWindow Designer must be set to</font>
<br><font size=3D2 face=3D"sans-serif">true&#8212;the default is false. If =
this
property is not set, you receive the error:</font>
<br><font size=3D2 face=3D"sans-serif"><b>Object doesn't support this prope=
rty
or method.</b></font>
--=_alternative 004ADA9BC12573D9_=--
0
miroslav_kral
1/23/2008 1:37:39 PM
Thanks, the only problem I have now with it is having to use
column numbers in the GetItem calls, not the column names. I
assume there is another parameter that needs setting but I
cannot find it.  This would be easier but its is a minor
problem.


> Check this :
>
> Set ClientScriptable to true.
> To write scripts that call methods of the client control,
> the  ClientScriptable
> property in the Properties window or in DataWindow
> Designer must be set to true?the default is false. If this
> property is not set, you receive the  error:
> Object doesn't support this property or method.
0
Alan
1/24/2008 9:15:07 AM
Perhaps you can help with another error message. I have done
the same thing you suggested on another datawindow. When the
script

 var fname=sender.GetItem(rowNumber,4)

I get the error message

'this.rows' is null or not an object.

Column 4 exists in the dataset, and has valid data in it




> Thanks, the only problem I have now with it is having to
> use column numbers in the GetItem calls, not the column
> names. I assume there is another parameter that needs
> setting but I cannot find it.  This would be easier but
> its is a minor problem.
>
>
> > Check this :
> >
> > Set ClientScriptable to true.
> > To write scripts that call methods of the client control
> > , the  ClientScriptable
> > property in the Properties window or in DataWindow
> > Designer must be set to true?the default is false. If
> > this property is not set, you receive the  error:
> > Object doesn't support this property or method.
0
Alan
1/24/2008 11:23:18 AM
This is a multipart message in MIME format.
--=_alternative 004E9D5FC12573DA_=
Content-Type: text/plain; charset="US-ASCII"

Check Programmer's Guide :

returnvalue objdwcontrol.GetItem (number row, number column )
returnvalue objdwcontrol.GetItem (number row, string column )
--=_alternative 004E9D5FC12573DA_=
Content-Type: text/html; charset="US-ASCII"


<br><font size=2 face="sans-serif">Check Programmer's Guide :</font>
<br>
<br><font size=2 face="sans-serif">returnvalue objdwcontrol.GetItem (number
row, number column )</font>
<br><font size=2 face="sans-serif">returnvalue objdwcontrol.GetItem (number
row, string column )</font>
--=_alternative 004E9D5FC12573DA_=--
0
miroslav_kral
1/24/2008 2:18:47 PM
works fine when I use a number for the column, but not when
I use the column name in the string version.

> Check Programmer's Guide :
>
> returnvalue objdwcontrol.GetItem (number row, number
> column ) returnvalue objdwcontrol.GetItem (number row,
> string column )
0
ALan
1/24/2008 2:46:52 PM
Did you use CamelCase for the column's name? 
Try 'columname' instead of 'ColumName'.

Arnd

On 24 Jan 2008 06:46:52 -0800, ALan wrote:

>works fine when I use a number for the column, but not when
>I use the column name in the string version.
>
>> Check Programmer's Guide :
>>
>> returnvalue objdwcontrol.GetItem (number row, number
>> column ) returnvalue objdwcontrol.GetItem (number row,
>> string column )

0
Arnd
1/24/2008 9:08:12 PM
I used the same case as that generated by the datawindow,
but I will try lower case tomorrow.

> Did you use CamelCase for the column's name?
> Try 'columname' instead of 'ColumName'.
>
> Arnd
>
> On 24 Jan 2008 06:46:52 -0800, ALan wrote:
>
> >works fine when I use a number for the column, but not
> when >I use the column name in the string version.
> >
> >> Check Programmer's Guide :
> >>
> >> returnvalue objdwcontrol.GetItem (number row, number
> >> column ) returnvalue objdwcontrol.GetItem (number row,
> >> string column )
>
0
Alan
1/24/2008 10:35:52 PM
That works great now. Thanks

> I used the same case as that generated by the datawindow,
> but I will try lower case tomorrow.
>
> > Did you use CamelCase for the column's name?
> > Try 'columname' instead of 'ColumName'.
> >
> > Arnd
> >
> > On 24 Jan 2008 06:46:52 -0800, ALan wrote:
> >
> > >works fine when I use a number for the column, but not
> > when >I use the column name in the string version.
> > >
> > >> Check Programmer's Guide :
> > >>
> > >> returnvalue objdwcontrol.GetItem (number row, number
> > >> column ) returnvalue objdwcontrol.GetItem (number row
> > , >> string column )
> >
0
Alan
1/25/2008 11:56:10 AM
Reply:

Similar Artilces:

In datawindow.net,access the database from client side event using javascript
In powerbuilder,for example,a datawindow has two columns:itemno,description. input an itemno,validate it.if not found from the database,return 1 to trigger itemerror event; if found,get the description of the item from the database,and fill it into the column "description". The question is how to fulfill the function in web datawindow,through web service? if so,I need an example to realize it. You will need to use AJAX or make a round trip on item change event. -- Dean Jones CEO PowerObjects http://www.powerobjects.com (612) 339-3355 Ext. 112 TeamSybase * *...

Firing both Client side event and server side event for server side button
I am having some difficulties getting this to work.. I have button_click (Asp.net) and ClientClick (Javascript).  Javascript is firing fine.  Server script is not. may be you have return return false in the in the javascript which is why its not firing server side event.You should add javascript evelt like thisbutton1.onclientclick = "functionname" Function should nopt return false. Vikram www.vikramlakhotia.comPlease mark the answer if it helped you...

client side event handling
i want to use a windows .net control in a web page.and want to handle the events at client endi got the following code from http://support.microsoft.com/kb/555687but its not working for meevent handling ------------------<script for=myControl1 event="event1" language="javascript"> function myControl1::event1 { alert('my messge'); } </script>   placing the control on web page--------------- <form id="Form1" method="post" runat="server"> <OBJECT id="mycontrol1" style="WIDTH: 416px; HEIGHT: 288px" height="288" width="416" c...

"Push" messages to Atlas/Ajax Client or Client-side event handling of server messages
What I'm looking for is the ability for the client-side Ajax/Atlas GUI to be able to update itself when events occur on the server. The issue is that the events are triggered from a third party, and aren't triggered by postback. For example, let's say there's a Queue of data on the server, and each time a new item is added to the Queue, I want the client to recognize the addition and display the new item. Right now, the only way I can think of doing this is by setting up an Ajax timer and checking the state of the Queue on every timer tick. While this doesn't cause the page to refresh/postba...

Help with client side events Vs. server side events
Hi, Can someone look as the following script and tell me why marking the check box doesn't generate a client side event eventhough there's: onclick="checkClick()"? marked.  Thanks in advance, Sivan <%@ Page Language="c#" %><HTML> <HEAD>  <meta name="vs_targetSchema" content="http://schemas.microsoft.com/intellisense/ie5"> </HEAD> <body>  <SCRIPT language="c#" runat="Server">  void Page_Load(object s, EventArgs e) {  if (!Page.IsPostBack)  {   Label1.Text = Label...

How to handle server events on client side?
Hi, I would please like to know how a server application can update a browser web client on an intermittent basis without the need for polling by the client? Is it also possible to update only specific clients? Thanks.        First part of the question, there is no way a server can indpendantly initiate a communication back to the client. Remember - http is a connectionless stateless protocol. Unless you have a client that uses a protocol other than http ( socket based connections for eg: using flash socket api) there is no way you can do this. Having s...

handle textchange event client side
hi I have a textbox and I want to handle the textchange event with javascript (without postback) how can I do? thank you in advance you should be able to toss on a onchange="someclientsideFunction();" Otherwise, add it from codebehind... control.Attributes.Add("onchange","someclientsideFunction();")   again thank you for your answer I have onTextChanged event for asp:TextBox but it don't work in client side. when I try to assign a java function the following error will raise: ASP.Default_aspx does not contain a definition for "textChange" here is my codes: <head runat="se...

Handling validation controls events in client side
  Hi,Do u guys know if we can trap in client side when a validation is taking place or when it s finished in client side. I am talking about validation controls like: requiredfieldvalidator, RegularexpressionValidator..etc More precisely, I need to trap the event when the RegularExpressionValidator succeeds or when it fails, but I want to handle that client side. Is that possible? How please?Thank you Thanks a lot, I appreciate your taking the time to help me. Hi, client-side validation library has a few methods for example ValidatorValidate (you can view them with reflector from Sys...

Handling Datagrid button events at the client side
Hi I need to create a datagrid with buttonColumns whose events will be handled at the client side... the server page will only be called if the user clicks a valid button.. is it possible to catch a the event at the client side and to check where the event originated.. any guidance will be highly appreciated thanks    ...

runat=server and client side event handling
i have a tabstrip control (IE web control) and a web control button (system.web.ui.webcontrols.button) I want to achieve following - when tab number 2 is clicked, i would like to hide this button. I know i ca do this by making AutoPostback=true and handling the SelectedIndexChange() on the server side. But I am would like to know if there is a way to do this using client side code. I would like to avoid one roud trip to server just to hide or show a button. thus - Is it possible to handle the tabstrip's tab click event on the client side script code and show/hide a web control...

HTML Datawindow DTC-client side event
Hello, I have a problem, I don�t know because this code doesn�t work. I have followed the instructions of some SDN articles but I cannot make it work. In this example the messagebox "Hello Word" doen�t appear when I changed the item. My code is: ..... <% jagConn = new PSJaguarConnection("172.27.26.95:9000", "jagadmin", "", "DataWindow/HTMLGenerator", false); dwSource = new PSDataWindowSourceClass("/export/home/sybase/EAStudio/JaguarCTS35/gesconf_dw.pbl", "d_funcionalidad_old"); dbConn = new PSConnectionP...

Executing client side script after client side validation with asp.net 2.0, any ideas?
Hi All,I have a page where i want to display a "please wait" panel after user submits the form and page is validated. I did the following trick in 1.1 many times but it does not work with 2.0, it was something like this:on the page: <script language="javascript">function StartProcessing() {divProcessing.style.display = "block";divCheckout.style.display = "none";}</script>on btnConfirm.Attributes["onclick"] += "if (typeof(Page_ClientValidate) == 'function') Page_ClientValidate(); if (Page_IsValid) { StartProcessing(); }";So the question is how can i implement same thing...

is it possible to handle event of web control at client side??
is it possible to handle event of web control at client side?? i have tried it on asp:button..... i called a vbscript fucntion on onclick but it dint give me the result..... please help me.............. How were you trying to call the script? Do you have any code you can post. this can be done, and it isn't very hard. The following assigns a short script to a "cancel edit" button in a datagrid editCancelbutton.Attributes.Add("onclick", "return confirm('Cancel edit and loose changes.' & vbCrLf & 'Are you sure?')") JimMS MVP ASP.NET...

Client side events in TreeView (.NET 2.0)
Hello all, I am using a TreeView control on a page with  EnableClientScript property set to true and everything works fine.However I would also like to handle expanded event on the client side - what I mean exactly is that I want the default implementation to do it's work (expand the node), but I would also would like to perform my own operation. I assume I should add some call to Attributes collection, however I couldn't find any documentation on that. Is it at all possible?  Thank you in advance for all your help.   I' ve looked at the source generate...

Web resources about - Client side event handling - sybase.datawindow.net

Automobile handling - Wikipedia, the free encyclopedia
Automobile handling and vehicle handling are descriptions of the way wheeled vehicles perform transverse to their direction of motion, particularly ...

New Facebook SDK For IOS Adds Automatic Error Handling, Improved Login UI
... software-development kit for iOS is now available for download , with significant enhancements including a beta test of automatic error handling ...

Handling Disputes and Refunds
Handling Disputes and Refunds

Facebook Shares Stats on How Users are Handling the Latest Privacy Changes
Facebook’s traffic has yet to be affected by the aggressive privacy changes it made at the beginning of December, from what data we can see — ...

Handling five billion sessi
... into their mobile apps. Skip to main content Engineering Blog Have an account? Sign in Search form Search All Twitter Blogs &nbsp Handling five ...

Customer Service Handling
This group is for people in customer service profession facing the customer either in person or over phone.

Avocado Meal Planner - Meal planning, recipe handling and grocery shopping made easy on the App Store ...
Get Avocado Meal Planner - Meal planning, recipe handling and grocery shopping made easy on the App Store. See screenshots and ratings, and read ...

Vintage Ad #964: Students deserve Special Handling at Bob Jones University - Flickr - Photo Sharing!
I recently acquired a large number of Christian lifestyle magazines from the 60s and 70s. This ad features an institution that has tended to ...

How to Fly the P-47: Ground Handling, Take-Off, Normal Flight, Landing - 1943 - WDTVLIVE42 - YouTube
Demonstrates procedures in flying the P-47. Includes preflight and cockpit checks, warm-up, taxiing, cruising, banking, stalling, speeds for ...

34% Rate Obama’s Handling of Government Spending As Good or Excellent
Voters continue to question President Obama's handling of issues related to government spending and taxes. A new Rasmussen Reports national telephone ...

Resources last updated: 1/4/2016 6:08:20 AM