/    Sign up×
Community /Pin to ProfileBookmark

Dynamic HTML – Yet another issue/question.

Hopefully this will be my last post for a while…

I create a dynamic table, and what I’m trying to do is change the text in one of the header cells when a person loses focus on a particular text box.

I’m attaching a txt file with how I created this table.

If you look closely in the text file, you will see a cell with the text of “Business Unit Name:” in cell position 1, and I want to dynamicall put in the name the user just keyed in a field from a different table using the onfocusout on an input field.

I can get the onfocusout, and read the input values no problem, but I haven’t been able to get the right syntax for changing that specific text in the cell with the name just keyed in.

Here’s what I dug up, but it’s obviously wrong…
var oTextNode = document.createTextNode(inpt_busname[0].value);
replacementPath = document.getElementById(‘KeyRelationshipSection’).getElementById(“KeyRelationshipMap”+j).getElementById(“th”).cells[2];
replacementPath.replaceNode(oTextNode);

Can anyone help me out here?
I would much appreciate it.
Cheers
Dan.

to post a comment
JavaScript

3 Comments(s)

Copy linkTweet thisAlerts:
@boy3696authorApr 15.2004 — Sorry, forgot to put the attachment on.

Here it is.

[upl-file uuid=843418f5-7115-4239-b4b7-5c3ddd3673ff size=3kB]postsample2.txt[/upl-file]
Copy linkTweet thisAlerts:
@boy3696authorApr 15.2004 — Hey Gang...

Sorry for bugging everyone again, but I truly am at my whits with this issue. I've been searching the net, trying different commands, and I just don't seem to be getting anywhere.

I've attached the html to this post.

If you take it and run it, you will see an add button in the upper left hand corner of the Parent Company Business Unit Profiles table. Click this button and you will see a new row added to this table, along with a new table in the Key Relationship Map (Decision Makers and Influencers).

Once this table appears, you will see a header cell with XXX in it. It is this cell I want to change dynamically.

The Business Unit Name field in the Parent table has a onfocusout event which is trying to change that XXX to what ever was typed in that text box.

Can someone please have another look and let me know what command I'm suppose to be using in the script function changeBusUnitNameOnKeyRelationshipMapTable.

Much appreciate a second look.

Cheers.

Dan.

[upl-file uuid=b6727ad9-fff9-4cdc-8882-26baabc6a8e3 size=22kB]postsample3.txt[/upl-file]
Copy linkTweet thisAlerts:
@boy3696authorApr 15.2004 — Well...

As usual, after I posted this message, I figured it out.

Attached is the working code which replacess the XXX with what ever the user keys into the business unit name.

Anyone can use any part of this code. I did put comments all over, but if I didn't put enough, let me know.

Thanks for listening sort of speak! ?

I'm glad this is all behind me now! hehehe

Cheers

Dan.

[upl-file uuid=3867343e-2110-45a0-bbc5-4c4d889b22d2 size=21kB]postsample3.txt[/upl-file]
×

Success!

Help @boy3696 spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 6.15,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @nearjob,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,
)...