/    Sign up×
Community /Pin to ProfileBookmark

TO create text box using vb script

Hi,
I am actually trying to extract elements of an xml document and put them into text boxes. But I am unable to do it . here is the code iam trying

<html>
<body>
<form>
<table>

<script type=”text/vbscript”>
i=1
txt=”<h1>Traversing the node tree</h1>”
document.write(txt)
set xmlDoc=CreateObject(“Microsoft.XMLDOM”)
xmlDoc.async=”false”
xmlDoc.load(“student.xml”)
for each x in xmlDoc.documentElement.childNodes
document.write(“<tr>”)
document.write(“<td>”)
document.write(“</td>”)
document.write(“</tr>”)
document.write(“<b>” & x.nodename & “</b>”)
document.write(“: “)
document.write(x.text)
document.write(“<br>”)

document.write(i)
i=i+1
next
</script>
</table>
</form>

</body>
</html>

This code works and it diplays the elements of the XML document as text on the page. I want that the nodename should be displayed as a value of a text box instead of just as text. so I am trying to create a text box and assign the value of nodename to that text box within the loop.but when i do that nothing comes up.

Cant we create a form and form elements within vbscript and assign values to those form eleements?

Can someone help?

Thanks,
vijaya

to post a comment
HTML

0Be the first to comment 😎

×

Success!

Help @vijji 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 5.20,
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: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

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

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...