My onload gives message that the function is not a member

Discussion in 'ASP .Net' started by Cal Who, Jun 3, 2010.

  1. Cal Who

    Cal Who Guest

    <%@ Page Language="VB" MasterPageFile="~/Main.master"
    AutoEventWireup="false" CodeFile="SecondChurchDedication.aspx.vb"
    Inherits="History_SecondChurchDedication" title="Untitled Page" %>

    <asp:Content ID="Content8" ContentPlaceHolderID="BottomImageCPH"
    Runat="Server">

    <center>

    <iframe id="DocumentsFrame" runat="server" src="SecondChurchDedication.pdf"
    onload="setWidthHeight(this);">Your browser does not support
    iframes.</iframe>

    <br /></center>

    </asp:Content>

    setWidthHeight is definetly defined in the master file head but when I run
    this I get the message that it is not a meneber.

    What goes after the onload, Javascript ot VB. I thought Javascript but the
    runat server and the language=vb makes me wonder.



    What am I doing wrong?
    Cal Who, Jun 3, 2010
    #1
    1. Advertising

  2. Cal Who

    Cubaman Guest

    On Jun 3, 2:38 am, " Cal Who" <> wrote:
    > <%@ Page Language="VB" MasterPageFile="~/Main.master"
    > AutoEventWireup="false" CodeFile="SecondChurchDedication.aspx.vb"
    > Inherits="History_SecondChurchDedication" title="Untitled Page" %>
    >
    > <asp:Content ID="Content8" ContentPlaceHolderID="BottomImageCPH"
    > Runat="Server">
    >
    > <center>
    >
    > <iframe id="DocumentsFrame" runat="server" src="SecondChurchDedication.pdf"
    > onload="setWidthHeight(this);">Your browser does not support
    > iframes.</iframe>
    >
    > <br /></center>
    >
    > </asp:Content>
    >
    > setWidthHeight is definetly defined in the master file head but when I run
    > this I get the message that it is not a meneber.
    >
    > What goes after the onload, Javascript ot VB. I thought Javascript but the
    > runat server and the language=vb makes me wonder.
    >
    > What am I doing wrong?


    Look at your page html source to confirm that your js file has been
    load. Also try to call your js function from address bar, like:
    javascript:setWidthHeight(this); Also try with:
    onLoad="javascript:setWidthHeight(this);". At the very end, you can
    try with venkman, a free javascript debugger for firefox.
    Best regards.
    Cubaman, Jun 7, 2010
    #2
    1. Advertising

  3. Cal Who

    Cal Who Guest

    "Cubaman" <> wrote in message
    news:...
    On Jun 3, 2:38 am, " Cal Who" <> wrote:
    > <%@ Page Language="VB" MasterPageFile="~/Main.master"
    > AutoEventWireup="false" CodeFile="SecondChurchDedication.aspx.vb"
    > Inherits="History_SecondChurchDedication" title="Untitled Page" %>
    >
    > <asp:Content ID="Content8" ContentPlaceHolderID="BottomImageCPH"
    > Runat="Server">
    >
    > <center>
    >
    > <iframe id="DocumentsFrame" runat="server"
    > src="SecondChurchDedication.pdf"
    > onload="setWidthHeight(this);">Your browser does not support
    > iframes.</iframe>
    >
    > <br /></center>
    >
    > </asp:Content>
    >
    > setWidthHeight is definetly defined in the master file head but when I run
    > this I get the message that it is not a meneber.
    >
    > What goes after the onload, Javascript ot VB. I thought Javascript but the
    > runat server and the language=vb makes me wonder.
    >
    > What am I doing wrong?


    Look at your page html source to confirm that your js file has been
    load. Also try to call your js function from address bar, like:
    javascript:setWidthHeight(this); Also try with:
    onLoad="javascript:setWidthHeight(this);". At the very end, you can
    try with venkman, a free javascript debugger for firefox.
    Best regards.


    Thanks for replying. I must have missed them last time but now I see there
    are three errors (four if I include your javascript).

    They all point to the <iFrame line.

    I wonder about using "this" as an argument. Is that OK? I see so many
    functions where they use
    document.getElementById on the argument where they could have passed "this"
    and not had to call that routine.


    Also I tried adding "javascript:" but that just added error 6 shown below

    I can't run it because of the errors so I can't do most of what you
    suggested.

    Thanks again

    Error 6 'javascript' is not a member of
    'ASP.history_secondchurchdedication_aspx'. ...
    Error 7 Name 'setWidthHeight' is not declared....
    Error 8 Name 'this' is not declared. ...
    Error 9 Character is not valid. ...
    Cal Who, Jun 7, 2010
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Fabio R.
    Replies:
    0
    Views:
    777
    Fabio R.
    Mar 25, 2005
  2. Tom
    Replies:
    1
    Views:
    178
    Ken Cox [Microsoft MVP]
    Jun 28, 2004
  3. David Otton

    window.onload and body.onload differences

    David Otton, Nov 4, 2004, in forum: Javascript
    Replies:
    2
    Views:
    532
    Martin Honnen
    Nov 4, 2004
  4. Replies:
    5
    Views:
    251
    Thomas 'PointedEars' Lahn
    May 15, 2005
  5. marco

    onload -->* no onload

    marco, Jun 22, 2006, in forum: Javascript
    Replies:
    7
    Views:
    191
    marco
    Jun 24, 2006
Loading...

Share This Page