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.

Issue in Web Datawindow as Criteria Screens

2 posts in General Discussion (old) Last posting was on 2000-03-23 04:42:44.0Z
Stephen Posted on 2000-03-22 23:49:32.0Z
Newsgroups: sybase.public.easerver
From: "Stephen" <skinchu@bn.com>
Organization: 161.221.10.36
X-Newsreader: AspNNTP 1.41 (Advent 2000, Inc.)
Subject: Issue in Web Datawindow as Criteria Screens
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Date: Wed, 22 Mar 2000 18:49:32 -0500
Lines: 47
NNTP-Posting-Host: 207.156.232.4
Message-ID: <347_6AmVFlFl$GA.111@forums.sybase.com>
Path: forums-1-dub!forums-1-dub!forums-master.sybase.com!forums.sybase.com
Xref: forums-1-dub sybase.public.easerver:25861
Article PK: 155896

Hi, there

I created a search screen using external datawindow followed the instructions in
Lerry Cermak's article "Web Datawindow as Criteria Screens". However, the
window keeps on loading when the page, s_criteria.html is loaded. The source
code for s_criteria.html is as follows:

<HTML>
<TITLE>s_criteria.html</TITLE>

<!--SCRIPT
dwLocal = java.CreateComponent("DataWindow/HTMLGenerator",
"iiop://localhost:9000", "jagadmin", "");
dwLocal.SetDWObject ("d:\\projects\\dwtutor\\dwtutor.pbl","d_search_criteria")
dwLocal.SetBrowser(document.GetServerVariable("HTTP_USER_AGENT"));
dwLocal.SetHTMLObjectName ("dwMine");
dwLocal.SetTrans("ODBC","ConnectString='DSN=EAS Demo DB V3;UID=dba;PWD=sql'",
"", "", "", "", "")
var dwMine_action = GetParam("dwMine_action");
var dwMine_context = GetParam("dwMine_context");
if ("undefined" != "" + dwMine_action)
{ retVal = dwLocal.SetAction (dwMine_action, dwMine_context);}
dwLocal.SetSelfLink (document.name, "");
dwLocal.SetWeight (true, true, true, true, true)
document.Write(dwLocal.Generate());
-->

<BODY language=JavaScript onload="if (dwMine.RowCount()==0)
{dwMine.InsertRow(0);}">
<H1>Please enter search parameters and click Search</H1>
<SCRIPT Language=JavaScript>
function dwMine_ButtonClicked(row, objName)
{ if (objName == "b_search")
{ ls_id = dwMine.GetItem(1,"id")
ls_state = dwMine.GetItem(1,"state")
ls_zip = dwMine.GetItem(1,"zip")
ls_link = "s_results.html?id=" + ls_id
ls_link += "&state=" + ls_state
ls_link += "&zip=" + ls_zip
parent.right.location.href = ls_link ;
}
}
</SCRIPT>

</BODY>
</HTML>

The method InsertRow is not supported in HTMLGenerator component, but why could
it be used in client method. Could somebody tell me what's wrong with the code?

Thanks
Stephen


Larry Cermak[Team Sybase] Posted on 2000-03-23 04:42:44.0Z
Newsgroups: sybase.public.easerver
From: "Larry Cermak[Team Sybase]" <lcermak@ctpartners.com>
Subject: Re: Issue in Web Datawindow as Criteria Screens
Date: Wed, 22 Mar 2000 22:42:44 -0600
Lines: 360
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: node6.dhcpchi.dslspeed.zyan.com 208.41.199.6
Message-ID: <347_CrFjrOIl$GA.298@forums.sybase.com>
References: <347_6AmVFlFl$GA.111@forums.sybase.com>
Path: forums-1-dub!forums-1-dub!forums-master.sybase.com!forums.sybase.com
Xref: forums-1-dub sybase.public.easerver:25853
Article PK: 155888

First, the InsertRow is not a method in the component, but a function in the
the generated HTML.

Interesting. The onload event is checking the rowcount before issueing the
insertrow.

Hold on, let me check...it works fine for me. I've attached the zip with
the source code that I used for the article. See if that sheds any light.

--

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)

"Stephen" <skinchu@bn.com> wrote in message
news:6AmVFlFl$GA.111@forums.sybase.com...
> Hi, there
>
> I created a search screen using external datawindow followed the
instructions in
> Lerry Cermak's article "Web Datawindow as Criteria Screens". However, the
> window keeps on loading when the page, s_criteria.html is loaded. The
source
> code for s_criteria.html is as follows:
>
> <HTML>
> <TITLE>s_criteria.html</TITLE>
>
> <!--SCRIPT
> dwLocal = java.CreateComponent("DataWindow/HTMLGenerator",
> "iiop://localhost:9000", "jagadmin", "");
> dwLocal.SetDWObject
("d:\\projects\\dwtutor\\dwtutor.pbl","d_search_criteria")
> dwLocal.SetBrowser(document.GetServerVariable("HTTP_USER_AGENT"));
> dwLocal.SetHTMLObjectName ("dwMine");
> dwLocal.SetTrans("ODBC","ConnectString='DSN=EAS Demo DB
V3;UID=dba;PWD=sql'",
> "", "", "", "", "")
> var dwMine_action = GetParam("dwMine_action");
> var dwMine_context = GetParam("dwMine_context");
> if ("undefined" != "" + dwMine_action)
> { retVal = dwLocal.SetAction (dwMine_action, dwMine_context);}
> dwLocal.SetSelfLink (document.name, "");
> dwLocal.SetWeight (true, true, true, true, true)
> document.Write(dwLocal.Generate());
> -->
>
> <BODY language=JavaScript onload="if (dwMine.RowCount()==0)
> {dwMine.InsertRow(0);}">
> <H1>Please enter search parameters and click Search</H1>
> <SCRIPT Language=JavaScript>
> function dwMine_ButtonClicked(row, objName)
> { if (objName == "b_search")
> { ls_id = dwMine.GetItem(1,"id")
> ls_state = dwMine.GetItem(1,"state")
> ls_zip = dwMine.GetItem(1,"zip")
> ls_link = "s_results.html?id=" + ls_id
> ls_link += "&state=" + ls_state
> ls_link += "&zip=" + ls_zip
> parent.right.location.href = ls_link ;
> }
> }
> </SCRIPT>
>
> </BODY>
> </HTML>
>
> The method InsertRow is not supported in HTMLGenerator component, but why
could
> it be used in client method. Could somebody tell me what's wrong with the
code?
>
> Thanks
> Stephen