Results 1 to 5 of 5

Thread: Problem with Frames JavaScript and variables

  1. #1

    Thread Starter
    Hyperactive Member CaptainPinko's Avatar
    Join Date
    Jan 2001
    Location
    London, Ontario, Canada
    Posts
    332

    Angry Problem with Frames JavaScript and variables

    I don't feel like giving the why I need this but here it is:

    This works:
    Code:
    <html>
    
    <head>
    	<title>Knowledge Forum Project</title>
    	<script Language=JavaScript>
    		var strFrameCols = "10%,*"
    	</script>
    </head>
    
    <frameset rows = "10%,*,15%" border=0>
    	<frame name = "fraHeader" src = "http://www.altavista.com" scrolling=no>
    	<frameset cols = "10%,*">
    		<frame name = "fraSideNav" src = "Navig.htm">
    		<frame name = "fraMain" src = "" scrolling=yes>
    	</frameset>
    	<frame name = "fraBottNav" src = "Navig.htm" scrolling=auto>
    </frameset>
    </html>
    but when I replace "10%,*" with strFrameCols, which has the same value, the page screws up. WHY?

    Oh yeah I'm using IE 5.50 in WinME.
    "There are only two things that are infinite. The universe and human stupidity... and the universe I'm not sure about." - Einstein

    If you are programming in Java use www.NetBeans.org

  2. #2

    Thread Starter
    Hyperactive Member CaptainPinko's Avatar
    Join Date
    Jan 2001
    Location
    London, Ontario, Canada
    Posts
    332
    I'm also trying to access one variable from another frame. So that when I click on a button on one frame it would change the value of a variable that belongs to a page in a frame, is there anyway I could make the variable public maybe or something? Any ideas anyone....? PLZ!
    "There are only two things that are infinite. The universe and human stupidity... and the universe I'm not sure about." - Einstein

    If you are programming in Java use www.NetBeans.org

  3. #3
    Frenzied Member sebs's Avatar
    Join Date
    Sep 2000
    Location
    Aylmer,Qc
    Posts
    1,606
    how do you try to replace 10,*

  4. #4

    Thread Starter
    Hyperactive Member CaptainPinko's Avatar
    Join Date
    Jan 2001
    Location
    London, Ontario, Canada
    Posts
    332
    with a variable set to that value then cahnging the value fo that variable
    "There are only two things that are infinite. The universe and human stupidity... and the universe I'm not sure about." - Einstein

    If you are programming in Java use www.NetBeans.org

  5. #5
    Frenzied Member sebs's Avatar
    Join Date
    Sep 2000
    Location
    Aylmer,Qc
    Posts
    1,606
    i mean do you do:

    Code:
    <html>
    
    <head>
    	<title>Knowledge Forum Project</title>
    	<script Language=JavaScript>
    		var strFrameCols = "10%,*"
    	</script>
    </head>
    
    <frameset rows = "10%,*,15%" border=0>
    	<frame name = "fraHeader" src = "http://www.altavista.com" scrolling=no>
    <script Language=JavaScript>
    
    	document.write("<frameset cols = " +strFrameCols  + ">")
    </script>
    
    		<frame name = "fraSideNav" src = "Navig.htm">
    		<frame name = "fraMain" src = "" scrolling=yes>
    	</frameset>
    	<frame name = "fraBottNav" src = "Navig.htm" scrolling=auto>
    </frameset>
    </html>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width