/    Sign up×
Community /Pin to ProfileBookmark

Form input text not visible?

I was hoping someone could shed some light on an issue I am having. I am displaying a hidden layer (div) on a click event which is populated with a list of anchor tags to choose. On the click event I am trying to set the value of a input field of type=text. The value is being set ( I can see it occurring using alerts), but I cannot see it? I am testing and building using IE6. Here is the related code. Any help or insights would be appreciated?

function LoadUserType(inType)
{
if (document.getdata.uType)
{
document.getdata.uType.value = inType;
hideNode(‘UserTypeList’);
}
}

<div id=’UserTypeList’ class=’drpDisplay’>
<a href=’#’ onclick=”hideNode(‘UserTypeList’);”>
<img src=’images/close_10x10.gif’ alt=” Close Me “>
</a>
<table>
<% for y=2 to 4 %>
<tr><td>
<a href=’#’ class=’drpDisplayData’ onClick=”LoadUserType(‘<%=User_Types(y)%>’);”>&nbsp;<%=User_Types(y)%></a>
</td></tr>
<% next %>
</table>
</div>

to post a comment
JavaScript

3 Comments(s)

Copy linkTweet thisAlerts:
@bathurst_guySep 13.2005 — well not everything is here, where is uType? thats where the value is being sent to
Copy linkTweet thisAlerts:
@Daniel_EganauthorSep 13.2005 — I cut and paste a little to small.

<tr>

<td class="TabArea_RowsText">User Type : </td>

<td class="TabArea_RowsInputs">

<input id='UserType' name='uType' type='text' size='5' maxlength='10'><img src="imagesDownArrow.gif" align="absmiddle" border="1" onClick="showNodeBlock('UserTypeList');" alt="Choose a Usertype">

<div id='UserTypeList' class='drpDisplay'>

<a href='#' onclick="hideNode('UserTypeList');">

<img src='images/close_10x10.gif' alt=" Close Me ">

</a> <table> <% for y=2 to 4 %> <tr><td> <a href='#' class='drpDisplayData' onClick="LoadUserType('<%=User_Types(y)%>');">&nbsp;<%=User_Types(y)%></a></td></tr> <% next %> </table> </div> </td> </tr>
Copy linkTweet thisAlerts:
@Daniel_EganauthorSep 13.2005 — Resolved the issue by accessing the element directly

document.getElementById('UserType').value = inType;
×

Success!

Help @Daniel_Egan 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.17,
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,
)...