🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: comp.lang.java.databases
1 messages
1 total messages Started by Laphan Fri, 31 Dec 1999 00:00
<OBJECT> Data Binding and Javascript
#77
Author: Laphan
Date: Fri, 31 Dec 1999 00:00
80 lines
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!!!!
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads