Wrox Home  
Search P2P Archive for: Go

  Return to Index  

asp_web_howto thread: Frames


Message #1 by "Abhilash" <abhilashbr@y...> on Sat, 20 Jan 2001 12:18:43 +0530
This is a multi-part message in MIME format.



------=_NextPart_000_0010_01C082DB.2132CD00

Content-Type: text/plain;

	charset="iso-8859-1"

Content-Transfer-Encoding: quoted-printable



Hi Everybody



How could u change the source file of a frame page dynamically using 

client side javascript

This is the frameset i am using. i want to change the 'src' of 'main' 

frame. 'sDestination' is the url to another page



<HTML>

<SCRIPT>

  function splitQ()

{

  window.frames("main").location.href =3D sDestination;

}

</SCRIPT>

<FRAMESET framespacing=3D"0" border=3D"false" frameborder=3D"0" 

rows=3D"93,*" onLoad=3D"splitQ();">

  <FRAME name=3D"banner" scrolling=3D"no" noresize target=3D"contents" 

src=3D"top.htm" marginwidth=3D"0" marginheight=3D"0">

  <FRAMESET cols=3D"129,*">

    <FRAME name=3D"contents" target=3D"main" src=3D"left.htm" 

scrolling=3D"no" marginwidth=3D"0" marginheight=3D"0">

    <FRAME name=3D"main" src=3D"" scrolling=3D"auto" marginwidth=3D"0" 

marginheight=3D"0" target=3D"_self">

  </FRAMESET>

  <NOFRAMES>

  <BODY topmargin=3D"0" leftmargin=3D"0">

<P>This page uses frames, but your browser doesn't support

  them.</P>

</BODY>

</NOFRAMES>

</FRAMESET>

</HTML>



This works in IE but not in NS. Pls help me or direct me



Regds,

Abhilash






Message #2 by Gregory_Griffiths@c... on Mon, 22 Jan 2001 09:11:53 +0000
replace your script with :

 

<script language="Javascript">

function splitQ()

{

    document.main.location=sDestination;

}

</script>



-----Original Message-----

From: abhilashbr@y... [mailto:abhilashbr@y...]

Sent: 20 January 2001 06:49

To: asp_web_howto@p...

Cc: abhilashbr@y...

Subject: [asp_web_howto] Frames









Hi Everybody

 

How could u change the source file of a frame page dynamically using 

client side javascript

This is the frameset i am using. i want to change the 'src' of 'main' 

frame. 'sDestination' is the url to another page

 

<HTML>

<SCRIPT>

  function splitQ()



  window.frames("main").location.href = sDestination; 



</SCRIPT>

<FRAMESET framespacing="0" border="false" frameborder="0" rows="93,*" 

onLoad="splitQ();">

  <FRAME name="banner" scrolling="no" noresize target="contents" 

src="top.htm" marginwidth="0" marginheight="0">

  <FRAMESET cols="129,*">

    <FRAME name="contents" target="main" src="left.htm" scrolling="no" 

marginwidth="0" marginheight="0">

    <FRAME name="main" src="" scrolling="auto" marginwidth="0" 

marginheight="0" target="_self">

  </FRAMESET>

  <NOFRAMES>

  <BODY topmargin="0" leftmargin="0">

<P>This page uses frames, but your browser doesn't support

  them.</P>

</BODY>

</NOFRAMES>

</FRAMESET>

</HTML>



This works in IE but not in NS. Pls help me or direct me

 

Regds,

Abhilash












  Return to Index