Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP General > parent.window problem with select list

Reply
Thread Tools

parent.window problem with select list

 
 
John Peach
Guest
Posts: n/a
 
      07-05-2007
From an intranet sit i am running a function from a onchange event:

<script language='javascript'>
function update(a)
{
var url="dropdownupdate.asp";
url=url + "?id=" + a.name;
url=url + "&val=" + a.value

window.open(url)
}
<script>

that opens this asp page. the page will not update the parent though, any
ideas why ? The parent field 'product is cleared of it's default vallue but
it is not replaced with the new value

<%
Dim cn
Dim sql
Dim rs
Dim id
Dim vl

set cn=Server.CreateObject("ADODB.Connection")
cn.Open "Provider=SQLOLEDB.1;Password=glencoe;Persist Security
Info=True;User ID=qadmin;Initial Catalog=UserInfo;Data Source=TLGUKSP17"
set RS =Server.CreateObject("ADODB.Recordset")

id =request.querystring ("id")
vl = request.querystring("val")

if id="Range" then
sql ="SELECT Product FROM Menlosoft WHERE (Range = N'" & vl & "') GROUP BY
Product"
rs.open sql,cn
end if

counter=0

response.write "<script language='javascript'>"
response.write " var selectbox=window.opener.document.form2.Product;"

do while not rs.eof

response.write "selectbox.options[" & counter & "]=new Option('" &
rs.fields(0) & "','" & rs.fields(0) & "');"
response.write "selectbox.options[1]=new Option('help','help');"
counter=counter+1
rs.movenext
loop

response.write "</script>"
rs.close
set rs=nothing

window.close()
%>

thanks in anticipation of assistance

John


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Select List transfer to another List with array richardsith Javascript 0 04-20-2012 09:10 PM
master select list changes contents of slave select lists Dan Thomas Ruby 0 02-02-2011 06:59 PM
to select random number from select list Pranjal Jain Ruby 3 04-10-2008 04:01 PM
Select List transfer to another List carrajo Javascript 5 02-17-2006 02:23 AM
select of select box will select multiple in another box palmiere Javascript 1 02-09-2004 01:11 PM



Advertisments