Sybase NNTP forums - End Of Life (EOL)

The NNTP forums from Sybase - forums.sybase.com - are now closed.

All new questions should be directed to the appropriate forum at the SAP Community Network (SCN).

Individual products have links to the respective forums on SCN, or you can go to SCN and search for your product in the search box (upper right corner) to find your specific developer center.

SetItem ERROR!!! --

9 posts in General Discussion (old) Last posting was on 2000-03-30 22:38:52.0Z
Catherine Valentin Posted on 2000-03-27 19:03:26.0Z
Newsgroups: sybase.public.easerver
Date: Mon, 27 Mar 2000 15:03:26 -0400
From: Catherine Valentin <catherinev@edp.ssspr.com>
X-Mailer: Mozilla 4.04 [en] (Win95; I)
MIME-Version: 1.0
Subject: SetItem ERROR!!! --
Content-Type: multipart/alternative; boundary="------------C24B2FFC9E45B11012F7D532"
Lines: 71
NNTP-Posting-Host: 209.100.234.125
Message-ID: <347_38DFB07E.968E1BF0@edp.ssspr.com>
Path: forums-1-dub!forums-1-dub!forums-master.sybase.com!forums.sybase.com
Xref: forums-1-dub sybase.public.easerver:25605
Article PK: 154324

I write this Script, after Datawindow object and  desugner Control:

retVal = dwMine2.SetDWObject("C:/NT_practice/library_emergencia.pbl", "ajustar_dw2")
TestError(retVal, "SetDWObject")
dwMine2.SetSelfLink(document.name,"ajustar_emerg_test.htm")
dwMine2.SetHTMLObjectName("ajustar_dw2");
dwMine2.SetBrowser(document.GetServerVariable("HTTP_USER_AGENT"));

LOGON = psSession.GetValue("weblogin");
psDocument.WriteLn("<BR>" + LOGON);
ajustar_dw2.SetItem(1,"revision_officer_id", LOGON);            (line 119)
FECHA = new Date();
psDocument.WriteLn("<BR>" + FECHA);
dwMine2.setItem(1,"update_date",FECHA);                            (line 123)

HAVE THIS ERROR:  (In the browser)
Warning: undefined variable ajustar_dw2 near line 119 in "/ajustar_emerg_test.htm"
Warning: undefined variable ajustar_dw2.SetItem[SetItem] near line 119 in "/ajustar_emerg_test.htm"
Not allowed to create dwMine2.setItem[setItem] near line 123 in "/ajustar_emerg_test.htm"

THANKS!!!!

Catherine
 
 
 


Larry Cermak[Team Sybase] Posted on 2000-03-27 21:33:57.0Z
Newsgroups: sybase.public.easerver
From: "Larry Cermak[Team Sybase]" <lcermak@ctpartners.com>
Subject: Re: SetItem ERROR!!! --
Date: Mon, 27 Mar 2000 15:33:57 -0600
Lines: 142
MIME-Version: 1.0
Content-Type: multipart/alternative; boundary="----=_NextPart_000_0135_01BF9801.DE0F30F0"
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.00.2919.6600
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2919.6600
NNTP-Posting-Host: node18.dhcpchi.dslspeed.zyan.com 208.41.199.18
Message-ID: <347_mok8hWDm$GA.285@forums.sybase.com>
References: <347_38DFB07E.968E1BF0@edp.ssspr.com>
Path: forums-1-dub!forums-1-dub!forums-master.sybase.com!forums.sybase.com
Xref: forums-1-dub sybase.public.easerver:25587
Article PK: 155662

SetItem is not a server-side method in the default HTMLGenerator component.  Did you customize it?

Ohh, I see.  you are trying to mix client-side and server-side script.  The SetItem function is a client-side function that is generated as part of the HTML.  It cannot be called in server-side script.  In order to do that you have to customize the component.

--

