Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 5 of 5
  1. #1
    New to the CF scene
    Join Date
    Nov 2010
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    html + javascript (changing frames from form)

    CHANGE XX to TT
    CHANGE zero in c0m to O becoming com
    CHANGE YYY to WWW

    hxxps://yyy.yousendit.c0m/download/dklxb2VIcVg1aWF4dnc9PQ

    first an example of what im trying to do:
    when logging in to a forum, you enter your info at the top right corner. thts where the login info txt boxes are usually located. under these you'll find a menu bar. if you're logged in, the menu commands/items arent the same as when you're not logged in. example of logged in is search. example of not being logged in is register. anyways under the menu there's the forum itself. u no, sections and topics. the table basically.
    this is wht im trying to do. even if im doing it wrong plz indulge me I know that ppl dont use frames much anymore. but just go with it. It DOES help to no how to do something in different ways.

    Ok, assuming you setup my pages, press submit. All 3 frames SHOULD go to 1.php BUT what happens is that the lower two frames go to 1.php. the first frame doesnt. It's the frame that has the form which has the button. If i put the button outside the form and press submit, it works. all 3 frames change. so i'm guessing it's got to do with the form itself.

    How do I fix it?


    Thank you!!!!

  • #2
    New to the CF scene
    Join Date
    Nov 2010
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts
    69 views and no one'sbothered to reply? at least tell me the links arent working or something. seriously 69 views and no one can help me??????? whts up with that.

  • #3
    Supreme Master coder! Old Pedant's Avatar
    Join Date
    Feb 2009
    Posts
    25,438
    Thanks
    75
    Thanked 4,372 Times in 4,337 Posts
    Sorry, but first of all you give us a link that isn't a link. So we have to muck with changing the url. And than all that url does is take us to a page where we can download a zip file. So you first of all make it hard to find the zip file and then you expect us to download it, unzip it (hoping it doesn't have a virus), and analyze your code.

    On top of that, you say the code is PHP. And not all of us use PHP (I certainly don't). So you make us wonder if the question even belongs in the JavaScript forum.

    Couldn't you just show us the page live, online? Or copy/paste the relevant fragments of code here?
    An optimist sees the glass as half full.
    A pessimist sees the glass as half empty.
    A realist drinks it no matter how much there is.

  • #4
    New to the CF scene
    Join Date
    Nov 2010
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts
    thank you! i thought pasting the ocde here but there are several pages and i didnt think any1 would bother pasting every piece on a diff html file
    i will get right on it. but ty. now tht i no whts wrong i can fix it here and in others as well.

  • #5
    New to the CF scene
    Join Date
    Nov 2010
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Here is the code

    Frameex5.htm
    Code:
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <title>Frames Example 5</title>
    </head>
    <frameset rows="20%,20%,80%">
     <frame src="logintable.php" name="top_frame" id="top_frame" />
     <frame src="menubar.php" name="middle_frame" id="middle_frame" />
     <!--<frame src="profileframe.php" name="bottom_frame" id="bottom_frame" />
    -->
    </frameset>
    </html>

    logintable.php
    Code:
    <html>
    <head>
    <title>login</title>
    <script language="JavaScript" type="text/javascript">
    function change2()
     {
    	 parent.top_frame.location="1.php";
     	 parent.middle_frame.location="1.php";
     }
    </script>
    </head>
    <body>
    <form name="log">
    <input name="go" type="submit" value="Submit" onclick="javascript:change2()"/>
    </form>
    </body>
    </html>
    1.php
    1

    so if u run this you'll see that the second row goes to 1.php but not the first one. this is wht im trying to solve. i hope this helps. ty.


  •  

    Posting Permissions

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