CodeCharge Studio
search Register Login  

Visual PHP Web Development

Visually Create Internationalized Web Applications, Web Reports, Calendars, and more.
CodeCharge.com

YesSoftware Forums -> Archive -> CodeChargeStudio.Discussion

 syntax for client side effects

Print topic Send  topic

Author Message
RonB
Posted: 07/19/2002, 8:26 AM

What's the syntax for the clientside events? I know how to use javascript I
was just wondering wether for example an onClick event has to be placed
between "".
so onClick="bla" would become "bla" in the onClick event or are the ""
already present and would bla be sufficient?

Ron

Geert van der Ploeg
Posted: 07/20/2002, 3:06 PM

As far as I discovered, the client-side events of form controls (like an
"onclick" of a button for instance) will only work if you put them in the
HTML by hand.
Then, looking at the properties of that button, the javascript onclick-event
appears in the properties of that control.
The other way around it doesn't seem to work:
Putting a function name as an event (in the properties of a form control)
does not have any effect.

Correct me if I'm wrong.

Regards,

Geert van der Ploeg

"RonB" <r.borkent@123chello.nl> wrote in message
news:ah9b42$e4t$1@news.codecharge.com...
> What's the syntax for the clientside events? I know how to use javascript
I
> was just wondering wether for example an onClick event has to be placed
> between "".
> so onClick="bla" would become "bla" in the onClick event or are the ""
> already present and would bla be sufficient?
>
> Ron
>
>

RonB
Posted: 07/20/2002, 5:19 PM

Do you mean I can only use client side events when I code a button in the
html part of my page by hand and then use the event structure on it? That
would be strange and to much work. If I have to do the html code myself I
can as easely put the OnClick or onChange code in it while I'm there. What
use would the client side event be?
There must be a way to use the client side event to put javascript code in
the page for a button or some other object.
RonB

"Geert van der Ploeg" <news@geert.triple-it.nl> schreef in bericht
news:ahcmu1$60q$1@news.codecharge.com...
> As far as I discovered, the client-side events of form controls (like an
> "onclick" of a button for instance) will only work if you put them in the
> HTML by hand.
> Then, looking at the properties of that button, the javascript
onclick-event
> appears in the properties of that control.
> The other way around it doesn't seem to work:
> Putting a function name as an event (in the properties of a form control)
> does not have any effect.
>
> Correct me if I'm wrong.
>
> Regards,
>
> Geert van der Ploeg
>
> "RonB" <r.borkent@123chello.nl> wrote in message
>news:ah9b42$e4t$1@news.codecharge.com...
> > What's the syntax for the clientside events? I know how to use
javascript
> I
> > was just wondering wether for example an onClick event has to be placed
> > between "".
> > so onClick="bla" would become "bla" in the onClick event or are the ""
> > already present and would bla be sufficient?
> >
> > Ron
> >
> >
>
>

Geert van der Ploeg
Posted: 07/22/2002, 12:22 AM

I agree... It would be a whole lot easier...
Maybe some CCS developer could shine a light on this?


Geert van der Ploeg


"RonB" <r.borkent@123chello.nl> wrote in message
news:ahcult$iil$1@news.codecharge.com...
> Do you mean I can only use client side events when I code a button in the
> html part of my page by hand and then use the event structure on it? That
> would be strange and to much work. If I have to do the html code myself I
> can as easely put the OnClick or onChange code in it while I'm there. What
> use would the client side event be?
> There must be a way to use the client side event to put javascript code in
> the page for a button or some other object.
> RonB
>
> "Geert van der Ploeg" <news@geert.triple-it.nl> schreef in bericht
>news:ahcmu1$60q$1@news.codecharge.com...
> > As far as I discovered, the client-side events of form controls (like an
> > "onclick" of a button for instance) will only work if you put them in
the
> > HTML by hand.
> > Then, looking at the properties of that button, the javascript
> onclick-event
> > appears in the properties of that control.
> > The other way around it doesn't seem to work:
> > Putting a function name as an event (in the properties of a form
control)
> > does not have any effect.
> >
> > Correct me if I'm wrong.
> >
> > Regards,
> >
> > Geert van der Ploeg


RonB
Posted: 07/22/2002, 6:19 AM

Geert,

In the event binding bit generated by CCS there is a reference to "all" :