Larry Cermak [Team Sybase]
Corporate Technology Partners, Inc.
www.ctpartners.com
Web DataWindow Articles
(http://sdn.sybase.com/sdn/appdev/get_doc.stm?loc=1001708)
 
 
"Catherine Valentin" <catherinev@edp.ssspr.com> wrote in message news:38DFB07E.968E1BF0@edp.ssspr.com...
I write this Script, after Datawindow object and  desugner Control:

retVal = dwMine2.SetDWObject("C:/NT_practice/library_emergencia.pbl", "ajustar_dw2")
TestError(retVal, "SetDWObject")
dwMine2.SetSelfLink(document.name,"ajustar_emerg_test.htm")
dwMine2.SetHTMLObjectName("ajustar_dw2");
dwMine2.SetBrowser(document.GetServerVariable("HTTP_USER_AGENT"));

LOGON = psSession.GetValue("weblogin");
psDocument.WriteLn("<BR>" + LOGON);
ajustar_dw2.SetItem(1,"revision_officer_id", LOGON);            (line 119)
FECHA = new Date();
psDocument.WriteLn("<BR>" + FECHA);
dwMine2.setItem(1,"update_date",FECHA);                            (line 123)

HAVE THIS ERROR:  (In the browser)
Warning: undefined variable ajustar_dw2 near line 119 in "/ajustar_emerg_test.htm"
Warning: undefined variable ajustar_dw2.SetItem[SetItem] near line 119 in "/ajustar_emerg_test.htm"
Not allowed to create dwMine2.setItem[setItem] near line 123 in "/ajustar_emerg_test.htm"

THANKS!!!!

Catherine
 
 
 


Catherine Valentin Posted on 2000-03-28 14:28:18.0Z
Newsgroups: sybase.public.easerver
Date: Tue, 28 Mar 2000 10:28:18 -0400
From: Catherine Valentin <catherinev@edp.ssspr.com>
X-Mailer: Mozilla 4.04 [en] (Win95; I)
MIME-Version: 1.0
CC: lcermak@ctpartners.com
Subject: Re: SetItem ERROR!!! --
Content-Type: multipart/alternative; boundary="------------70C5E28CE601360B8AA30187"
Lines: 695
NNTP-Posting-Host: 209.100.234.125
Message-ID: <347_38E0C182.98B5622D@edp.ssspr.com>
References: <347_38DFB07E.968E1BF0@edp.ssspr.com> <347_mok8hWDm$GA.285@forums.sybase.com>
Path: forums-1-dub!forums-1-dub!forums-master.sybase.com!forums.sybase.com
Xref: forums-1-dub sybase.public.easerver:25495
Article PK: 155578

I make this "changes" in the script but have ERROR:

Server Script :
<!--SCRIPT
LOGON = psSession.GetValue("weblogin");
psDocument.WriteLn("<BR>" + LOGON);
FECHA = new Date();
psDocument.WriteLn("<BR>" + FECHA);
-->
Client Script:
<script>
ajustar_dw2.SetItem(1,"update_date",FECHA);
ajustar_dw2.SetItem(1,"ajustar_dw2.revision_officer_id",LOGON);
</script>

MESSAGE OF ERROR:

 

BUT I HAVE THE VALUE OF : FECHA and LOGON in the page (with WriteLn)
 

Catherine :-)
 
 
 

Larry Cermak[Team Sybase] wrote:

  SetItem is not a server-side method in the default HTMLGenerator component.  Did you customize it?

Ohh, I see.  you are trying to mix client-side and server-side script.  The SetItem function is a client-side function that is generated as part of the HTML.  It cannot be called in server-side script.  In order to do that you have to customize the component.

--

Larry Cermak [Team Sybase]
Corporate Technology Partners, Inc.
www.ctpartners.com
Web DataWindow Articles
(http://sdn.sybase.com/sdn/appdev/get_doc.stm?loc=1001708)

"Catherine Valentin" <catherinev@edp.ssspr.com> wrote in message news:38DFB07E.968E1BF0@edp.ssspr.com...I write this Script, after Datawindow object and  desugner Control:

retVal = dwMine2.SetDWObject("C:/NT_practice/library_emergencia.pbl", "ajustar_dw2")
TestError(retVal, "SetDWObject")
dwMine2.SetSelfLink(document.name,"ajustar_emerg_test.htm")
dwMine2.SetHTMLObjectName("ajustar_dw2");
dwMine2.SetBrowser(document.GetServerVariable("HTTP_USER_AGENT"));

LOGON = psSession.GetValue("weblogin");
psDocument.WriteLn("<BR>" + LOGON);
ajustar_dw2.SetItem(1,"revision_officer_id", LOGON);            (line 119)
FECHA = new Date();
psDocument.WriteLn("<BR>" + FECHA);
dwMine2.setItem(1,"update_date",FECHA);                            (line 123)

HAVE THIS ERROR:  (In the browser)
Warning: undefined variable ajustar_dw2 near line 119 in "/ajustar_emerg_test.htm"
Warning: undefined variable ajustar_dw2.SetItem[SetItem] near line 119 in "/ajustar_emerg_test.htm"
Not allowed to create dwMine2.setItem[setItem] near line 123 in "/ajustar_emerg_test.htm"

THANKS!!!!

Catherine
 
 
 

 

unknown-name

Tim Nesham Posted on 2000-03-28 19:56:41.0Z
Newsgroups: sybase.public.easerver
From: "Tim Nesham" <tim.nesham@born.com>
Subject: Re: SetItem ERROR!!! --
Date: Tue, 28 Mar 2000 13:56:41 -0600
Lines: 537
MIME-Version: 1.0
Content-Type: multipart/related; type="multipart/alternative"; boundary="----=_NextPart_000_002A_01BF98BD.71D02310"
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.00.2919.6600
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2919.6600
X-Original-NNTP-Posting-Host: 161.49.6.89
Organization: Quad/Graphics,Inc.
NNTP-Posting-Host: dns2.qgraph.com 206.158.124.2
Message-ID: <347_38e10e7d@news.qgraph.com>
References: <347_38DFB07E.968E1BF0@edp.ssspr.com> <347_mok8hWDm$GA.285@forums.sybase.com> <347_38E0C182.98B5622D@edp.ssspr.com>
Path: forums-1-dub!forums-1-dub!forums-master.sybase.com!forums.sybase.com!news.qgraph.com!161.49.6.89
Xref: forums-1-dub sybase.public.easerver:25439
Article PK: 155528

That's because FECHA is on the server, not the client. One trick I use to get the server vars back to the client is:
 
psDocument.WriteLn("<script>");
psDocument.WriteLn("var FECHA = ");
psDocument.WriteLn(FECHA);
psDocument.WriteLn("</script>");
"Catherine Valentin" <catherinev@edp.ssspr.com> wrote in message news:38E0C182.98B5622D@edp.ssspr.com...
I make this "changes" in the script but have ERROR:

Server Script :
<!--SCRIPT
LOGON = psSession.GetValue("weblogin");
psDocument.WriteLn("<BR>" + LOGON);
FECHA = new Date();
psDocument.WriteLn("<BR>" + FECHA);
-->
Client Script:
<script>
ajustar_dw2.SetItem(1,"update_date",FECHA);
ajustar_dw2.SetItem(1,"ajustar_dw2.revision_officer_id",LOGON);
</script>

MESSAGE OF ERROR:

 

BUT I HAVE THE VALUE OF : FECHA and LOGON in the page (with WriteLn)
 

Catherine :-)
 
 
 

