Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Response.write problem

Status
Not open for further replies.

flyclassic22

Technical User
Oct 1, 2002
54
SG
I've this problem
i need to response.write(&quot; <input type=&quot;&quot;text&quot;&quot; name=&quot;&quot;input1&quot;&quot; value=&quot;&quot;<%=objdom.selectSingleNode(&quot;&quot;content/navi2&quot;&quot;).text%> &quot;&quot;> &quot;)


but i guess it can't work in my asp file as it has <% & %>

how do i solve this problem so that i can response.write
this line : <%=objdom.selectSingleNode(&quot;&quot;content/navi2&quot;&quot;).text%>
in ? in another words how do i response.write a ASP line?

can anyone know please help .? thank you very much..

Regards
Wilson
 
You could response.writ &amp;lt; for &lt; and &amp;gt; for &gt; that would take care of ASP resolution issues and HTML resoution issues
-Tarwn --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---
For my next trick I will pull a hat out of a rabbit (if you think thats bad you should see how the pigeon feels...) :p
 
there're 2 different ways in creating text field :

1.
Code:
response.write &quot;<input type='text' name='input1' value='&quot; & objdom.selectSingleNode(&quot;&quot;content/navi2&quot;&quot;).text &  &quot;' > &quot;)

2.
Code:
<input type=&quot;text&quot; name=&quot;input1&quot; value=&quot;<%=objdom.selectSingleNode(&quot;&quot;content/navi2&quot;&quot;).text%>&quot; >

Hope it helps.

:eek:)*JJ26*:eek:)
 
My mistake, I misunderstood, go with JJ26's post, for some reason I thought you wanted to actually output the tags, I'm going to bed now :p
Sorry,
-Tarwn --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---
For my next trick I will pull a hat out of a rabbit (if you think thats bad you should see how the pigeon feels...) :p
 
you see i need to insert that input box only under certain condition, thus i need to use asp response.write

however i tried using

response.write &quot;<input type='text' name='input1' value='&quot; & objdom.selectSingleNode(&quot;&quot;content/navi2&quot;&quot;).text & &quot;' > &quot;)

but i ended up creating a input text box with the text(objdom.selectSingleNode(&quot;&quot;content/navi2&quot;&quot;).text & &quot;') in the textarea. Actually i just want the value to set to a asp line.
coz u see if don't use response.write
<input type=&quot;text&quot; id=&quot;n2&quot; name=&quot;n2&quot; style=&quot;width: 200px;&quot; value=&quot;<%=objdom.selectSingleNode(&quot;content/navi2&quot;).text%>&quot;>

the =&quot;<%=objdom.selectSingleNode(&quot;content/navi2&quot;).text%> would not appear in the text box .


i mean its hard to explain, anyway thanks for the help...
 
If you write the code purely in ASP code (that means using
Code:
response.write &quot;  ........ &quot;
, then in your design view of this page .. you won't get any view of a text-field or drop down or button or any others.

but if you want to see the object when U haven't run the page, then you have to combine your HTML with ASP tag (my 2nd example).

uupppsss.... it seems i wrote 1 miss brachet near response.write ... try again.

Code:
response.write (&quot;<input type='text' name='input1' value='&quot; & objdom.selectSingleNode(&quot;&quot;content/navi2&quot;&quot;).text &  &quot;' > &quot;)

*JJ26* [peace]
 
nevermind, you don't get what i mean.. coz i tried out what you've told me before (knowing u missed out the brackets)
but i ended up creating a input text box with the text(objdom.selectSingleNode(&quot;&quot;content/navi2&quot;&quot;).text & &quot;') in the textarea.

by write, it would not have this to happen if i dun use response.write by simply using input
<input type=&quot;text&quot; id=&quot;n2&quot; name=&quot;n2&quot; style=&quot;width: 200px;&quot; value=&quot;<%=objdom.selectSingleNode(&quot;content/navi2&quot;).text%>&quot;>

it works and now the textarea hasn't got the =&quot;<%=objdom.selectSingleNode(&quot;content/navi2&quot;).text%>
as it is a asp line. However if i tried what you said, it will appear in that text area.

You see i need to use conditional statements to write the input line in instead of just using <input>, thus i need to use response.write.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top