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: MozillaOperaOpenBSD
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.
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..
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.
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..
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?
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>
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..
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?
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.
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.