Larry Cermak[Team Sybase] wrote:

  SetItem is not a server-side method in the default HTMLGenerator component.  Did you customize it?

Ohh, I see.  you are trying to mix client-side and server-side script.  The SetItem function is a client-side function that is generated as part of the HTML.  It cannot be called in server-side script.  In order to do that you have to customize the component.

--

Larry Cermak [Team Sybase]
Corporate Technology Partners, Inc.
www.ctpartners.com
Web DataWindow Articles
(http://sdn.sybase.com/sdn/appdev/get_doc.stm?loc=1001708)

"Catherine Valentin" <catherinev@edp.ssspr.com> wrote in message news:38DFB07E.968E1BF0@edp.ssspr.com...I write this Script, after Datawindow object and  desugner Control:

retVal = dwMine2.SetDWObject("C:/NT_practice/library_emergencia.pbl", "ajustar_dw2")
TestError(retVal, "SetDWObject")
dwMine2.SetSelfLink(document.name,"ajustar_emerg_test.htm")
dwMine2.SetHTMLObjectName("ajustar_dw2");
dwMine2.SetBrowser(document.GetServerVariable("HTTP_USER_AGENT"));

LOGON = psSession.GetValue("weblogin");
psDocument.WriteLn("<BR>" + LOGON);
ajustar_dw2.SetItem(1,"revision_officer_id", LOGON);            (line 119)
FECHA = new Date();
psDocument.WriteLn("<BR>" + FECHA);
dwMine2.setItem(1,"update_date",FECHA);                            (line 123)

HAVE THIS ERROR:  (In the browser)
Warning: undefined variable ajustar_dw2 near line 119 in "/ajustar_emerg_test.htm"
Warning: undefined variable ajustar_dw2.SetItem[SetItem] near line 119 in "/ajustar_emerg_test.htm"
Not allowed to create dwMine2.setItem[setItem] near line 123 in "/ajustar_emerg_test.htm"

THANKS!!!!

Catherine
 
 
 

 

C:WINDOWSTEMPnsmailHV.jpeg

Catherine Valentin Posted on 2000-03-29 15:15:26.0Z
Newsgroups: sybase.public.easerver
Date: Wed, 29 Mar 2000 11:15:26 -0400
From: Catherine Valentin <catherinev@edp.ssspr.com>
X-Mailer: Mozilla 4.04 [en] (Win95; I)
MIME-Version: 1.0
Subject: Re: SetItem ERROR!!! --
Content-Type: multipart/alternative; boundary="------------D36D2EDB782A6CD68AF6826C"
Lines: 771
NNTP-Posting-Host: 209.100.234.125
Message-ID: <347_38E21E0E.BF81F8D7@edp.ssspr.com>
References: <347_38DFB07E.968E1BF0@edp.ssspr.com> <347_mok8hWDm$GA.285@forums.sybase.com> <347_38E0C182.98B5622D@edp.ssspr.com> <347_38e10e7d@news.qgraph.com>
Path: forums-1-dub!forums-1-dub!forums-master.sybase.com!forums.sybase.com
Xref: forums-1-dub sybase.public.easerver:25378
Article PK: 154300

Now  I don't have error when load page and UPDATE

<script>
ajustar_dw2.SetItem(1,"update_date", "FECHA");
ajustar_dw2.SetItem(1,"revision_officer_id", "LOGON");
</script>
BUT no have this value in my DATABASE table.
 NOT "Set" the new VALUE...
????????????????????????????????
 
 

Tim Nesham wrote:

 That's because FECHA is on the server, not the client. One trick I use to get the server vars back to the client is: psDocument.WriteLn("<script>");psDocument.WriteLn("var FECHA = ");psDocument.WriteLn(FECHA);
psDocument.WriteLn("</script>");
"Catherine Valentin" <catherinev@edp.ssspr.com> wrote in message news:38E0C182.98B5622D@edp.ssspr.com...I make this "changes" in the script but have ERROR:

Server Script :
<!--SCRIPT
LOGON = psSession.GetValue("weblogin");
psDocument.WriteLn("<BR>" + LOGON);
FECHA = new Date();
psDocument.WriteLn("<BR>" + FECHA);
-->
Client Script:
<script>
ajustar_dw2.SetItem(1,"update_date",FECHA);
ajustar_dw2.SetItem(1,"ajustar_dw2.revision_officer_id",LOGON);
</script>

MESSAGE OF ERROR:

 

BUT I HAVE THE VALUE OF : FECHA and LOGON in the page (with WriteLn)
 

Catherine :-)
 
 
 

