I think you want an event handler for the input elements. Maybe
something like this? Instead of finding the column in the row above, I
just looked for the Nth price in the row above. That turned out to be
the most complicated part. The DOM defines a .rowIndex property for TR
elements but there is
On Sep 8, 10:38�pm, Jayzon <[EMAIL PROTECTED]> wrote:
> What I'd like to do: If an input filed is focussed, a price should be
> calculated. To keep the script as efficient as possible, I want to
> travel up from the input field to thecellabove it (i.e. one row up,
> second or thirdcellin that row)
Hi again!
I tried to get the script done by myself since no one unfortunately
answered my last entry - this is the bit of code i managed to get
done:
$(document).ready(function() {
$("input").change(function() {
var char_count = $(this).val;
Well, I just tried to get a starting point for the js file:
$(document).ready(function() {
var char_count = $("input").val;
var position = $("input:focus").parent().eq();
var price =
$("input:focus").parent().parent().children("pricing").
("td").eq
Hi Karl,
I'm not sure if you missed them, but I placed the input fields inside
the table, they are in tr.calc (the second row in the html in my first
post). It's just an tag. That input field would then be a
nice starting point, because it's placed directly under the span
including the price & i
Hi Markus,
Can you show us just a bit more of the HTML? It would help a great
deal if we could see where the input field is in relation to the spans
that you want to modify.
--Karl
Karl Swedberg
www.englishrules.com
www.learningjquery.com
On Sep 8, 2008, at 4:38 PM, Jayzon
Hi Rene!
Thanks for your answer - that would be a nice solution for one single
table. But I'd like to use the script for various tables on different
pages. That's why it is getting more complicated. If I could get this
done, other editors wouldn't have to care about IDs etc., but could
just wrap
put valid id's on all relevant tags, then reference by id?
On Mon, Sep 8, 2008 at 10:38 PM, Jayzon <[EMAIL PROTECTED]> wrote:
>
> Hi!
>
> I've got a table with multiple rows which I'd like to traverse in a
> special way - here's the html (for better reading, I just included two
> rows, these rows
8 matches
Mail list logo