PDA

View Full Version : response.write in a specific lineH


flyclassic
10-21-2002, 05:37 AM
how to i use response.write to write to a specific line let's say in
the drop down list section of a html file
eg.

<select name="xslfileid" onclick="previewxmlthumbnails(selection.xslfileid.value)">
<option value="aflooding.xsl">Normal Style(No Pics)
<option value="afloodingtmp2.xsl">Normal Style 2
<option value="afloodingtmp3.xsl">Special Style
<option value="plaintext.xsl">Plain Text Only
</select>

i would like to add another line of <option value="nostyle.xsl">Nostyle
into above </select>@using response.write.
any idea how?

glenngv
10-21-2002, 06:16 AM
don't cross-post!
http://www.codingforums.com/showthread.php?threadid=8385

<select name="xslfileid" onclick="previewxmlthumbnails(selection.xslfileid.value)">
<%
response.write "<option value='nostyle.xsl'>Nostyle</select>"
%>
<option value="aflooding.xsl">Normal Style(No Pics)
<option value="afloodingtmp2.xsl">Normal Style 2
<option value="afloodingtmp3.xsl">Special Style
<option value="plaintext.xsl">Plain Text Only
</select>

but since what you are writing is not dynamic, why not just insert that line directly?

<select name="xslfileid" onclick="previewxmlthumbnails(selection.xslfileid.value)">
<option value="nostyle.xsl">Nostyle</option>
<option value="aflooding.xsl">Normal Style(No Pics)
<option value="afloodingtmp2.xsl">Normal Style 2
<option value="afloodingtmp3.xsl">Special Style
<option value="plaintext.xsl">Plain Text Only
</select>

flyclassic
10-21-2002, 09:15 AM
sorry about the cross post...really sorry.....
yah, i actually intended to make it dynamic so that when certain condition then i have to add the line..

glenngv
10-21-2002, 09:53 AM
<select name="xslfileid" onclick="previewxmlthumbnails(selection.xslfileid.value)">
<%
if condition then
response.write "<option value='nostyle.xsl'>Nostyle</select>"
end if
%>
<option value="aflooding.xsl">Normal Style(No Pics)
<option value="afloodingtmp2.xsl">Normal Style 2
<option value="afloodingtmp3.xsl">Special Style
<option value="plaintext.xsl">Plain Text Only
</select>