This is Interesting: Free Magazines for Graphics designers and webmasters  


Home > Archive > Microsoft XML > March 2005 > Scriptlets within tabular bound data island





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Scriptlets within tabular bound data island
Simon Niederberger

2005-03-23, 6:41 pm

I would like to have a DHTML scriptlet within a tabular bound XML data
island. For certain events, I'll need to read some values of the scriptlet
and process them. As the tabular binding will multiply my OBJECT tag, I
can't use the ID to access the scriptlet (ID would be non-unique!).

Is there a work-around to find out which scriptlet (i.e. which row) actually
fired the event?

Which the code below, the onscriptletevent is fired, but I can't tell from
which row!

Thanks a lot
Simon

<SCRIPT LANGUAGE="JavaScript" FOR="myScr" EVENT="onscriptletevent(name,
eventData)" >
alert("The event that occurred in the scriptlet was " + name);
</SCRIPT>
[...]

<XML ID="dsoBookList" SRC="booklist.xml"></XML>

<TABLE ID="bookListTable" DATASRC="#dsoBookList" DATAPAGESIZE="10">
[...]
<TD><OBJECT id="myScr" TYPE="text/x-scriptlet" DATA="myscriptlet.html"
WIDTH=300 HEIGHT=200></OBJECT></TD>
[...]
</TABLE>


Joe Fawcett

2005-03-23, 6:41 pm

"Simon Niederberger" <simon@sincore.ch> wrote in message
news:OWcAvX6LFHA.3420@tk2msftngp13.phx.gbl...
>I would like to have a DHTML scriptlet within a tabular bound XML data
> island. For certain events, I'll need to read some values of the scriptlet
> and process them. As the tabular binding will multiply my OBJECT tag, I
> can't use the ID to access the scriptlet (ID would be non-unique!).
>
> Is there a work-around to find out which scriptlet (i.e. which row) actually
> fired the event?
>
> Which the code below, the onscriptletevent is fired, but I can't tell from
> which row!
>
> Thanks a lot
> Simon
>
> <SCRIPT LANGUAGE="JavaScript" FOR="myScr" EVENT="onscriptletevent(name,
> eventData)" >
> alert("The event that occurred in the scriptlet was " + name);
> </SCRIPT>
> [...]
>
> <XML ID="dsoBookList" SRC="booklist.xml"></XML>
>
> <TABLE ID="bookListTable" DATASRC="#dsoBookList" DATAPAGESIZE="10">
> [...]
> <TD><OBJECT id="myScr" TYPE="text/x-scriptlet" DATA="myscriptlet.html"
> WIDTH=300 HEIGHT=200></OBJECT></TD>
> [...]
> </TABLE>
>
>

I don't understand why you need multiple copies of the object? What is it doing?

--

Joe (MVP)


Simon Niederberger

2005-03-23, 6:41 pm

Example:

<Dossier>
<CreationType>0</CreationType>
<CreationDate>2005-01-04</CreationDate>
</Dossier>
<Dossier>
<CreationType>3</CreationType>
<CreationDate>2004-12-18</CreationDate>
</Dossier>
etc.

This XML is bound as an XML data island in my IE browser. However, for each
date (per dossier) I want to be able to display a MS forms calendar control.
I embedded the control (incl. button/image etc.) into a scriptlet. Now, this
scriptlet is displayed per XML row, i.e. multiple times simply because i'm
using tabular data binding.

hope this clarifies the issue, thanks a lot
simon

"Joe Fawcett" <joefawcett@newsgroups.nospam> wrote in message
news:OnxRX07LFHA.2136@TK2MSFTNGP14.phx.gbl...
> "Simon Niederberger" <simon@sincore.ch> wrote in message
> news:OWcAvX6LFHA.3420@tk2msftngp13.phx.gbl...
scriptlet[color=darkred]
actually[color=darkred]
from[color=darkred]
> I don't understand why you need multiple copies of the object? What is it

doing?
>
> --
>
> Joe (MVP)
>
>



Sponsored Links


Copyright 2003 - 2008 forum4designers.com  Software forum  Computer Hardware reviews