Larry Cermak[Team Sybase] wrote:

  SetItem is not a server-side method in the default HTMLGenerator component.  Did you customize it?

Ohh, I see.  you are trying to mix client-side and server-side script.  The SetItem function is a client-side function that is generated as part of the HTML.  It cannot be called in server-side script.  In order to do that you have to customize the component.

--

Larry Cermak [Team Sybase]
Corporate Technology Partners, Inc.
www.ctpartners.com
Web DataWindow Articles
(http://sdn.sybase.com/sdn/appdev/get_doc.stm?loc=1001708)

"Catherine Valentin" <catherinev@edp.ssspr.com> wrote in message news:38DFB07E.968E1BF0@edp.ssspr.com...I write this Script, after Datawindow object and  desugner Control:

retVal = dwMine2.SetDWObject("C:/NT_practice/library_emergencia.pbl", "ajustar_dw2")
TestError(retVal, "SetDWObject")
dwMine2.SetSelfLink(document.name,"ajustar_emerg_test.htm")
dwMine2.SetHTMLObjectName("ajustar_dw2");
dwMine2.SetBrowser(document.GetServerVariable("HTTP_USER_AGENT"));

LOGON = psSession.GetValue("weblogin");
psDocument.WriteLn("<BR>" + LOGON);
ajustar_dw2.SetItem(1,"revision_officer_id", LOGON);            (line 119)
FECHA = new Date();
psDocument.WriteLn("<BR>" + FECHA);
dwMine2.setItem(1,"update_date",FECHA);                            (line 123)

HAVE THIS ERROR:  (In the browser)
Warning: undefined variable ajustar_dw2 near line 119 in "/ajustar_emerg_test.htm"
Warning: undefined variable ajustar_dw2.SetItem[SetItem] near line 119 in "/ajustar_emerg_test.htm"
Not allowed to create dwMine2.setItem[setItem] near line 123 in "/ajustar_emerg_test.htm"

THANKS!!!!

Catherine
 
 
 

 
 

unknown-name

Catherine Valentin Posted on 2000-03-29 15:15:02.0Z
Newsgroups: sybase.public.easerver
Date: Wed, 29 Mar 2000 11:15:02 -0400
From: Catherine Valentin <catherinev@edp.ssspr.com>
X-Mailer: Mozilla 4.04 [en] (Win95; I)
MIME-Version: 1.0
Subject: Re: SetItem ERROR!!! --
Content-Type: multipart/alternative; boundary="------------F00D54021E7BE0D233F4420F"
Lines: 778
NNTP-Posting-Host: 209.100.234.125
Message-ID: <347_38E21DF6.449F27B0@edp.ssspr.com>
References: <347_38DFB07E.968E1BF0@edp.ssspr.com> <347_mok8hWDm$GA.285@forums.sybase.com> <347_38E0C182.98B5622D@edp.ssspr.com> <347_38e10e7d@news.qgraph.com>
Path: forums-1-dub!forums-1-dub!forums-master.sybase.com!forums.sybase.com
Xref: forums-1-dub sybase.public.easerver:25379
Article PK: 154301

Now  I don't have error when load page and UPDATE

<script>
ajustar_dw2.SetItem(1,"update_date", "FECHA");
ajustar_dw2.SetItem(1,"revision_officer_id", "LOGON");
</script>
BUT no have this value in my DATABASE table.
 NOT "Set" the new VALUE...
????????????????????????????????
 
 

Tim Nesham wrote:

 That's because FECHA is on the server, not the client. One trick I use to get the server vars back to the client is: psDocument.WriteLn("<script>");psDocument.WriteLn("var FECHA = ");psDocument.WriteLn(FECHA);
psDocument.WriteLn("</script>");
"Catherine Valentin" <catherinev@edp.ssspr.com> wrote in message news:38E0C182.98B5622D@edp.ssspr.com...I make this "changes" in the script but have ERROR:

Server Script :
<!--SCRIPT
LOGON = psSession.GetValue("weblogin");
psDocument.WriteLn("<BR>" + LOGON);
FECHA = new Date();
psDocument.WriteLn("<BR>" + FECHA);
-->
Client Script:
<script>
ajustar_dw2.SetItem(1,"update_date",FECHA);
ajustar_dw2.SetItem(1,"ajustar_dw2.revision_officer_id",LOGON);
</script>

MESSAGE OF ERROR:

 

BUT I HAVE THE VALUE OF : FECHA and LOGON in the page (with WriteLn)
 

Catherine :-)
 
 
 

