473,387 Members | 1,569 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Can Javascript do this?

Hi all,

I have a web portal I have been developing where I have put together a
fairly nice navigation system using frames. There is a left hand
menu, a "main" frame and a header and footer frame. Everything url
that a user clicks is displayed in the "main frame". I want to give
my users a function called "New Window" in the footer frame that will
"break" the main frame and open whatever is there in a separate
window. This will allow me to add more interesting contents since I
will no longer be "trapping" people in my frame system.

The problem is I don't know Javascript and my venture is not funded so
I can't pay anything right now but I would be very grateful is someone
knows if there is an easy way to do this. I tried to explain this to
some programmer friends of mine but I'm not sure we communicated
because they recommended what seemed like a complimented and involved
approach.

At first I was trying to find a function that would "look at" whatever
iis in the main frame and open it in a new window. I've looked at
this issue again, and I think it can be solved a different way without
referirng to "frames" at all. Would it be possible to write a
function in Javascript that would "remember" whatever the last url
clicked, and then open this in a new window? I think this would do
the exact same thing. My portal is at the link below if you want to
see why I need this.

Thank you

Rob

http://www.caltrade.com
Jul 20 '05 #1
2 1961
In article <am********************************@4ax.com>,
ro****@caltrade.com enlightened us with...

To open the document that is in the main frame in the same window...

In the bottom frame...

<a href="#" onClick="top.location = top.frames
['mainFrameName'].document.location;return false;">click here to open
the document in this window</a>

where mainFrameName is the name you gave the main frame in the frameset.
If you want it in a new window...
<a href="#" onClick="window.open(top.frames
['mainFrameName'].document.location,'','');return false;">click here to
open the document in a new window</a>
--
~kaeli~
Every calendar's days are numbered.
http://www.ipwebdesign.net/wildAtHeart
http://www.ipwebdesign.net/kaelisSpace

Jul 20 '05 #2
Very close Kaeli,

This technique worked for a linked page in the main frame that I
created and was on my server- but it doesn't work for a link to an
outside site. The main reason I want this is so I can bring up
outside sites in my frames but give the user the option of breaking
out of the frame. With this code- when you click on a link to an
outside site, a copy of the footer frame appears in the main frame
windiow. But we are close!

Rob
On Fri, 21 Nov 2003 19:33:49 -0600, kaeli
<ti******@NOSPAM.comcast.net> wrote:
In article <am********************************@4ax.com>,
ro****@caltrade.com enlightened us with...

To open the document that is in the main frame in the same window...

In the bottom frame...

<a href="#" onClick="top.location = top.frames
['mainFrameName'].document.location;return false;">click here to open
the document in this window</a>

where mainFrameName is the name you gave the main frame in the frameset.
If you want it in a new window...
<a href="#" onClick="window.open(top.frames
['mainFrameName'].document.location,'','');return false;">click here to
open the document in a new window</a>


Jul 20 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: vishnu mahendra | last post by:
i am new to javascript. Can any one please tell me how to connect javascript to oracle in windows 98 using apache.where i could get information on connecting? thank you in advance, vishnu
31
by: manno | last post by:
Hi all, more or less just out of curiosity... I had a short 'discussion' about JavaScript in different borwsers. The other guy said that there's differeces in JavaScript accross browsers (I...
2
by: Bernhard Georg Enders | last post by:
After issuing the command (apache httpd.conf file) AddType application/x-httpd-php .php .htm .html any attempt to include javascript code <script src="file.js" type="text/javascript"></script>...
9
by: gleverett | last post by:
I have been searching the 'Net, and I can't find the right solution here. I am writing some PHP pages that utilize some Javascript. The script works in Mozilla/Netscape, but fails in IE. I don't...
13
by: John Smith | last post by:
I am using IE 6.0 from http://www.javaworld.com/javaworld/jw-07-1996/jw-07-javascript-p2.html I gather that "If you need to test a number of command lines, you can reduce the keystrokes by...
41
by: Rene Nyffenegger | last post by:
Hello everyone. I am not fluent in JavaScript, so I might overlook the obvious. But in all other programming languages that I know and that have associative arrays, or hashes, the elements in...
10
by: FAQ server | last post by:
----------------------------------------------------------------------- FAQ Topic - Which newsgroups deal with javascript? ----------------------------------------------------------------------- ...
12
by: pantagruel | last post by:
Hi, I'm thinking of making a WScript based JavaScript library, I can think of some specific non-browser specific scripting examples that should probably make it in, like Crockford's little...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.