IFRAME application-IFRAME tag generated in the background

Source: Internet
Author: User
IFRAME is used for the application just completed, and the following is a record to be forgotten.
Requirement ( Program Personnel ):
1. The product query page (appitemsearch. aspx) sends a request: appitemintroduction. aspx? Itemid = xxx
2. Product Introduction page (appitemintroduction. aspx) queries the Link (itemintrodulink links field) of the corresponding XXX product introduction document from the itemintroductionlinks table in the Database Based on Itemid "XXX", and displays the content of this connection to appitemintroduction. on the ASPX page.
Note: According to Itemid, appitemintroduction. aspx reads not the content of the product introduction, but only the Link name. The product introduction document is placed on the server of different domains with this application. The product introduction document is an HTML or Word document.
Suppose: appitemintroduction. aspx has found the corresponding document URL in itemintroductionlinks Based on Itemid and saved it in the ls_redurl variable.
Idea: generate an IFRAME flag in appitemintroduction. aspx. The value of the variable ls_redurl is dynamically assigned to the src attribute of IFRAME.
Simple source code (VB.net) is as follows: Jstext =   " <SCRIPT> var child = Document. getelementbyid ('ifr1'); If (child! = NULL) {document. Body. removechild (child) ;}</SCRIPT> "
Jstext + =   " <IFRAME id = 'ifr1 'width = 90% Height = 90% src =' "   + Ls_redurl +   " '> </Iframe> "
Jstext + =   " <Div align = 'center'> <a href = '# 'onclick = 'javascript: window. Close ()'> close-close </a> </div> "
Try
Response. Write (jstext)
Catch Ex As Exception
Ls_errtext = Ex. Message +   " An error occurred while reading the product introduction document! "
Appgotoerrorpage. f_redirect ( Me , Ll_errcode, ls_errtext, " C " )
End   Try

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.