Article View: comp.lang.java.databases
Article #77<OBJECT> Data Binding and Javascript
From: Laphan
Date: Fri, 31 Dec 1999 00:00
Date: Fri, 31 Dec 1999 00:00
80 lines
4342 bytes
4342 bytes
Dear All
Firstly, apologies for the cross-post but I think this query is a real hard
nut and I don't know which category it really falls into.
I have racked my brains on this for 5 days and just can't get round it. I
am trying to link IE's <OBJECT> data binding function (with a comma delim
text file) to 2 Javascript functions and an <INPUT> text box.
What I want to achieve is to link this data binding feature so that it
creates a simple table listing of all the text file's data, but gives the
same line by line data parameters to the Javascript and the <INPUT> box. In
effect, the javascript creates 2 buttons that add the data to an array and
the <INPUT> box just increments or decrements the number of items.
The Javascript works fine in a laborious way, eg create the 2 instances for
each line I want, however the task I am trying to achieve is to make this
auto so that the instances are created automatically for the no. of lines in
the text file.
I have enclosed the code below and have put <<<<< so that I can break it
down for you - these are not in the code:
<TABLE cellPadding=3 dataSrc=#tdcBooks id=Data width="100%"> <<<<<
tdcbooks is just the link to the <OBJECT>
<THEAD>
<TR>
<TD>ISBN</TD>
<TD>Book</TD>
<TD>Author</TD></TR></THEAD>
<TBODY>
<TR>
<TD width=30>
<SPAN dataFld=ISBN></SPAN> <<< this comes through great on the HTML page
</TD>
<TD width=30>
<SPAN dataFld=Book></SPAN> <<< this comes through great on the HTML page
</TD>
<TD width=30>
<SPAN dataFld=Author></SPAN> <<< this comes through great on the HTML page
</TD>
<TD width="50">
<a name="addbox"
href="javascript:Loc_additem('ISBN','Book','Author','other.html')">
<img src="gifs/add.gif">
</a>
<<< the above is the add to bit of the Javascript. Like I said doing this
long hand so that ISBN is left as above and is just text it works perfect.
But I want to make the above dynamic so it picks up the ISBN for each line
of data. This is the same for book and author, other.html is not necessary.
The <IMG> is purely for the user to click.
<a name="subbox"
href="javascript:Loc_subitem('ISBN','Book','Author','other.html')">
<img src="gifs/sub.gif">
</a>
<<< this is exactly the same as above and needs exactly the same parameters
as above, but simply takes away in the Javascript.
<input type="text" name=ISBN size="2" maxlength="2">
<<< this input box needs to be dynamic. It is nearly there in that it
creates a physical box for each line (as does the <IMG>'s), but each input
box needs to have a unique NAME which it takes from the dynamic ISBN.
I have spoken to some top guru's (or so they say) that say this can't be
done. I really need to find a way round this as external ASP and the like
is not practical for the task in question. If anybody wishes to send direct
email responses, please email laphan@ukonline.co.uk.
Many, many thanks for any assistance you can give.
Regards
Laphan
PS: Happy new year where ever you are!!!!
Technical Details
Message-ID:
<84ic23$105i$1@quince.news.easynet.net>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10845c,e977e0816e76a82e,start X-Google-Attributes: gid10845c,public X-Google-Thread: 115acd,e977e0816e76a82e,start X-Google-Attributes: gid115acd,public X-Google-Thread: 103569,e977e0816e76a82e,start X-Google-Attributes: gid103569,public X-Google-Thread: 10cf74,e977e0816e76a82e,start X-Google-Attributes: gid10cf74,public X-Google-Thread: 10b4e4,e977e0816e76a82e,start X-Google-Attributes: gid10b4e4,public X-Google-Thread: 107d46,e977e0816e76a82e,start X-Google-Attributes: gid107d46,public From: "Laphan" <laphan@ukonline.co.uk> Subject: <OBJECT> Data Binding and Javascript Date: 1999/12/31 Message-ID: <84ic23$105i$1@quince.news.easynet.net> X-Deja-AN: 566856973 X-Priority: 3 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2314.1300 X-Complaints-To: abuse@easynet.net X-Trace: quince.news.easynet.net 946647939 32946 195.40.204.66 (31 Dec 1999 13:45:39 GMT) Organization: [posted via Easynet Ltd] X-MSMail-Priority: Normal Reply-To: "Laphan" <laphan@ukonline.co.uk> NNTP-Posting-Date: 31 Dec 1999 13:45:39 GMT Newsgroups: comp.lang.java.databases,dk.edb.internet.webdesign,microsoft.public.access.dataaccess.pages,microsoft.public.access.externaldata,microsoft.public.data.ado,microsoft.public.excel.datamap