//bind_events @1-4D12C86C
function bind_events() {
all["Button1"].onclick = Button1_OnClick;

this gives me an error but changing this to:

//bind_events @1-4D12C86C
function bind_events() {
document.all["Button1"].onclick = Button1_OnClick;

works so the entire code for the clientside event would be:

//Button1_OnClick @9-EF81859E
function Button1_OnClick()
{
var result;
//End Button1_OnClick

//Custom Code @10-2A29BDB7
// -------------------------
self.close();
// -------------------------
//End Custom Code

//Close Button1_OnClick @9-BC33A33A
return result;
}
//End Close Button1_OnClick

//bind_events @1-4D12C86C
function bind_events() {
document.all["Button1"].onclick = Button1_OnClick;
}
//End bind_events

window.onload = bind_events; //Assign bind_events @1-19F7B649

//End CCS script


so the syntax for clientside event is just the javascript code with ; at the
end and remember to change the "all" bit to "document.all"

Ron

"Geert van der Ploeg" <news@geert.triple-it.nl> schreef in bericht
news:ahgbs3$bqu$1@news.codecharge.com...
> I agree... It would be a whole lot easier...
> Maybe some CCS developer could shine a light on this?
>
>
> Geert van der Ploeg
>
>
> "RonB" <r.borkent@123chello.nl> wrote in message
>news:ahcult$iil$1@news.codecharge.com...
> > Do you mean I can only use client side events when I code a button in
the
> > html part of my page by hand and then use the event structure on it?
That
> > would be strange and to much work. If I have to do the html code myself
I
> > can as easely put the OnClick or onChange code in it while I'm there.
What
> > use would the client side event be?
> > There must be a way to use the client side event to put javascript code
in
> > the page for a button or some other object.
> > RonB
> >
> > "Geert van der Ploeg" <news@geert.triple-it.nl> schreef in bericht
> >news:ahcmu1$60q$1@news.codecharge.com...
> > > As far as I discovered, the client-side events of form controls (like
an
> > > "onclick" of a button for instance) will only work if you put them in
> the
> > > HTML by hand.
> > > Then, looking at the properties of that button, the javascript
> > onclick-event
> > > appears in the properties of that control.
> > > The other way around it doesn't seem to work:
> > > Putting a function name as an event (in the properties of a form
> control)
> > > does not have any effect.
> > >
> > > Correct me if I'm wrong.
> > >
> > > Regards,
> > >
> > > Geert van der Ploeg
>
>
>

Geert van der Ploeg
Posted: 07/23/2002, 12:03 AM

Ok, that's for creating events via the Events-tab of the properties-window.
I thought we were talking about the "Format" tab of the properties-window.

In that tab, the lower part is for events. But if you place something in
there, it won't appear in your code anywhere.
Maybe that part is suitable only for viewing events you've hardcoded in the
HTML, instead of adding them there...


About your example:
When I add some custom code to a form control, the javascript it generates,
is correct.

So, the reason there's no "document.forms['formname']." in front of your
event-binding is maybe that you try to make an event for a form control
which is not in an existing form?
(grid/record/etc.)

Regards,

Geert van der Ploeg



"RonB" <r.borkent@chello123.nl> wrote in message
news:ahh0of$hsq$1@news.codecharge.com...
> Geert,
>
> In the event binding bit generated by CCS there is a reference to "all" :
>
> //bind_events @1-4D12C86C
> function bind_events() {
> all["Button1"].onclick = Button1_OnClick;
>
> this gives me an error but changing this to:
>
> //bind_events @1-4D12C86C
> function bind_events() {
> document.all["Button1"].onclick = Button1_OnClick;
>
> works so the entire code for the clientside event would be:
>
> //Button1_OnClick @9-EF81859E
> function Button1_OnClick()
> {
> var result;
> //End Button1_OnClick
>
> //Custom Code @10-2A29BDB7
> // -------------------------
> self.close();
> // -------------------------
> //End Custom Code
>
> //Close Button1_OnClick @9-BC33A33A
> return result;
> }
> //End Close Button1_OnClick
>
> //bind_events @1-4D12C86C
> function bind_events() {
> document.all["Button1"].onclick = Button1_OnClick;
> }
> //End bind_events
>
> window.onload = bind_events; //Assign bind_events @1-19F7B649
>
> //End CCS script
>
>
> so the syntax for clientside event is just the javascript code with ; at
the
> end and remember to change the "all" bit to "document.all"
>
> Ron
>


RonB
Posted: 07/23/2002, 1:40 PM

Ok so we were talking about two different places to do the same thing. The
really weird stuff starts here. When I put onClick event in the format tab
like this:
self.close()

it works like a charm. Nothing surrounding the statement just plain
self.close() does what it's supposed to do.

RonB

"Geert van der Ploeg" <news@geert.triple-it.nl> schreef in bericht
news:ahiv4h$te1$1@news.codecharge.com...
> Ok, that's for creating events via the Events-tab of the
properties-window.
> I thought we were talking about the "Format" tab of the properties-window.
>
> In that tab, the lower part is for events. But if you place something in
> there, it won't appear in your code anywhere.
> Maybe that part is suitable only for viewing events you've hardcoded in
the
> HTML, instead of adding them there...
>
>
> About your example:
> When I add some custom code to a form control, the javascript it
generates,
> is correct.
>
> So, the reason there's no "document.forms['formname']." in front of your
> event-binding is maybe that you try to make an event for a form control
> which is not in an existing form?
> (grid/record/etc.)
>
> Regards,
>
> Geert van der Ploeg
>
>
>
> "RonB" <r.borkent@chello123.nl> wrote in message
>news:ahh0of$hsq$1@news.codecharge.com...
> > Geert,
> >
> > In the event binding bit generated by CCS there is a reference to "all"
:
> >
> > //bind_events @1-4D12C86C
> > function bind_events() {
> > all["Button1"].onclick = Button1_OnClick;
> >
> > this gives me an error but changing this to:
> >
> > //bind_events @1-4D12C86C
> > function bind_events() {
> > document.all["Button1"].onclick = Button1_OnClick;
> >
> > works so the entire code for the clientside event would be:
> >
> > //Button1_OnClick @9-EF81859E
> > function Button1_OnClick()
> > {
> > var result;
> > //End Button1_OnClick
> >
> > //Custom Code @10-2A29BDB7
> > // -------------------------
> > self.close();
> > // -------------------------
> > //End Custom Code
> >
> > //Close Button1_OnClick @9-BC33A33A
> > return result;
> > }
> > //End Close Button1_OnClick
> >
> > //bind_events @1-4D12C86C
> > function bind_events() {
> > document.all["Button1"].onclick = Button1_OnClick;
> > }
> > //End bind_events
> >
> > window.onload = bind_events; //Assign bind_events @1-19F7B649
> >
> > //End CCS script
> >
> >
> > so the syntax for clientside event is just the javascript code with ; at
> the
> > end and remember to change the "all" bit to "document.all"
> >
> > Ron
> >
>
>
>

Geert van der Ploeg
Posted: 07/23/2002, 11:50 PM

Well,

Looks like this only works for buttons, not for text-fields...


--

Geert van der Ploeg


"RonB" <r.borkent@123chello.nl> wrote in message
news:ahkevc$iu6$1@news.codecharge.com...
> Ok so we were talking about two different places to do the same thing. The
> really weird stuff starts here. When I put onClick event in the format tab
> like this:
> self.close()
>
> it works like a charm. Nothing surrounding the statement just plain
> self.close() does what it's supposed to do.
>
> RonB
>
> "Geert van der Ploeg" <news@geert.triple-it.nl> schreef in bericht
>news:ahiv4h$te1$1@news.codecharge.com...
> > Ok, that's for creating events via the Events-tab of the
> properties-window.
> > I thought we were talking about the "Format" tab of the
properties-window.
> >
> > In that tab, the lower part is for events. But if you place something in
> > there, it won't appear in your code anywhere.
> > Maybe that part is suitable only for viewing events you've hardcoded in
> the
> > HTML, instead of adding them there...
> >
> >
> > About your example:
> > When I add some custom code to a form control, the javascript it
> generates,
> > is correct.
> >
> > So, the reason there's no "document.forms['formname']." in front of your
> > event-binding is maybe that you try to make an event for a form control
> > which is not in an existing form?
> > (grid/record/etc.)
> >
> > Regards,
> >
> > Geert van der Ploeg
> >
> >
> >
> > "RonB" <r.borkent@chello123.nl> wrote in message
> >news:ahh0of$hsq$1@news.codecharge.com...
> > > Geert,
> > >
> > > In the event binding bit generated by CCS there is a reference to
"all"
> :
> > >
> > > //bind_events @1-4D12C86C
> > > function bind_events() {
> > > all["Button1"].onclick = Button1_OnClick;
> > >
> > > this gives me an error but changing this to:
> > >
> > > //bind_events @1-4D12C86C
> > > function bind_events() {
> > > document.all["Button1"].onclick = Button1_OnClick;
> > >
> > > works so the entire code for the clientside event would be:
> > >
> > > //Button1_OnClick @9-EF81859E
> > > function Button1_OnClick()
> > > {
> > > var result;
> > > //End Button1_OnClick
> > >
> > > //Custom Code @10-2A29BDB7
> > > // -------------------------
> > > self.close();
> > > // -------------------------
> > > //End Custom Code
> > >
> > > //Close Button1_OnClick @9-BC33A33A
> > > return result;
> > > }
> > > //End Close Button1_OnClick
> > >
> > > //bind_events @1-4D12C86C
> > > function bind_events() {
> > > document.all["Button1"].onclick = Button1_OnClick;
> > > }
> > > //End bind_events
> > >
> > > window.onload = bind_events; //Assign bind_events @1-19F7B649
> > >
> > > //End CCS script
> > >
> > >
> > > so the syntax for clientside event is just the javascript code with ;
at
> > the
> > > end and remember to change the "all" bit to "document.all"
> > >
> > > Ron
> > >
> >
> >
> >
>
>


   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

Web Database

Join thousands of Web developers who build Web applications with minimal coding.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.