Welcome Guest Search | Active Topics | Sign In | Register

ClientSideOnChange error object expected Options
Susana
Posted: Thursday, November 20, 2008 7:57:41 AM
Rank: Member
Groups: Member

Joined: 9/22/2008
Posts: 14
Hello,

I'm using datepicker object and I want to use "ClientSideOnChange" client event.
So it's not working for me, it fires javascript error:
[object expected]

I setup object like that:
Quote:
ClientSideOnChange="alert('aaa')"


At the end i want to do this utility:
In my page I have two datepickers when i change first date picker
it have to change datepicker2 on the same date of datepicker1

So i stay on first step "ClientSideOnChange" client event doesn't works for me.

What i'm doing wrong?

Thank you.
eo_support
Posted: Thursday, November 20, 2008 8:52:50 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,097
Hi,

ClientSideOnChange takes a function name, not inline JavaScript code. So whatever you want to call you have to put it inside a function first.

Thanks!
Susana
Posted: Thursday, November 20, 2008 9:16:13 AM
Rank: Member
Groups: Member

Joined: 9/22/2008
Posts: 14
Hello,

Thank you so I check before with a javascript function as:

ClientSideOnChange="MyFunction()"

And then I setup this function in javascript module.

And it doesn't work as well.


Thank you.
eo_support
Posted: Thursday, November 20, 2008 9:46:17 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,097
Hi,

The name of the function is "MyFunction", not "MyFunction()".

Thanks
Susana
Posted: Thursday, November 20, 2008 10:00:09 AM
Rank: Member
Groups: Member

Joined: 9/22/2008
Posts: 14
Hello,
Right, sorry now it works.

So I cannot set a value on datepiker obj on javascript.
I mean, in this javascript function I want to copy value of this datepicker to another datepicker
in the same page.

I have tried with:

document.getElementById('_eo__ctl0_ContentPlaceHolder1_DpckDeparture_picker').value=document.getElementById('_eo__ctl0_ContentPlaceHolder1_DpckArrival_picker').value;

On "_eo__ctl0_ContentPlaceHolder1_DpckArrival_picker'" is id of input type text rendered
by asp object. Is this way right? It doesn't works for me.

How can change datepicker value in a javascript?

Thank you for your fast responses.








eo_support
Posted: Thursday, November 20, 2008 10:45:18 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,097
Hi,

You will want to go over this topic first:

http://www.essentialobjects.com/ViewDoc.aspx?t=clientapi_howto.html

That should get you started about how to use our client side JavaScript APIs. It's not as what you thought. :)

Thanks


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.