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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

response.write to a specific line??

Status
Not open for further replies.

flyclassic22

Technical User
Oct 1, 2002
54
SG
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=&quot;xslfileid&quot; onclick=&quot;previewxmlthumbnails(selection.xslfileid.value)&quot;>
<option value=&quot;aflooding.xsl&quot;>Normal Style(No Pics)
<option value=&quot;afloodingtmp2.xsl&quot;>Normal Style 2
<option value=&quot;afloodingtmp3.xsl&quot;>Special Style
<option value=&quot;plaintext.xsl&quot;>Plain Text Only
</select>

i would like to add another line of <option value=&quot;nostyle.xsl&quot;>Nostyle
into above </select>@using response.write.
any idea how?
 
As simple as...

<option value=&quot;plaintext.xsl&quot;><%=your_variable%> Saturday 12.00
im6.gif
im2.gif
im2.gif
20.00
im5.gif
im4.gif
im7.gif
3.00am
im8.gif
Sunday [img http
 
let's say if i would like a submit button when i press it, then it will response.write that line? do you know how?
 
That would be a client-side action. ASP only processes on the server before the page is sent to the client browser. You would have to use a client side script in order to do this, for example:
Code:
function addOption(txt,vlu,elem){
   elem.options[elem.options.count] = new Option(txt,vlu);
}
You would call this by passing it a string with the text, a string with a value, and a reference to the select (this).
It would then add a new option to the select box with your specified strings.

-Tarwn --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---
With enough resources, time, and coffee, anything is possible.
 
Oops, should have been:
elem.options[elem.options.length] = new Option(txt,vlu);


sorry --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---
With enough resources, time, and coffee, anything is possible.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top