Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Refresh navbar in frames on submit

Status
Not open for further replies.

tsonnenl

Programmer
Apr 8, 2002
65
US
Hi-
I am using frames (*ducking*) and need to know the best way, JS or otherwise, to refresh a dynamic navbar when the user submits a name and password in a separate frame. The info would of course have to still be submitted to the next page. Any ideas?

Thanks in advance.
Todd
 
I'll mention that using frames is a pain in the a$$.

then I'll tell you that you can reference windows and frames using JS. Try the JS forum you'll get plenty of interesting posts. But it is best to have code to show.

<script>
parent.frameName.history.go(0)
</script>

something like that. My memory is rather rusty with frames since I stopped using them about 5 years ago. ;)

But sincerly. Dropping support for frames (NS4 too) is a good thing.
Gary Haran
 
Please provide evidence that support for frames is being dropped. I do not think it is true.
 
Hi there,

With JavaScript, you can also refresh 2 frames with one click. The code would like something like:
function switchFrames()
{
parent.frame1.location='1.htm'
parent.frame2.location='2.htm'
}

Regarding support of frames, I think that Gary is rigth because the body who defined web standards, W3C, wants to drop it (it's not supported in xhtml 1.1. anymore)

I hope this helps.

Cheers,

xso
 
Hi xutopia, xso,

It seems that we went through this in a previous thread.

Framesets are in the XHTML 1.1 standards.
Look under The XHTML 1.1 Document Type
And then Structure Module

It seems that even in the HTML standard, (as opposed to the XHTML standard), the “frameset” type has always been separate from either “transitional” “strict” or “loose”.

Regardless of what ones views may be about framesets might be, a frameset is not really much different from any set of pages. The individual pages themselves do not know that they are part of a frameset and the only difference is that there is one small page, the frameset page, that calls the individual pages. A framset arrangement could be simulated without the frameset page at all in most cases.

Personally I couldn't give a rat's a$$ about whether other people choose to use frames or not but if you are convinced that support for frames is being dropped, then I wish you would provide some evidence as a lot of the work I am doing now requires frames out of necessity.
 
tsonnenl
To answer your question I think you just need something like:

<a href=&quot;newnav.htm&quot; target=&quot;nav&quot;
onClick='window.self.location=&quot;nextpage.htm&quot;'>whatever</a>

HTH,
Clive
 
Hi CliveC and xutopia,

Thanks for the info! Actually, I think I did not express myself correctly (sorry for my rocky English ;->). As far as I know (I checked in the specs), frames are not allowed if you use an xhtml strict (1.0 or 1.1) dtd or xhtml transitional (1.0) dtd. Of course, you may still use them with xhtml frameset dtd (1.0). However, xhtml transitional and framset have been dropped from xhtml 1.1 (at least, that's what I know).

On the other hand, the document you sent us is about modularization for xhtml, which means adding dtds to extend xhtml. This could of course include frames (and most certainly will). This is my understanding of the W3C standards but please, correct me if I'm wrong.

I hope this clarifies a bit my previous post. I would be more than happy to continue this discussion with you, as web standards are one of my favourite topics. ;->

Cheers,

xso
 
Hi xso,

So where are you from?

Perhaps the reason that framsets have always been separate from &quot;transitional&quot; and &quot;strict&quot; is because you need to know it is a frameset in order to validate it. For example the body tag would be invalid (except between noframe tags).
If that is true, frameset would have to be differentiated from strict. Do you see what I mean?


Cheers,
Clive
 
CliveC,

I didn't say that support for frames is going out the window. I just said that frames are a big cause of problems when creating a site. That being an opinion I can't give you evidence for that. It's like me saying I love my girlfriend and you asking me to prove it. What am I to do?

I can give you reasons why you shouldn't use frames that are end user related however :

- go to a site that uses frames, navigate a little while and then bookmark.
- go to a site that uses a navigation frame on the left and a content page on the right. Click a link on the left and right away click the print button at the top of your browser pane.

And I can give you reasons why a developper shouldn't use frames :

- having to deal with target=option
- in JS having to deal with frames hierarchy (check in the JS forum. I just answered questions pertaining to frame problems today)

Now this is evidence backing my opinion but not proof that support for frames is dropping on the web.

I agree that frames have their purpose but because they are mixed opinions on the web regarding frames it is best to not use them at all.


Here are a few articles regarding frames. What is funny is that any sites talking about frames mention somewhere that they are not liked by lots of people.

Another old article is Jakob Nielsen's alertbox for december 1996. Granted it is really old but some of what he says still stands.


I hope these ressources will come in handy for those who are interested Jakob Nielsen was one of the first highly respected celebrities of the web. Worked for Sun and other big high tech firms.

Hope this clears my point of view.

Cheers.
Gary Haran
 
Hi CliveC,

Yes it make sense indeed and it might explain why they have a special dtd for it. I'll make a search and try to see if I can find something useful.

By the way, I'm half Ukrainian, half Belgian and I live in Germany ;->

Cheers,

xso
 
Hi xutopia,

What browser are you using?

In this rapid evolving technology, I don't think anybody would want to be quoted on what they said in 1996.

It may interest you to know that Jakob Nielsen now runs a company called, Frames_r_us.com.

(just kidding :)).

Seriously though, and if you are into analogies, to tell me that you don't like frames is like saying you don't like carrots (ask me if I care). However it is quite another thing to say that carrots are bad for everyone and soon they will no longer be a food option.

If I thought you had any interest in seeing the awesome potential of frames in web programming, I would gladly explain why most of the objections to them are specious, and may do so anyway.

Cheers,
Clive

 
Hi mate,

I just had to jump in with my opinion!! [wink]

Personally I really despise frames unless they are used on a intranet etc, where they do not need to be optimised and spidered by engines.

The engine that I run has so many problems when it hits frames that are not properly used.. I am not saying that this is the fault of frames, but too many people use them incorrectly..

Also, if you have a huge page with loads of important keywords and only the main framset page is being spidered correctly then it is a total waste.. You can avoid this by making a noframes page but then what is the point of having frames in the first place??

Also, what really annoys me is when I click on a link in a search engine and end up in a page with no navbars etc, because it is supposed to be in a frameset..

As I said, this is my personal opinion only..[wink]

Hope this helps Wullie

 
Hi there,

I would say I agree with Wullie's post. Frames are not bad in themselves. There are quite some clever uses of it. Of course, there are limitations, but you can overcome most of them with JavaScript.

Of course, there are too many examples of improper use of frames. And as xutopia mentioned in a previous post, it sometimes very painful to navigate sites with frames.

Cheers,

xso
 
Examples of specious arguments:

Argument:
The engine that I run has so many problems when it hits frames that are not properly used.. I am not saying that this is the fault of frames, but too many people use them incorrectly.

Comment:
What on earth does how other people incorrectly use frames have to do with how you might use them?

Argument:
Also, if you have a huge page with loads of important keywords and only the main framset page is being spidered correctly then it is a total waste.. You can avoid this by making a noframes page but then what is the point of having frames in the first place??

Comment:
The noframes tag could simply contain a link to the important page. Any meta tags describing the keywords from the important page could be placed in the frameset page.

All IMO of course [pipe]
 
Examples of specious arguments:

Opinions mate, there is a difference..

The noframes tag could simply contain a link to the important page.

What happens when someone hits that page from an engine?

Any meta tags describing the keywords from the important page could be placed in the frameset page.

That could in fact be seen as trying to spam the engine..

Hope this helps Wullie

 
&quot;That could in fact be seen as trying to spam the engine..&quot;

I meant instead of in the important page. Putting them in both places probably creates the problem of search engines finding pages outside of the context of their frameset in the first place.

An opinion can contain a specious argument.
 
A humorous note. Xutopia who wrote the 2nd post, giving rise to the other posts, actually uses a frameset in the given link to his website. See
Wullie
Hope my post did not offend you. You are the well deserved &quot;top expert&quot; of this forum.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top