By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,868 Members | 1,974 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,868 IT Pros & Developers. It's quick & easy.

Get the parent value but cannot read in database

P: 1
I have problem to passing the value of list selection, from parent to the iframe using javascript. here the script :

Expand|Select|Wrap|Line Numbers
  1. parent.asp
  2.  
  3. <select name="name1" id="myid">
  4.     <% sql="SELECT * FROM SubKomp "
  5.        Set objRS = objConn.Execute(sql) 
  6.        while not objrs.eof
  7.     %>
  8. <option  value="<%response.Write(objrs.fields(0))%>">
  9.  <%response.Write(objrs.fields(1))%>
  10. </option>
  11.   <% objRS.MoveNext 
  12.      Wend %>
  13.   </select>
  14. <iframe name=content frameborder=0 width="920" height="350px" scrolling="no"></iframe>
  15.  
  16. child.asp
  17. <%
  18. dim sql 
  19. sql = "SELECT* FROM  perform where activt='<script>document.write(parent.kegiatan.value)</script>' 
  20.  
  21. Set objRS = objConn.Execute(sql) 
  22. ...
  23. ....
  24. response.Write(sql)
  25. %>
in the response.write(sql) return well value but the problem is the recordset return zero (either BOF and EOF is true...)
how can I fix it?
Oct 18 '12 #1
Share this Question
Share on Google+
1 Reply


Rabbit
Expert Mod 10K+
P: 12,370
I don't see any javascript. I see a query that filters for a string that contains something that looks like javascript. But there's no javascript code running.
Oct 18 '12 #2

Post your reply

Sign in to post your reply or Sign up for a free account.