Use IFRAME (the drop-down list in) to pay the value through JScript

Source: Internet
Author: User

<TD class = "nR-black" Height = "20" bgcolor = "# ffffff" bordercolordark = "# ffffff" width = "37%">
<Input type = "hidden" name = "hydmvalue" value = "">
<Input type = "text" name = "hydmnum" value = "" size = "3" onkeypress = "If (event. keycode = 13 | event. keycode = 10) hmqq_gethydm () "topmargin = 0 marginheight = 1>
<IFRAME name = "ifrmcm" src = ".. /include/loadhydm. ASP "style =" height: 20px; width: 170px; "marginheight = 2 scrolling =" no "frameborder = 0> </iframe>
</TD>

 

=====

Loadhydm. asp

=====

<%
Hydm = trim (Request ("hydm "))
%>

<HTML>
<Head>
<Title> Industry Code </title>
<Meta http-equiv = "Content-Type" content = "text/html; charset = gb2312"> <SCRIPT src = "http://www.cnblogs.com/inc/valid.js">
</SCRIPT> <LINK rel = "stylesheet" href = "http://www.cnblogs.com/css/button.css" type = "text/CSS">
</Head>

<Body topmargin = 2 leftmargin = 0>

<Script language = "JavaScript">
<! --
Function setsele (){
VaR m;
M1_1_1_doc ument. All. shydm. selectedindex;
Parent.doc ument. thisform. hydmvalue. value = Document. All. shydm. Options [M]. value;
Parent.doc ument. thisform. hydmnum. value = Document. All. shydm. Options [M]. value;

}
// -->
</SCRIPT>

<% 'Response. Write "<script language = JavaScript> alert ('" & hydm & "') </SCRIPT>"
Set rs = server. Createobject ("ADODB. recordset ")
Strsql = "select * From ud_hydm order by Len (u_hydm), left (u_hydm, 1), left (u_hydm, 2), left (u_hydm, 3 )"
Rs. Open strsql, Conn, 1, 1

If Rs. recordcount> 0 then %>
<Select id = "shydm" name = "shydm" size = "1" style = "height: 20px; width: 485px" onchange = "setsele ()">
<Option selected value = "00"> YYY </option>
<% For I = 1 to Rs. recordcount %>
<Option value = "<% = trim (RS (" u_hydm ") %>" <% IF (TRIM (RS ("u_hydm") = hydm) Then response. write "selected" % >>< % = RS ("u_hymc") %> </option>
<% IF (TRIM (RS ("u_hydm") = hydm) Then %>
<Script language = "JavaScript">
<! --
Parent.doc ument. thisform. hydmvalue. value = "<% = hydm %>"
// -->
</SCRIPT>
<% End if
Rs. movenext
If Rs. EOF then
Exit
End if
Next %>
</SELECT>
<% Else %>
<Select name = "sshydm" size = "1" style = "height: 20px; width: 200px">
<Option value = "00"> TTT </option>
</SELECT>
<% End if
Rs. Close
Set rs = nothing
%>
<! -- # Include file = "disconn_db.asp" -->
</Body>
</Html>

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.