My onload gives message that the function is not a member

  • Thread starter Thread starter Cal Who
  • Start date Start date
C

Cal Who

<%@ 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?
 
<%@ 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.
 
<%@ 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. ...
 
Back
Top