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 8 of 8
  1. #1
    dmk
    dmk is offline
    New Coder
    Join Date
    Aug 2002
    Location
    Wisconsin, USA
    Posts
    54
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Arrow Open one page (in a brand new window) when another page loads

    When my users select one page (by hyperlink), I want them to be automatically taken to another page and that page must open in its own window -- not in one of the frames.

    This is what I found:

    <meta http-equiv="Refresh" content="1; URL=homedir/file.mrc">

    It works except I don't know how to set the target to a new window that opens.

    Thanks.

  • #2
    Regular Coder
    Join Date
    Jun 2002
    Location
    FL, USA
    Posts
    734
    Thanks
    0
    Thanked 0 Times in 0 Posts
    wouldn it be easeir just to set a link to it?

    like <a href="homedir/file.mrc" target="_new">Click here</a>



    Hope this helps,,,

    I dont think you are able to set the target for a refresh like that
    CYWebmaster.com - See why we dot com!!
    ACJavascripts.com - Cut & Paste Javascripts!
    SimplyProgram.com - Personal Blog

  • #3
    dmk
    dmk is offline
    New Coder
    Join Date
    Aug 2002
    Location
    Wisconsin, USA
    Posts
    54
    Thanks
    0
    Thanked 0 Times in 0 Posts
    This is what I'm doing: The user clicks a menu item hyperlink. A page opens that just says Please wait. In the header of that page I have this line of code:

    <meta http-equiv="Refresh" content="1; URL=homedir/file.mrc">

    That code causes the actual form (the object of the hyperlink) to automatically open. I had to go that way because it's the only way I could think of to get that form to open in a new window. The above code works beautifully except that the page opens in a frame and I must have it open in its own new window. Is there a "target" parameter I can use in that line of code?

    I can use a regular hyperlink if I have to, but I don't want the users to have to click a hyperlink on two different pages to finally get to the desired page. You see it all the time on the Internet -- how do they do that?

    Thanks.

  • #4
    Regular Coder
    Join Date
    Jun 2002
    Location
    FL, USA
    Posts
    734
    Thanks
    0
    Thanked 0 Times in 0 Posts
    what is the navigational script you are using can you post it?
    You might just be able to set the target on the script.

    Like i said,,, i dont think you can set the target like that on a refresh.. if im wrong someone please tell me.
    CYWebmaster.com - See why we dot com!!
    ACJavascripts.com - Cut & Paste Javascripts!
    SimplyProgram.com - Personal Blog

  • #5
    dmk
    dmk is offline
    New Coder
    Join Date
    Aug 2002
    Location
    Wisconsin, USA
    Posts
    54
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Thanks for looking at this. I'm open to any suggestions. One thing I can't change, however, is the way my drop-down menus work. This is the code in the head of the frame that holds the drop-down menus:
    ======================================
    <head>
    <script LANGUAGE="JavaScript">
    <!--
    function JumpToIt (list)
    {
    var selection = list.options[list.selectedIndex].value
    if (selection != "None") {
    parent.body.location.href = selection
    }
    list.selectedIndex=0
    }


    //-->
    =======================================
    This is the code of the actual drop-down menu (there are several in the frame):

    <form>
    <select WIDTH="1" onChange="JumpToIt(this)" size="1" name="Finance" style="font-family: Arial; font-size: 8pt; position: relative; float: left; width: 150">


    <option VALUE="http://dk_intranet/link_pg_finance_dept.htm" selected>Finance Department
    --->
    <option VALUE="http://dk_intranet/FinanceDept/BillCover.pdf">Bill Cover Ltr Instructions</option>
    <option VALUE="http://dk_intranet/FinanceDept/Work Assignmt.htm">Billing/Attorney Assignments</option>
    <option value="http://dk_intranet/NoCheck.htm">Check Request</option>
    <option VALUE="http://dk_intranet/FinanceDept/ExpenseRpt.xls">Expense Report</option>

    </select></form>

    </script>

    That script opens the linked files in another frame and that's always been fine. But I have an Excel spreadsheet (ExpenseRpt.xls) I'm linking to and if it opens in a frame, there are printing issues. If it opens in a new window, however, it prints fine.

    So I ran my link from the drop-down to a dummy sheet, wherein I have the refresh code that opens the actual spreadsheet. It opens in a frame, however, and, well, that was the problem to begin with. I don't want to change the code of my drop-down menu frame because everything else on it works great -- this one menu item is the exception.

    Any suggestions? Do you need to see anything else? Thanks.

    d

  • #6
    Regular Coder
    Join Date
    Jun 2002
    Location
    FL, USA
    Posts
    734
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Okay this is what i did,
    I changed the
    if(selection !="None")
    to
    if(selection !="NewWindow)

    then i put in a else structure.. In the option value for the Expense Report it put this <option value="NewWindow">

    So heres how it looks all together..

    ________________________

    <head>
    <script LANGUAGE="JavaScript">
    <!--
    function JumpToIt (list)
    {
    var selection = list.options[list.selectedIndex].value
    if (selection != "NewWindow") {
    parent.body.location.href = selection
    }else{
    window.open("http://dk_intranet/FinanceDept/ExpenseRpt.xls","def")
    }
    list.selectedIndex=0
    }


    //-->

    </script>


    <form>
    <select WIDTH="1" onChange="JumpToIt(this)" size="1" name="Finance" style="font-family: Arial; font-size: 8pt; position: relative; float: left; width: 150">


    <option VALUE="http://dk_intranet/link_pg_finance_dept.htm" selected>Finance Department
    --->
    <option VALUE="http://dk_intranet/FinanceDept/BillCover.pdf">Bill Cover Ltr Instructions</option>
    <option VALUE="http://dk_intranet/FinanceDept/Work Assignmt.htm">Billing/Attorney Assignments</option>
    <option value="http://dk_intranet/NoCheck.htm">Check Request</option>
    <option VALUE="NewWindow">Expense Report</option>

    </select></form>


    -_____________________

    Hope this works for ya
    CYWebmaster.com - See why we dot com!!
    ACJavascripts.com - Cut & Paste Javascripts!
    SimplyProgram.com - Personal Blog

  • #7
    dmk
    dmk is offline
    New Coder
    Join Date
    Aug 2002
    Location
    Wisconsin, USA
    Posts
    54
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Smile


    It's wonderful! Thank you SO much! Everything is perfect.

    d

  • #8
    Regular Coder
    Join Date
    Jun 2002
    Location
    FL, USA
    Posts
    734
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Your most welcome

    Happy Scripting
    CYWebmaster.com - See why we dot com!!
    ACJavascripts.com - Cut & Paste Javascripts!
    SimplyProgram.com - Personal Blog


  •  

    Posting Permissions

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