Larry Cermak[Team Sybase] wrote:

  SetItem is not a server-side method in the default HTMLGenerator component.  Did you customize it?

Ohh, I see.  you are trying to mix client-side and server-side script.  The SetItem function is a client-side function that is generated as part of the HTML.  It cannot be called in server-side script.  In order to do that you have to customize the component.

--

Larry Cermak [Team Sybase]
Corporate Technology Partners, Inc.
www.ctpartners.com
Web DataWindow Articles
(http://sdn.sybase.com/sdn/appdev/get_doc.stm?loc=1001708)

"Catherine Valentin" <catherinev@edp.ssspr.com> wrote in message news:38DFB07E.968E1BF0@edp.ssspr.com...I write this Script, after Datawindow object and  desugner Control:

retVal = dwMine2.SetDWObject("C:/NT_practice/library_emergencia.pbl", "ajustar_dw2")
TestError(retVal, "SetDWObject")
dwMine2.SetSelfLink(document.name,"ajustar_emerg_test.htm")
dwMine2.SetHTMLObjectName("ajustar_dw2");
dwMine2.SetBrowser(document.GetServerVariable("HTTP_USER_AGENT"));

LOGON = psSession.GetValue("weblogin");
psDocument.WriteLn("<BR>" + LOGON);
ajustar_dw2.SetItem(1,"revision_officer_id", LOGON);            (line 119)
FECHA = new Date();
psDocument.WriteLn("<BR>" + FECHA);
dwMine2.setItem(1,"update_date",FECHA);                            (line 123)

HAVE THIS ERROR:  (In the browser)
Warning: undefined variable ajustar_dw2 near line 119 in "/ajustar_emerg_test.htm"
Warning: undefined variable ajustar_dw2.SetItem[SetItem] near line 119 in "/ajustar_emerg_test.htm"
Not allowed to create dwMine2.setItem[setItem] near line 123 in "/ajustar_emerg_test.htm"

THANKS!!!!

Catherine
 
 
 

 
 

unknown-name

Tim Nesham Posted on 2000-03-29 15:37:23.0Z
Newsgroups: sybase.public.easerver
From: "Tim Nesham" <tim.nesham@born.com>
Subject: Re: SetItem ERROR!!! --
Date: Wed, 29 Mar 2000 09:37:23 -0600
Lines: 654
MIME-Version: 1.0
Content-Type: multipart/related; type="multipart/alternative"; boundary="----=_NextPart_000_000F_01BF9962.62F3E8E0"
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.00.2919.6600
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2919.6600
X-Original-NNTP-Posting-Host: 161.49.6.89
Organization: Quad/Graphics,Inc.
NNTP-Posting-Host: dns2.qgraph.com 206.158.124.2
Message-ID: <347_38e22338@news.qgraph.com>
References: <347_38DFB07E.968E1BF0@edp.ssspr.com> <347_mok8hWDm$GA.285@forums.sybase.com> <347_38E0C182.98B5622D@edp.ssspr.com> <347_38e10e7d@news.qgraph.com> <347_38E21DF6.449F27B0@edp.ssspr.com>
Path: forums-1-dub!forums-1-dub!forums-master.sybase.com!forums.sybase.com!news.qgraph.com!161.49.6.89
Xref: forums-1-dub sybase.public.easerver:25371
Article PK: 155474

You're not looking closely enough at what I said before.
psDocument.WriteLn("<script>");
psDocument.WriteLn("var FECHA = ");
psDocument.WriteLn(FECHA);
psDocument.WriteLn("</script>");
 
These lines execute on the server to create a client-side script the declares a variable called FECHA using the value passed from the server.
The objective is to get something like:
<script>
var FECHA = "12/12/1999";
</script>
 
So, on the client-side this script will see the variable and its value from the server.
<script>
ajustar_dw2.SetItem(1,"update_date",FECHA);
</script>
 
"Catherine Valentin" <catherinev@edp.ssspr.com> wrote in message news:38E21DF6.449F27B0@edp.ssspr.com...

Now  I don't have error when load page and UPDATE

<script>
ajustar_dw2.SetItem(1,"update_date", "FECHA");
ajustar_dw2.SetItem(1,"revision_officer_id", "LOGON");
</script>
BUT no have this value in my DATABASE table.
 NOT "Set" the new VALUE...
????????????????????????????????
 
 

Tim Nesham wrote:

 That's because FECHA is on the server, not the client. One trick I use to get the server vars back to the client is: psDocument.WriteLn("<script>");psDocument.WriteLn("var FECHA = ");psDocument.WriteLn(FECHA);
psDocument.WriteLn("</script>");
"Catherine Valentin" <catherinev@edp.ssspr.com> wrote in message news:38E0C182.98B5622D@edp.ssspr.com...I make this "changes" in the script but have ERROR:

Server Script :
<!--SCRIPT
LOGON = psSession.GetValue("weblogin");
psDocument.WriteLn("<BR>" + LOGON);
FECHA = new Date();
psDocument.WriteLn("<BR>" + FECHA);
-->
Client Script:
<script>
ajustar_dw2.SetItem(1,"update_date",FECHA);
ajustar_dw2.SetItem(1,"ajustar_dw2.revision_officer_id",LOGON);
</script>

MESSAGE OF ERROR:

 

BUT I HAVE THE VALUE OF : FECHA and LOGON in the page (with WriteLn)
 

Catherine :-)
 
 
 

