Click here to Skip to main content
13,446,770 members (44,406 online)
Rate this:
Please Sign up or sign in to vote.
See more:
the problem is the iframe not accessible for example:if you have a button inside a frame it will be not active
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="student_information.aspx.cs" Inherits="Student_inpector.student.student_information" %>

<!DOCTYPE html>

<html xmlns="">
<head runat="server">
        iframe {
            width: 100%;
            border: none;
            height: 300px;

        #header {
            width: 100%;
            height: 100px;
            -webkit-box-shadow: 1px 1px 3px 2px #262626;
            box-shadow: 1px 1px 3px 2px #262626;
            border-radius: 4px;
            background: rgba(62, 62, 62, 0.59);

        body {
            background: url(../images/the_book_by_consigntooblivion-d3dc7b9.jpg);
            -moz-background-size: cover;
            -o-background-size: cover;
            -webkit-background-size: cover;
            background-size: cover;

        .lbl {
            -webkit-text-shadow: 1px 1px 3px #191919;
            text-shadow: 1px 1px 3px #191919;
            font-size: x-large;
            width: 100%;
            height: 100%;
            position: absolute;
            top: 5%;
            left: 1%;

        .lnkbtn {
            text-decoration: none;
            font-size: x-large;
            color: #3e3e3e;
            position: absolute;
            right: 2%;
            top: 10%;

            .lnkbtn:hover {
                color: #4b4b4b;
                -webkit-text-shadow: 1px 1px 3px #191919;
                text-shadow: 1px 1px 3px #191919;
    <link rel="stylesheet" href="../jquery-ui-themes-1.10.2/themes/humanity/jquery-ui.min.css" />
    <form id="form1" runat="server">
        <div id="header">
                <asp:Label ID="Label1" CssClass="lbl" runat="server" Text=""></asp:Label>
            <asp:LinkButton ID="LinkButton1" CssClass="lnkbtn" runat="server" OnClick="LinkButton1_Click">Logout</asp:LinkButton>
        <br />
        <div id="accordion">
            <p>Parent information</p>
                <iframe id="ifrm1" runat="server" src="s_parentinformation.aspx"></iframe>
            <p>Student information</p>
                <iframe id="ifrm2" src="s_studentinformation.aspx"></iframe>
                <iframe id="ifrm3" src="s_mark.aspx"></iframe>
                <iframe id="ifrm4" src="s_notes.aspx"></iframe>
                <iframe id="ifrm5" src="s_attendance.aspx"></iframe>
                <iframe id="ifrm6" src="s_fees.aspx"></iframe>
    <script src="../jquery-ui-1.10.2.custom/js/jquery-1.9.1.js"></script>
    <script src="../jquery-ui-1.10.2.custom/js/jquery-ui-1.10.2.custom.min.js"></script>
            collapsible: true,
            active: false,
Posted 21-Apr-13 23:14pm
Karthik Harve 22-Apr-13 5:28am
if the button inside iframe (inside the screen associated with IFrame), then we have to check that screen which is associated with iframe. verify in that screen.
amr mustafa 22-Apr-13 5:39am
I don't know how to do it..plz help me

1 solution

Rate this: bad
Please Sign up or sign in to vote.

Solution 1

Assume your iFrame's id is "targetFrame" and the function you want to call is targetFunction():

NOTE: You can also access the frame using window.frames instead of document.getElementById.
BUT - You can't use "window.frames" if your IFRAME was created programmatically, only if it is declared in the HTML page source


This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy |
Web03 | 2.8.180318.2 | Last Updated 22 Apr 2013
Copyright © CodeProject, 1999-2018
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100