Solved

Easy Question

Posted on 2002-04-03
10
219 Views
Last Modified: 2010-04-09
I have a script in my webpage that goes a little like this

<script language="JavaScript">
<!---
       function pass() {
          var password = prompt("Password required for this area:", "")
          var location = password + ".html";
          this.location.href = location;
       }
// --->
</script>

i put it on a link that i create, and it opens a location if the correct name is used

is there a way i can use this in frames

instead of calling this.location

calling the main fram as the place to open the location

thanks
0
Comment
Question by:mofoworking
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 5
10 Comments
 
LVL 30

Expert Comment

by:third
ID: 6917198

<script language="JavaScript">
<!---
      function pass() {
         var password = prompt("Password required for this area:", "")
         var loc = password + ".html";
         parent.location.href = loc;
      }
// --->
</script>

0
 
LVL 2

Author Comment

by:mofoworking
ID: 6917207
Close,
i knew it was going to be easy,
but it opens it up in the entire window

i just want it in a fram called Main

thanks third

0
 
LVL 30

Expert Comment

by:third
ID: 6917209
your last question seem to be aging,

11/21/00 25 Databases...i know i know UnlockedQ

is it ok if you settle this first?

for your convinience, here is the link

http://www.experts-exchange.com/jsp/qShow.jsp?ta=dbgen&qid=11929958
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 30

Expert Comment

by:third
ID: 6917213
then just use

main.location.href


<script language="JavaScript">
<!---
     function pass() {
        var password = prompt("Password required for this area:", "")
        var loc = password + ".html";
        main.location.href = loc;
     }
// --->
</script>

0
 
LVL 30

Accepted Solution

by:
third earned 100 total points
ID: 6917217
or parent.frames['main'].location.href
0
 
LVL 2

Author Comment

by:mofoworking
ID: 6917222
Close,
i knew it was going to be easy,
but it opens it up in the entire window

i just want it in a fram called Main

thanks third

0
 
LVL 2

Author Comment

by:mofoworking
ID: 6917230
that does not seems to work

is says, main undefined

but i definatley call one of my frames "Main"

do i need to put the script in the fram where the link is
or the framset

0
 
LVL 2

Author Comment

by:mofoworking
ID: 6917231
that does not seems to work

is says, main undefined

but i definatley call one of my frames "Main"

do i need to put the script in the fram where the link is
or the framset

0
 
LVL 2

Author Comment

by:mofoworking
ID: 6917239
BINGO

thanks heaps for this

sorry about the old question

0
 
LVL 30

Expert Comment

by:third
ID: 6917243
no problem... just keep it up!
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article explains how to prepare an HTML email signature template file containing dynamic placeholders for users' Azure AD data. Furthermore, it explains how to use this file to remotely set up a department-wide email signature policy in Office …
Is your Office 365 signature not working the way you want it to? Are signature updates taking up too much of your time? Let's run through the most common problems that an IT administrator can encounter when dealing with Office 365 email signatures.
The viewer will receive an overview of the basics of CSS showing inline styles. In the head tags set up your style tags: (CODE) Reference the nav tag and set your properties.: (CODE) Set the reference for the UL element and styles for it to ensu…
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

624 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question