...

View Full Version : html + javascript (changing frames from form)



wildheart25c
11-10-2010, 03:05 PM
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!!!!

wildheart25c
11-12-2010, 06:48 PM
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.

Old Pedant
11-12-2010, 08:43 PM
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?

wildheart25c
11-14-2010, 01:25 AM
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 :D
i will get right on it. but ty. now tht i no whts wrong i can fix it here and in others as well.

wildheart25c
11-14-2010, 01:30 PM
Here is the code

Frameex5.htm

<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

<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.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum