Results 1 to 12 of 12

Thread: IIS & Frames

  1. #1

    Thread Starter
    Fanatic Member coox's Avatar
    Join Date
    Oct 1999
    Posts
    550
    Can anyone tell me how (if?) I can catch a click in one frame and thence make another frame refresh/rewrite (whatever)?

    Also, is there some way in HTML to overide the font size where the user may have changed it (like when you hold ctrl and spin your mouse wheel)?
    Nick Cook
    VB6 (SP6)

  2. #2
    Black Cat JoshT's Avatar
    Join Date
    Nov 2000
    Location
    WNY, USA
    Posts
    4,032
    1. Provider you have given your frames names, you write the link like <a href="page.html" target="framename">Blah</a>.

    2. I believe CSS specs give precendence to the user's personal style sheet. It's a bad idea anyway, the user usually has good reason to override your style (bad eyesight, etc).
    Josh
    Get these: Mozilla Opera OpenBSD
    I have books for sale: "MCSD in a Nutshell" and "VB Distributed Exam Cram" - PM me for details. Will also trade for a decent ATX Pentium 2 MB/CPU/RAM combo.

  3. #3
    Frenzied Member monte96's Avatar
    Join Date
    Sep 2000
    Location
    Somewhere in AZ
    Posts
    1,379
    If you specify a specific size for fonts in a stylesheet or a style tag, it will prevent the ctrl+mouse wheel from changing the size..

    For instance, try it when posting and you'll see that the text inside the textarea is not effected. That is because of this line:

    Code:
    TEXTAREA  {BACKGROUND-COLOR: #cccccc; COLOR: #000000; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; FONT-SIZE: 12px}
    It locks it at a 12pt font.
    oOOo--oOOo
    __/\/\onte96
    oOOo--oOOo
    Senior Programmer/Analyst
    MCP
    [email protected]
    [email protected]


    Your results may vary.. some restrictions may apply.. pricing and participation may vary.. not available in all states.. professional driver closed course..quantities limited..

  4. #4

    Thread Starter
    Fanatic Member coox's Avatar
    Join Date
    Oct 1999
    Posts
    550
    I'm using frames, and I'm really looking to see if I can update a different frame to the one the user clicked in. Kind of like the WriteTemplate thing (or even Response.Write) but not back to the current frame.

    Thanks for all your help anyway...
    Nick Cook
    VB6 (SP6)

  5. #5
    Frenzied Member monte96's Avatar
    Join Date
    Sep 2000
    Location
    Somewhere in AZ
    Posts
    1,379
    Also, is there some way in HTML to overide the font size where the user may have changed it (like when you hold ctrl and spin your mouse wheel)?
    I was answering your 2nd question...

    JoshT already answered your first..
    oOOo--oOOo
    __/\/\onte96
    oOOo--oOOo
    Senior Programmer/Analyst
    MCP
    [email protected]
    [email protected]


    Your results may vary.. some restrictions may apply.. pricing and participation may vary.. not available in all states.. professional driver closed course..quantities limited..

  6. #6

    Thread Starter
    Fanatic Member coox's Avatar
    Join Date
    Oct 1999
    Posts
    550
    Actually, I didn't ask the original correctly, I realise now.

    What I actually want to do is, from an IIS application, write to any frame in a framset, and not just the one that the user last clicked in. Is this possible?
    Nick Cook
    VB6 (SP6)

  7. #7
    Lively Member
    Join Date
    Jan 2001
    Posts
    118

    this is what u are looking for!!!

    Main.htm
    <HTML>
    <FRAMESET COLS="20%,40%,40%">
    <FRAME NAME="MAIN" SRC="frame1.htm">
    <FRAME SRC="frame2.htm">
    <FRAME SRC="frame3.htm">
    </FRAMESET>
    </HTML>
    Frame1.htm
    <HTML>
    <HEAD>
    <SCRIPT Language="VBScript">
    Sub RefreshBtn_onClick
    If Text1.Value <> "" Then
    set win = top.frames(Text1.Value - 1)
    win.History.go 0
    End If
    End Sub
    </SCRIPT>
    </HEAD>

    <BODY>
    Enter the number of the frame to refresh.<BR/>
    Enter 2 for frame 2, 3 for frame 3.<BR/><BR/>
    <INPUT TYPE="Text" ID="Text1"><BR/>
    <BUTTON ID="RefreshBtn">Refresh</BUTTON>
    </BODY>
    </HTML>
    Frame2.htm
    <HTML>
    <SCRIPT LANGUAGE="VBScript">
    Sub Window_onLoad
    MsgBox "Frame 2 is loading"
    End Sub

    Sub Window_onUnload
    MsgBox "Frame 2 is unloading"
    End Sub
    </SCRIPT>
    <BODY>
    <H1>This is Frame 2</H1>
    </BODY>
    </HTML>
    Frame3.htm
    <HTML>
    <SCRIPT LANGUAGE="VBScript">
    Sub Window_onLoad
    MsgBox "Frame 3 is loading"
    End Sub

    Sub Window_onUnload
    MsgBox "Frame 3 is unloading"
    End Sub
    </SCRIPT>
    <BODY>
    <H1>This is Frame 3</H1>
    </BODY>
    </HTML>

  8. #8
    Frenzied Member monte96's Avatar
    Join Date
    Sep 2000
    Location
    Somewhere in AZ
    Posts
    1,379
    You won't be able to do Response.Writes from one frame to the other because once the page is displayed, the server side processing is complete and everything is client side, but by giving each frame a unique name, you can update or change the page that is displayed in it. Which, again, JoshT showed above.
    oOOo--oOOo
    __/\/\onte96
    oOOo--oOOo
    Senior Programmer/Analyst
    MCP
    [email protected]
    [email protected]


    Your results may vary.. some restrictions may apply.. pricing and participation may vary.. not available in all states.. professional driver closed course..quantities limited..

  9. #9

    Thread Starter
    Fanatic Member coox's Avatar
    Join Date
    Oct 1999
    Posts
    550
    Thanks for all your help everyone.

    I've got one more question - Sundance, the code you posted works great, but I've got nested frames and can't seem to address the frame I want from the inner lot.

    Is it something to do with "Top", and could you please explain what the Top keyword means in VBScript?
    Last edited by coox; May 3rd, 2001 at 10:54 AM.
    Nick Cook
    VB6 (SP6)

  10. #10
    Lively Member
    Join Date
    Jan 2001
    Posts
    118
    I know my stuff , but I can't explain myself to people sometimes. SO excuse me if I don't make sense.

    You can get a handel on any frame in explorer. The TOP command is (like I understand) used for if you got you page inside a FRAMESET. Then you can use the TOP to access the other frames.

    I Use the SET command allot with the frames. Example.

    Set X = document.frames("IFrameName")

    Then you can access all the properties and vbscript/javascript functions of the Iframename document.If you want the code I can Email or post it to you.

    Post your code and I will see if I can be more specific and help you.

    Is all your frames named different?

    I hope I helped a little.

  11. #11

    Thread Starter
    Fanatic Member coox's Avatar
    Join Date
    Oct 1999
    Posts
    550
    Hi Sundance. Thanks again for replying.

    I have to say I hain't got a clue about that IFrameName thing.

    Anyway, I've attached an example of what I'm trying to do - launch the one called OuterFrames.htm first. I'd like (for example) to update one of the inner frames (say TopRight) when the user clicks the button, but I can't figure out how to refer to it.

    See what you can do anyway...
    Attached Files Attached Files
    Nick Cook
    VB6 (SP6)

  12. #12
    Lively Member
    Join Date
    Jan 2001
    Posts
    118
    Here is the answer. In Bottomright.html just this code (created an extra button named btn_test.

    Sub btn_test_onclick()

    Dim w

    set w = parent.frames("TOPRIGHT")

    w.location.href = "changed.htm"

    End Sub

    And voila (sp?).

    My pleasure...

    I will mail the files / upload but this is the only change.

Posting Permissions

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



Click Here to Expand Forum to Full Width