Larry Cermak[Team Sybase] wrote:

  SetItem is not a server-side method in the default HTMLGenerator component.  Did you customize it?

Ohh, I see.  you are trying to mix client-side and server-side script.  The SetItem function is a client-side function that is generated as part of the HTML.  It cannot be called in server-side script.  In order to do that you have to customize the component.

--

Larry Cermak [Team Sybase]
Corporate Technology Partners, Inc.
www.ctpartners.com
Web DataWindow Articles
(http://sdn.sybase.com/sdn/appdev/get_doc.stm?loc=1001708)

"Catherine Valentin" <catherinev@edp.ssspr.com> wrote in message news:38DFB07E.968E1BF0@edp.ssspr.com...I write this Script, after Datawindow object and  desugner Control:

retVal = dwMine2.SetDWObject("C:/NT_practice/library_emergencia.pbl", "ajustar_dw2")
TestError(retVal, "SetDWObject")
dwMine2.SetSelfLink(document.name,"ajustar_emerg_test.htm")
dwMine2.SetHTMLObjectName("ajustar_dw2");
dwMine2.SetBrowser(document.GetServerVariable("HTTP_USER_AGENT"));

LOGON = psSession.GetValue("weblogin");
psDocument.WriteLn("<BR>" + LOGON);
ajustar_dw2.SetItem(1,"revision_officer_id", LOGON);            (line 119)
FECHA = new Date();
psDocument.WriteLn("<BR>" + FECHA);
dwMine2.setItem(1,"update_date",FECHA);                            (line 123)

HAVE THIS ERROR:  (In the browser)
Warning: undefined variable ajustar_dw2 near line 119 in "/ajustar_emerg_test.htm"
Warning: undefined variable ajustar_dw2.SetItem[SetItem] near line 119 in "/ajustar_emerg_test.htm"
Not allowed to create dwMine2.setItem[setItem] near line 123 in "/ajustar_emerg_test.htm"

THANKS!!!!

Catherine
 
 
 

 
 

C:WINDOWSTEMPnsmailHV.jpeg

Catherine Valentin Posted on 2000-03-30 18:32:02.0Z
Newsgroups: sybase.public.easerver
Date: Thu, 30 Mar 2000 14:32:02 -0400
From: Catherine Valentin <catherinev@edp.ssspr.com>
X-Mailer: Mozilla 4.04 [en] (Win95; I)
MIME-Version: 1.0
To: Tim Nesham <tim.nesham@born.com>
Subject: Re: SetItem ERROR!!! --
Content-Type: multipart/alternative; boundary="------------5E8577F94FC8B21C24BABEC0"
Lines: 941
NNTP-Posting-Host: 209.100.234.125
Message-ID: <347_38E39DA2.5A9EC66E@edp.ssspr.com>
References: <347_38DFB07E.968E1BF0@edp.ssspr.com> <347_mok8hWDm$GA.285@forums.sybase.com> <347_38E0C182.98B5622D@edp.ssspr.com> <347_38e10e7d@news.qgraph.com> <347_38E21DF6.449F27B0@edp.ssspr.com> <347_38e22338@news.qgraph.com>
Path: forums-1-dub!forums-1-dub!forums-master.sybase.com!forums.sybase.com
Xref: forums-1-dub sybase.public.easerver:25202
Article PK: 228483

With that :

<!--SCRIPT
LOGON = psSession.GetValue("weblogin");
psDocument.WriteLn("<BR>" + LOGON);
FECHA = new Date();
psDocument.WriteLn("<BR>" + FECHA);   -- And I need the SYSTEM DATE (in the moment of update)
 For that reason I don't use specific date I "get the actual date of system.
-->

I have my LOGON value and FECHA value, because I see with WritLn in my page.
BUT when I use my SetItem , nothing is change in my database.
I don't have error, but not have RESULT of SetItem..
 

<script>
ajustar_dw2.SetItem(1,"update_date", "FECHA");
ajustar_dw2.SetItem(1, "revision_officer_id',"LOGON");
</script>

Thanks

Catherine
 

Tim Nesham wrote:

 You're not looking closely enough at what I said before.psDocument.WriteLn("<script>");psDocument.WriteLn("var FECHA = ");psDocument.WriteLn(FECHA);
psDocument.WriteLn("</script>"); These lines execute on the server to create a client-side script the declares a variable called FECHA using the value passed from the server.The objective is to get something like:<script>var FECHA = "12/12/1999";
</script> So, on the client-side this script will see the variable and its value from the server.<script>
ajustar_dw2.SetItem(1,"update_date",FECHA);
</script> 
"Catherine Valentin" <catherinev@edp.ssspr.com> wrote in message news:38E21DF6.449F27B0@edp.ssspr.com...Now  I don't have error when load page and UPDATE

<script>
ajustar_dw2.SetItem(1,"update_date", "FECHA");
ajustar_dw2.SetItem(1,"revision_officer_id", "LOGON");
</script>
BUT no have this value in my DATABASE table.
 NOT "Set" the new VALUE...
????????????????????????????????
 
 

Tim Nesham wrote:

 That's because FECHA is on the server, not the client. One trick I use to get the server vars back to the client is: psDocument.WriteLn("<script>");psDocument.WriteLn("var FECHA = ");psDocument.WriteLn(FECHA);
psDocument.WriteLn("</script>");
"Catherine Valentin" <catherinev@edp.ssspr.com> wrote in message news:38E0C182.98B5622D@edp.ssspr.com...I make this "changes" in the script but have ERROR:

Server Script :
<!--SCRIPT
LOGON = psSession.GetValue("weblogin");
psDocument.WriteLn("<BR>" + LOGON);
FECHA = new Date();
psDocument.WriteLn("<BR>" + FECHA);
-->
Client Script:
<script>
ajustar_dw2.SetItem(1,"update_date",FECHA);
ajustar_dw2.SetItem(1,"ajustar_dw2.revision_officer_id",LOGON);
</script>

MESSAGE OF ERROR:

 

BUT I HAVE THE VALUE OF : FECHA and LOGON in the page (with WriteLn)
 

Catherine :-)
 
 
 

Larry Cermak[Team Sybase] wrote:

  SetItem is not a server-side method in the default HTMLGenerator component.  Did you customize it?

Ohh, I see.  you are trying to mix client-side and server-side script.  The SetItem function is a client-side function that is generated as part of the HTML.  It cannot be called in server-side script.  In order to do that you have to customize the component.

--

Larry Cermak [Team Sybase]
Corporate Technology Partners, Inc.
www.ctpartners.com
Web DataWindow Articles
(http://sdn.sybase.com/sdn/appdev/get_doc.stm?loc=1001708)

"Catherine Valentin" <catherinev@edp.ssspr.com> wrote in message news:38DFB07E.968E1BF0@edp.ssspr.com...I write this Script, after Datawindow object and  desugner Control:

retVal = dwMine2.SetDWObject("C:/NT_practice/library_emergencia.pbl", "ajustar_dw2")
TestError(retVal, "SetDWObject")
dwMine2.SetSelfLink(document.name,"ajustar_emerg_test.htm")
dwMine2.SetHTMLObjectName("ajustar_dw2");
dwMine2.SetBrowser(document.GetServerVariable("HTTP_USER_AGENT"));

LOGON = psSession.GetValue("weblogin");
psDocument.WriteLn("<BR>" + LOGON);
ajustar_dw2.SetItem(1,"revision_officer_id", LOGON);            (line 119)
FECHA = new Date();
psDocument.WriteLn("<BR>" + FECHA);
dwMine2.setItem(1,"update_date",FECHA);                            (line 123)

HAVE THIS ERROR:  (In the browser)
Warning: undefined variable ajustar_dw2 near line 119 in "/ajustar_emerg_test.htm"
Warning: undefined variable ajustar_dw2.SetItem[SetItem] near line 119 in "/ajustar_emerg_test.htm"
Not allowed to create dwMine2.setItem[setItem] near line 123 in "/ajustar_emerg_test.htm"

THANKS!!!!

Catherine
 
 
 

 
 
 

unknown-name

Tim Nesham Posted on 2000-03-30 22:38:52.0Z
Newsgroups: sybase.public.easerver
From: "Tim Nesham" <tim.nesham@born.com>
Subject: Re: SetItem ERROR!!! --
Date: Thu, 30 Mar 2000 16:38:52 -0600
Lines: 734
MIME-Version: 1.0
Content-Type: multipart/related; type="multipart/alternative"; boundary="----=_NextPart_000_000B_01BF9A66.6EE1D9A0"
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.00.2919.6600
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2919.6600
X-Original-NNTP-Posting-Host: 161.49.6.89
Organization: Quad/Graphics,Inc.
NNTP-Posting-Host: dns2.qgraph.com 206.158.124.2
Message-ID: <347_38e3d780@news.qgraph.com>
References: <347_38DFB07E.968E1BF0@edp.ssspr.com> <347_mok8hWDm$GA.285@forums.sybase.com> <347_38E0C182.98B5622D@edp.ssspr.com> <347_38e10e7d@news.qgraph.com> <347_38E21DF6.449F27B0@edp.ssspr.com> <347_38e22338@news.qgraph.com> <347_38E39DA2.5A9EC66E@edp.ssspr.com>
Path: forums-1-dub!forums-1-dub!forums-master.sybase.com!forums.sybase.com!news.qgraph.com!161.49.6.89
Xref: forums-1-dub sybase.public.easerver:25167
Article PK: 154266

Actually I think this is easier with a ServerServiceClass.
"Catherine Valentin" <catherinev@edp.ssspr.com> wrote in message news:38E39DA2.5A9EC66E@edp.ssspr.com...
With that :

<!--SCRIPT
LOGON = psSession.GetValue("weblogin");
psDocument.WriteLn("<BR>" + LOGON);
FECHA = new Date();
psDocument.WriteLn("<BR>" + FECHA);   -- And I need the SYSTEM DATE (in the moment of update)
 For that reason I don't use specific date I "get the actual date of system.
-->

I have my LOGON value and FECHA value, because I see with WritLn in my page.
BUT when I use my SetItem , nothing is change in my database.
I don't have error, but not have RESULT of SetItem..
 

<script>
ajustar_dw2.SetItem(1,"update_date", "FECHA");
ajustar_dw2.SetItem(1, "revision_officer_id',"LOGON");
</script>

Thanks

Catherine
 

Tim Nesham wrote:

 You're not looking closely enough at what I said before.psDocument.WriteLn("<script>");psDocument.WriteLn("var FECHA = ");psDocument.WriteLn(FECHA);
psDocument.WriteLn("</script>"); These lines execute on the server to create a client-side script the declares a variable called FECHA using the value passed from the server.The objective is to get something like:<script>var FECHA = "12/12/1999";
</script> So, on the client-side this script will see the variable and its value from the server.<script>
ajustar_dw2.SetItem(1,"update_date",FECHA);
</script> 
"Catherine Valentin" <catherinev@edp.ssspr.com> wrote in message news:38E21DF6.449F27B0@edp.ssspr.com...Now  I don't have error when load page and UPDATE

<script>
ajustar_dw2.SetItem(1,"update_date", "FECHA");
ajustar_dw2.SetItem(1,"revision_officer_id", "LOGON");
</script>
BUT no have this value in my DATABASE table.
 NOT "Set" the new VALUE...
????????????????????????????????
 
 

Tim Nesham wrote:

 That's because FECHA is on the server, not the client. One trick I use to get the server vars back to the client is: psDocument.WriteLn("<script>");psDocument.WriteLn("var FECHA = ");psDocument.WriteLn(FECHA);
psDocument.WriteLn("</script>");
"Catherine Valentin" <catherinev@edp.ssspr.com> wrote in message news:38E0C182.98B5622D@edp.ssspr.com...I make this "changes" in the script but have ERROR:

Server Script :
<!--SCRIPT
LOGON = psSession.GetValue("weblogin");
psDocument.WriteLn("<BR>" + LOGON);
FECHA = new Date();
psDocument.WriteLn("<BR>" + FECHA);
-->
Client Script:
<script>
ajustar_dw2.SetItem(1,"update_date",FECHA);
ajustar_dw2.SetItem(1,"ajustar_dw2.revision_officer_id",LOGON);
</script>

MESSAGE OF ERROR:

 

BUT I HAVE THE VALUE OF : FECHA and LOGON in the page (with WriteLn)
 

Catherine :-)
 
 
 

Larry Cermak[Team Sybase] wrote:

  SetItem is not a server-side method in the default HTMLGenerator component.  Did you customize it?

Ohh, I see.  you are trying to mix client-side and server-side script.  The SetItem function is a client-side function that is generated as part of the HTML.  It cannot be called in server-side script.  In order to do that you have to customize the component.

--

Larry Cermak [Team Sybase]
Corporate Technology Partners, Inc.
www.ctpartners.com
Web DataWindow Articles
(http://sdn.sybase.com/sdn/appdev/get_doc.stm?loc=1001708)

"Catherine Valentin" <catherinev@edp.ssspr.com> wrote in message news:38DFB07E.968E1BF0@edp.ssspr.com...I write this Script, after Datawindow object and  desugner Control:

retVal = dwMine2.SetDWObject("C:/NT_practice/library_emergencia.pbl", "ajustar_dw2")
TestError(retVal, "SetDWObject")
dwMine2.SetSelfLink(document.name,"ajustar_emerg_test.htm")
dwMine2.SetHTMLObjectName("ajustar_dw2");
dwMine2.SetBrowser(document.GetServerVariable("HTTP_USER_AGENT"));

LOGON = psSession.GetValue("weblogin");
psDocument.WriteLn("<BR>" + LOGON);
ajustar_dw2.SetItem(1,"revision_officer_id", LOGON);            (line 119)
FECHA = new Date();
psDocument.WriteLn("<BR>" + FECHA);
dwMine2.setItem(1,"update_date",FECHA);                            (line 123)

HAVE THIS ERROR:  (In the browser)
Warning: undefined variable ajustar_dw2 near line 119 in "/ajustar_emerg_test.htm"
Warning: undefined variable ajustar_dw2.SetItem[SetItem] near line 119 in "/ajustar_emerg_test.htm"
Not allowed to create dwMine2.setItem[setItem] near line 123 in "/ajustar_emerg_test.htm"

THANKS!!!!

Catherine
 
 
 

 
 
 

C:WINDOWSTEMPnsmailHV.jpeg