<Iframe src="/URL" width="x" height="x" scrolling="[OPTION]" frameborder="x"></iframe> 
  src:文件的路径,既可是HTML文件,也可以是文本、ASP等; 
  width、height:"画中画"区域的宽与高; 
  scrolling:当SRC的指定的HTML文件在指定的区域不显不完时,滚动选项,如果设置为NO,则不出现滚动条;如为Auto:则自动出现滚动条;如为Yes,则显示; 
  FrameBorder:区域边框的宽度,为了让“画中画“与邻近的内容相融合,常设置为0。 



  比如: 



  <Iframe src="http://www.xyz.com/xyz"; width="250" height="200" scrolling="no" frameborder="0"></iframe>
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

  窗口与浮动帧之间的相互控制

  在脚本语言与对象层次中,包含Iframe的窗口我们称之为父窗体,而浮动帧则称为子窗体,弄清这两者的关系很重要,因为要在父窗体中访问子窗体或相反都必须清楚对象层次,才能通过程序来访问并控制窗体。 



  1、在父窗体中访问并控制子窗体中的对象 



  在父窗体中,Iframe即子窗体是document对象的一个子对象,可以直接在脚本中访问子窗体中的对象。 



  现在就有一个问题,即,我们怎样来控制这个Iframe,这里需要讲一下Iframe对象。当我们给这个标记设置了ID 属性后,就可通过文档对象模型DOM对Iframe所含的HTML进行一系列控制。 



  比如在example.htm里嵌入test.htm文件,并控制test.htm里一些标记对象: 
  <Iframe src="test.htm" id="test" width="250" height="200" scrolling="no" frameborder="0"></iframe> 
test.htm文件代码为: 
  <html> 
   <body> 
    <h1 id="myH1">hello,my boy</h1> 
   </body> 
  </html> 
  如我们要改变ID号为myH1的H1标记里的文字为hello,my dear,则可用: 
  document.myH1.innerText="hello,my dear"(其中,document可省) 
  在example.htm文件中,Iframe标记对象所指的子窗体与一般的DHTML对象模型一致,对对象访问控制方式一样,就不再赘述。 



  2、在子窗体中访问并控制父窗体中对象 



  在子窗体中我们可以通过其parent即父(双亲)对象来访问父窗口中的对象。 
  如example.htm: 
  <html> 
   <body onclick="alert(tt.myH1.innerHTML)"> 
    <Iframe name="tt" src="frame1.htm" width="250" height="200" scrolling="no" frameborder="0"></iframe> 
    <h1 id="myH2">hello,my wife</h1> 
   </body> 
  </html> 
  如果要在frame1.htm中访问ID号为myH2中的标题文字并将之改为"hello,my friend",我们就可以这样写: 
  parent.myH2.innerText="hello,my friend" 
  这里parent对象就代表当前窗体(example.htm所在窗体),要在子窗体中访问父窗体中的对象,无一例外都通过parent对象来进行。 



  Iframe虽然内嵌在另一个HTML文件中,但它保持相对的独立,是一个“独立王国“哟,在单一HTML中的特性同样适用于浮动帧中。 



  试想一下,通过Iframe标记,我们可将那些不变的内容以Iframe来表示,这样,不必重复写相同的内容,这有点象程序设计中的过程或函数,减省了多少繁琐的手工劳动!另外,至关重要的是,它使页面的修改更为可行,因为,不必因为版式的调整而修改每个页面,你只需修改一个父窗体的版式即可了。 



  要注意的是,Nestscape6.0之前版本不支持Iframe标记。 



  例子:

1:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
<iframe src="页面" width="宽度"  height="高度" align="排列可以是left或right,center" scrolling="是否有滚动条可以填no或yes"></iframe> 


<IFRAME frameBorder=0 frameSpacing=0 height=25 marginHeight=0 marginWidth=0 scrolling=no name=main src="/bgm/bgm.html" width=300></IFRAME>
 

2:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
用了iframe后 发现滚动条不漂亮 想用2个图片来代替↑↓ 



应该怎么实现呢?
回答:
用下列代码替换网页的<title>..</title> 
<SCRIPT LANGUAGE="javascript">
function scroll(n)
{temp=n;
Out1.scrollTop=Out1.scrollTop+temp;
if (temp==0) return;
setTimeout("scroll(temp)",80);
}
</SCRIPT>
<TABLE WIDTH="330">
<TR> 
<TD WIDTH="304" VALIGN="TOP" ROWSPAN="2" > 
<DIV ID=Out1 STYLE="width:100%; height:100;overflow: hidden ;border-style:dashed;border-width: 1px,1px,1px,1px;"> 
文字<BR> 文字<BR>
文字<BR> 
文字<BR>
文字
<BR>
<BR>
</DIV>
</TD>
<TD WIDTH="14" VALIGN="TOP"><IMG SRC="photo/up0605.gif" WIDTH="14" HEIGHT="20" onmouseover="scroll(-1)" onmouseout="scroll(0)" onmousedown="scroll(-3)" BORDER="0" ALT="按下鼠标速度会更快!"></TD>
</TR>
<TR>
<TD WIDTH="14" VALIGN="BOTTOM"><IMG SRC="photo/down0605.gif" onmouseover="scroll(1)" onmouseout="scroll(0)"  onmousedown="scroll(3)" BORDER="0" WIDTH="15" HEIGHT="21" ALT="按下鼠标速度会更快!"></TD>
</TR>
</TABLE>

:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
下面这段代码可以实现IFrame自适应高度,即随着页面的长度,自动适应以免除页面和IFrame同时出现滚动条。 
源代码如下

<script type="text/javascript">
//** iframe自动适应页面 **//

//输入你希望根据页面高度自动调整高度的iframe的名称的列表
//用逗号把每个iframe的ID分隔. 例如: ["myframe1", "myframe2"],可以只有一个窗体,则不用逗号。

//定义iframe的ID
var iframeids=["test"]

//如果用户的浏览器不支持iframe是否将iframe隐藏 yes 表示隐藏,no表示不隐藏
var iframehide="yes"

function dyniframesize() 
{
var dyniframe=new Array()
for (i=0; i<iframeids.length; i++)
{
if (document.getElementById)
{
//自动调整iframe高度
dyniframe[dyniframe.length] = document.getElementById(iframeids);
if (dyniframe && !window.opera)
{
dyniframe.style.display="block"
if (dyniframe.contentDocument && dyniframe.contentDocument.body.offsetHeight) //如果用户的浏览器是NetScape
dyniframe.height = dyniframe.contentDocument.body.offsetHeight; 
else if (dyniframe.Document && dyniframe.Document.body.scrollHeight) //如果用户的浏览器是IE
dyniframe.height = dyniframe.Document.body.scrollHeight;
}
}
//根据设定的参数来处理不支持iframe的浏览器的显示问题
if ((document.all || document.getElementById) && iframehide=="no")
{
var tempobj=document.all? document.all[iframeids] : document.getElementById(iframeids)
tempobj.style.display="block"
}
}
}

if (window.addEventListener)
window.addEventListener("load", dyniframesize, false)
else if (window.attachEvent)
window.attachEvent("onload", dyniframesize)
else
window.onload=dyniframesize
</script>


阅读全文 | 回复 | 引用通告
[html]html 使用小技巧
fxl 发表于 2005-5-18 18:03:00

01.让背景图不滚动
IE浏览器支持一个 Body 属性 bgproperties,它可以让背景不滚动: 
〈Body Background="图片文件" bgproperties="fixed"〉 

02.让你的网页无法另存为
<noscript><iframe src="/*>";</iframe></noscript> 

03.让IFRAME框架内的文档的背景透明
<iframe src="about:<body style='background:transparent'>" allowtransparency></iframe>

04.禁止右键:
<body oncontextmenu="return false" ondragstart="return false" onselectstart ="return false" onselect="document.selection.empty()" oncopy="document.selection.empty()" onbeforecopy="return false"onmouseup="document.selection.empty()"> 

05.进入页面后立即自动刷新?
<meta http-equiv="refresh" content="120;url=http://www.XYZ.com/XYZ">
http://www.XYZ.com/XYZ,这是你自己的网址。

06.打开窗口即最大化
<script language="JavaScript"> 
<!-- Begin 
self.moveTo(0,0)
self.resizeTo(screen.availWidth,screen.availHeight)
// End --> 
</script>

07.能隐藏IFRAME的滚动条吗?我知道的三种方法:
1. 设置iframe scrolling="no"
2. 被包含页body应用overflow:hidden 即在被包含页中应用15.如何控制横向和纵向滚动条的显隐?
3. 被包含页的body标签加scroll="no"

08.加入背景音乐
<bgsound src="mid/windblue[1].mid" loop="-1"> 只适用于IE

<embed src="music.mid" autostart="true" loop="true" hidden="true"> 对Netscape ,IE 都适用

09.嵌入网页
<iframe name="tt" src="/01a.html" width="450" height="287" scrolling="Auto" frameborder="0"></iframe>

10.跳转
<meta http-equiv="refresh" content="3;URL=list.htm">

11.滚动
<MARQUEE direction=up height=146 onmouseout=start() onmouseover=stop() scrollAmount=4></marquee>

12.细线分隔线
<hr noshade size=0 color=#C0C0C0>

13.过度方式
<meta http-equiv="Page-Exit" content="revealTrans(Duration=3,Transition=5)">
Duration的值为网页动态过渡的时间,单位为秒。
Transition是过渡方式,它的值为0到23,分别对应24种过渡方式。如下表:
0 盒状收缩 1 盒状放射 2 圆形收缩 3 圆形放射 4 由下往上
5 由上往下 6 从左至右 7 从右至左 8 垂直百叶窗 9 水平百叶窗
10 水平格状百叶窗 11垂直格状百叶窗 12 随意溶解 13从左右两端向中间展开
14 从中间向左右两端展开 15 从上下两端向中间展开
16 从中间向上下两端展开 17 从右上角向左下角展开
18 从右下角向左上角展开 19 从左上角向右下角展开
20 从左下角向右上角展开 21 水平线状展开
22 垂直线状展开 23 随机产生一种过渡方式


14.加入注释的格式是:    
〈!-[注释内容…]--〉

15.如何控制横向和纵向滚动条的显隐?
<body style="overflow-y:hidden"> 去掉x轴
<body style="overflow-x:hidden"> 去掉y轴
<body scroll="no">不显。

16.定制浏览器地址栏前的小图标:
A:在网页的〈head〉〈/head〉间加入以下语句:
〈link rel="shortcuticon" href="http://…/icon.ico"〉
即可。其中 icon.ico 为 16x16 的图标文件,颜色不要超过 16 色。

17.怎样在网页中加入 E-mail 链接并显示预定的主题? 
〈A href="mailto:Name@Your.net?subject=主题"〉……〈/a〉 

18.定义本网页关键字,可以在〈Head〉〈/Head〉中加入如下代码:   
〈meta name="Keywords" content="china,enterprise,business,net"〉    
Content 中所包含的就是关键字,你可以自行设置。    
这里有个技巧,你可以重复某一个单词,这样可以提高自己网站的排行位置,如: 
〈meta name="Keywords" content="china,china,china,china"〉 这个关键字对于Google搜索无效。

19.添加到收藏夹:
〈a href="javascript :window.external.addFavorite('http://链接','说明');"〉添加到收藏夹〈/a〉

20.设为首页:
〈a href=# onclick=this.style.behavior='url(#default#homepage)';this.setHomePage('http://链接');〉设为首页〈/a〉

21.把滚动条放在浏览器窗口的左边
A:在 <body> 中加 dir=RTL,即 <body dir=RTL>。

阅读全文 | 回复 | 引用通告
iframe 控制 scroll
fxl 发表于 2005-5-18 17:47:00

8.如何使用浮动帧--iframe
 
1.页内帧IFRAME其实很简单,因为DREAMWE***ER没有这个插入功能所以不为人所知.
 
2.看名字就可以看出.IFRAME其实就是帧FRAME.只不过它可以以IFRAME的形式插入到页面的任何位置,它的属性跟FRAME一样,你可以到帧的面板上查看其属性.
 
3.插入时我都有用手工写入代码:代码如下:
<iframe src="/sample.html" name="myiframe" scrolling=auto width=250 height=200 frameborder=0 marginwidth=0 marginheight=0>Type error message for Netscape 4 and older browsers here.</iframe>
SRC是指明这个帧所需调用的页面名称,NAME值可有可无但如果你需要调用这个IFRAME的窗口就非写不可了.SCROLLING的属性规定是否需要滚动条,可以是NO.
 
4.如果不用IFRAME自已的滚动条,你可以用以下代码很简单地在其它地方控制它的左右或上下移动。(资料来源DARKVN
左右移动:
<img src="/coolweb_images/scroll_left.gif" onMouseOver="ww=setInterval('myiframe.scrollBy(-2,0)',1)" onMouseOut="clearInterval(ww)" width="19" height="16" alt="左移">
<img src="/coolweb_images/scroll_right.gif" width="19" height="16" onMouseOver="ww=setInterval('myiframe.scrollBy(2,0)',1)" onMouseOut="clearInterval(ww)" alt="右移">

上下移动:
<img src="/coolweb_images/scroll_left.gif" onMouseOver="ww=setInterval('myiframe.scrollBy(0,2)',1)" onMouseOut="clearInterval(ww)" width="19" height="16" alt="下移">
<img src="/coolweb_images/scroll_right.gif" width="19" height="16" onMouseOver="ww=setInterval('myiframe.scrollBy(0,-2)',1)" onMouseOut="clearInterval(ww)" alt="上移">
上下移动到底:
onClick="myiframe.scroll(0,0)"onClick="myiframe.scroll(0,30000)"
 
5.如果需要在这个帧里调用别的页面,用TARGET指向它。如: target="myiframe"

阅读全文 | 回复 | 引用通告
[linux]Linux 修改mac地址
fxl 发表于 2005-5-15 11:13:00

需要用 #ifconfig eth0 down 先把网卡禁用
再用ifconfig eth0 hw ether 1234567890ab
这样就可以改成功了.要想永久改就这样在/etc/rc.d/rc.local里加上
ifconfig eth0 down
ifconfig eth0 hw ether 1234567890ab
ifconfig eth0 up


阅读全文 | 回复 | 引用通告
[linux]du 命令查看目录大小
fxl 发表于 2005-5-15 0:34:00

 

  du -sh directory

 


阅读全文 | 回复 | 引用通告
[linux]slackware  xdmcp 连接 kdm解决方案
fxl 发表于 2005-5-13 21:34:00

1.切换到root用户
2. # cd /opt/kde/share/config/kdm/
3.修改    Xaccess
      “#*    # any host can get a login window”--> “*    # any host can get a    login window”
4. 修改Xservers为可写  Chmod 744 Xservers
5. 修改 Xservers
        “:0 local /usr/X11R6/bin/X” --> “#:0 local /usr/X11R6/bin/X” 

6. 修改kdmrc中的Enable选项改为true

7. 在Xaccess中增加 LISTEN 0.0.0.0

 After some testing I found that the Listen directive was missing in the
Xaccess file. Upgrading didn't overwrite the old one. Add:

LISTEN 0.0.0.0

to force xdm to listen on ipv4 socket. No need to recompile xdm or get
ipv6 working.


阅读全文 | 回复 | 引用通告
[linux]ssh  for  xwindows
fxl 发表于 2005-5-13 11:53:00

Windows xp下运行X Window Server,显示linux server上X client的图形输出,并通过ssh对X Window的转发实现。
1.在Linux Server中对sshd进行配置:/etc/ssh/sshd_config文件中的X11Foward改为yes,并kill -HUP sshd_pid,重启sshd服务
2.配置xp下的X Window Server,将启动模式改为passive,并启动。
3.配置xp下的ssh客户端,打开X11 Foward选项,并登陆Linux Server。
4.在ssh客户端运行xclient程序,将可以看到其在本地xp机器上的图形输出。
参考了:tldp网站上的XDMCP Howto文档。


阅读全文 | 回复 | 引用通告
[linux]xmanager 详解
fxl 发表于 2005-5-13 11:49:00

If you cannot find the solution for your problems here, please visit our Xmanager Forum where you may find the solution. Otherwise, please post your question.


When I connect to UNIX by XDMCP, the CDE session hangs.

XDMCP connection fails for Linux. How do I configure my Linux box?

I try to connect to SUN Solaris using XDMCP, but I get the error message: "XDMCP Connection failed..."

I'm in the local network inside a NAT system. How can I connect to the remote host?

How can I set the firewall port mapping?

I'm inside a firewall using IP masquerading. How can I connect to external Linux/Unix hosts?
How can I run a remote X application on my PC with a dynamic IP address?

How can I use Xmanager through SSH?

When I open an xterm window, some characters are displayed incorrectly on the screen. Some (not all) capital letters looks like a small dot.

I've lost my product key. Where can I find it?

The Backspace key does not work in xterm from RedHat 7 host.

How can I configure firewall settings in Windows XP?

Colors are not displayed correctly when I use 256-color CAD applications.

Gnome terminal fails to open in RedHat 7.3.

Does Xmanager support Windows or Citrix terminal server?



1. When I connect to UNIX by XDMCP, the CDE session hangs.
1. I cannot see the login window.
If you cannot see the login window, you need additional fonts for the host. You can download and install the fonts in your Unix server or you can set up a font server.

To run font server in host:

Run "xfs&[Enter]"
Run "fsinfo -server host_IP_address:7100"
To configure Xmanager:

Start Xconfig in Xmanager folder.
Select [Font Directory] tab
Add Font Server
Save and run Xmanager
Also, one of the following reasons might prevent CDE connection to be made:

The Unix server is not located in the same subnet with your PC.
Your PC has multiple IP addresses.
Name server has an invalid name-to-ip or ip-to-name entry for your PC. Check the forward and reverse lookup tables.
See the /var/dt/Xerrors file for more detailed information.
2. The CDE login window shows up. After login, the session hangs or is terminated.

The $HOME/.dtprofile might have a line that prevents a successful login. You need to try to comment all commands out in the file. Also, remove the following lines in your login scripts.:

export DISPLAY=:0.0
or
setenv DISPLAY :0.0
For more detailed reasons, please see $HOME/.dt/errorlog.





2. XDMCP connection fails for Linux. How do I configure my Linux box?
How to configure Linux XDMCP(KDE/GNOME) settings for Xmanager

Affected Files

For runlevel: /etc/inittab
For GDM: /etc/X11/gdm/gdm.conf
For KDM: /etc/X11/xdm/xdm-config
/etc/X11/xdm/Xaccess
/etc/X11/xdm/kdmrc
/usr/share/kdm/kdmrc
/usr/share/config/kdm/kdmrc
/etc/opt/kde2/share/config/kdm/kdmrc
For Firewall: /etc/sysconfig/ipchains

Step 1. Change runlevel to enable gdm or kdm.

Open /etc/inittab file.
Change the runlevel to 5 as following:

id:5:initdefault:
Step 2. GDM configuration (When the Linux is using gdm)

Open /etc/X11/gdm/gdm.conf file.
Go to the [xdmcp]section.
Set the value of "Enable" option to "1".
Step 3. KDM configuration (When the Linux is using kdm)

Open /etc/X11/xdm/xdm-config file.
Comment out "requestPort" option as following:
DisplayManager.requestPort: 0
==>
!DisplayManager.requestPort: 0
Open /etc/X11/xdm/Xaccess file.
Remove the initial "#" character for the following line:
#* #any host can get a login window
==>
* #any host can get a login window
Open /etc/X11/xdm/kdmrc,
/usr/share/config/kdm/kdmrc or
/etc/opt/kde2/share/config/kdm/kdmrc file.
Change the value of "Enable" option to "true".
Step 4. Firewall configuration (If the firewall has been configured)

Open /etc/sysconfig/ipchains file.
Add the following lines at the top of the file:

-A input -p udp -s 0/0 -d 0/0 177 -j ACCEPT
-A input -p tcp -s 0/0 -d 0/0 telnet -j ACCEPT
-A input -p tcp -s 0/0 -d 0/0 ssh -j ACCEPT
-A input -p tcp -s 0/0 -d 0/0 login -j ACCEPT
-A input -p tcp -s 0/0 -d 0/0 exec -j ACCEPT
-A input -p tcp -s 0/0 -d 0/0 shell -j ACCEPT
-A input -p tcp -s 0/0 -d 0/0 7100 -j ACCEPT
Step 5. Restart your Linux to activate the changes.







3. I try to connect to SUN Solaris using XDMCP, but I get the error message: "XDMCP Connection failed..."
In order to use XDMCP connection, the remote Sun server should be ready to accept xdmcp query.
You can do it in the following way.

login as a root
enable CDE login when system boot
$ /usr/dt/bin/dtconfig -e [enter]
reboot
If you want to disable the CDE setting, do the following:
$ /usr/dt/bin/dtconfig -d [enter]







4. I'm in the local network inside a NAT system. How can I connect to the remote host?
To run a remote xterm program, your IP address should be a public one that can be reached from the remote host because a remote xterm tries to connect to your local PC.
If your PC is located inside the firewall or NAT and the Unix host is located outside, X applications cannot connect to the Xmanager running on your PC.

There are two solutions on this situation:

By configuring port forwarding rules on the NAT system.
By using SSH protocol in the Xstart program.
The two solutions above are only for Xstart connection, not for XDMCP. XDMCP connection is not supported currently.

To use port forwarding, you should forward the port 6000 of NAT system to the port 6000 of your PC. In case of multiple local users, you can do the following steps:

(NAT, 6001) ==> (PC1, 6000)
(NAT, 6002) ==> (PC2, 6000)
...
(NAT, 6009) ==> (PC9, 6000)

Then, in the Xstart program, each user have to enter "-display" option like this.:

/usr/bin/X11/xterm -ls -display $PCADDR:1

The value of "-display" option should be:

For PC1: $PCADDR:1
For PC2: $PCADDR:2

In case of using SSH connection, you do not have to configure other options. It establishes a secure tunnel between PC and Unix, so we recommend you to use SSH protocol if the Unix server supports it.







5. How can I set the firewall port mapping?
You should open the following UDP/TCP ports.


Inbound(incoming) TCP 6000 ~ 6010 for Xmanager
Outbound(outgoing) UDP 177 for XDMCP
Outbound(outgoing) TCP 512, 513, 514, 23, 22 for Xstart







6. I'm inside a firewall using IP masquerading. How can I connect to external Linux/Unix hosts?
To use Xstart with IP masquerading, please do the following steps:
run the following command as a root on your firewall server.
# ipmasqadm portfw -a -P tcp -L firewall_address 6010 -R PC_address 6000
run Xstart program.
enter the following command at Command field.
/usr/bin/X11/xterm -ls -display firewall_address:10.0
click the run button.
Be sure that, firewall_address and PC_address must be changed to the corresponding IP addresses on your own network.







7. How can I run a remote X application on my PC with a dynamic IP address?
If you want to start an X application such as xterm, first click Xstart icon in the Xmanager folder and set the command field as following:
"/usr/bin/X11/xterm -ls -display $DISPLAY"

In the protocol field, you should select a protocol supported by your remote Unix/Linux server.






8. How can I use Xmanager through SSH?
Run Xstart in the Xmanager folder.
Select SSH for Protocol.
Enter username, password, hostname, etc.
Type in Execution Command as following:
/usr/bin/X11/xterm -ls
Note that -display option is absent. SSH server will assign a proper value.
Click Save and Run button.
The Xstart will automatically run Xmanager and then execute the remote command.







9. When I open an xterm window, some characters are displayed incorrectly on the screen. Some (not all) capital letters looks like a small dot.
Run Xconfig program in the Xmanager folder
Select [Option] tab
Turn the [Maximize performance] option off
Save and run Xmanager







10. I've lost my product key. Where can I find it?
In the Customer Service page, you can find your product key. Click here.






11. The Backspace key does not work in xterm from RedHat 7 host.
run Keyboard Editor in Xmanager folder.
open your keyboard file.
click the BackSpace key you are using.
change the keysym value as following:
Unshifted: BackSpace
Shifted: NoSymbol
ModeSwitch: NoSymbol
ShiftedModeSwitch: NoSymbol

save and restart Xmanager.







12. How can I configure firewall settings in Windows XP?
Windows XP may block all incoming TCP/IP connections. So, Xmanager cannot be used without allowing its listening port.
Please do the following steps to enable Xmanager connection.:


Click Control Panel, Network and Internet Connections, and then Network Connections.
Right-click your Internet connection, and then click Properties.
Click Advanced tab in the Properties dialog box.
Click Settings and the Advanced Settings dialog box will open.
Now, you can allow TCP port 6000 ~ 6010 used by Xmanager.








13. Colors are not displayed correctly when I use 256-color CAD applications.
Some old X applications using 256-color visual cannot display colors correctly in the True color video device. Mostly, CAD applications such as Cadence, Mentor and CATIA have this problem.
You can configure 256-color emulation to fix this problem. In the Xconfig, change Default Visual and Backing Store options as following:

Default Visual: PseudoColor
Backing Store: When Mapped
These options will enable 256-color emulation feature in Xmanager.







14. Gnome terminal fails to open in RedHat 7.3.
The problem occurs due to the font used by gnome-terminal.
To fix this problem, configure xfs program and add the specific font server into the font list of Xconfig.

Comment the following line out in the file /etc/X11/fs/config.
#no-listen = tcp

Restart xfs process or reboot the system.
Open Xconfig utility.
Choose Font tab.
Click Add Font Server button.
In the Host box, enter the hostname or IP address of Linux.
In the Port box, enter 7100.
Restart Xmanager.
Make sure that the font server should be listed in the bottom of the font list.







15. Does Xmanager support Windows or Citrix terminal server?
Xmanager supports both Windows terminal server and Citrix MetaFrame server. To use Xmanager in those environment, please follow the guidelines below:
For XDMCP connection

Install Xmanager into the Windows or Citrix terminal server.
Run Xbrowser in each terminal client. Xbrowser is installed with Xmanager.
For Xstart session
Check the option, [Obtain Display Number Automatically], on in the Xstart dialog.


阅读全文 | 回复 | 引用通告
[java]iframe 变换网页
fxl 发表于 2005-5-12 14:13:00

           iframe应用之动态获取并替换网页内容

              作者:tomzc  Email:tangzc@gmail.com  日期:2004-11-23


   
   经常上论坛都能看的到,如果点击某个主题会出现“正在读取改贴的跟贴,请稍后.....”等的字眼。之后就显示了该主题的跟贴的一些相关信息。由于这几天要做类似于这种方式的BBS,所以就拿了一个BBS网站来研究一把,经过半天的查看源码和实践终于弄懂了。

   它主要的是Iframe和innerHTML结合的结晶。下面是一个简单的示范:

page1.htm


<html>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>page1</title>
</head>

<body>
<script language="javascript">

function loadContent(){
  //显示隐藏的提示内容
 document.all.tr2.style.display="block"; 
  //重新刷新iframe1的内容
 document.frames["iframe1"].location.replace("page2.htm");
}

</script>

<!--精华所在,用隐藏的iframe来作为外部数据的来源-->

<iframe   id="iframe1" width="0" height="0" name="I1"></iframe>

<table>
  <tr id="tr1" ><!--DISPLAY: none是把这行隐藏-->
  <td style="cursor:hand" onclick="loadContent()">
      点击这里你会有新发现。。。
  </td>
  </tr>
  <tr id="tr2" style="DISPLAY: none" ><!--DISPLAY: none是把这行隐藏-->
  <td>
      <div id="div_hidden">正在读取关于本主题的跟贴,请稍侯……</div>
  </td>
  </tr>
</table>

</body>

</html>

 

page2.htm


<html>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>page2</title>
</head>

<body>
<script language="javascript">
   alert("准备替换提示内容!");
   parent.div_hidden.innerHTML = "你已经看到从另外一个页面来的替换信息";
</script>
</body>

</html>


阅读全文 | 回复 | 引用通告
[java]iframe 应用解说
fxl 发表于 2005-5-12 14:02:00

一、Iframe标记的使用

  提起Iframe,可能你早已将之扔到“被遗忘的角落”了,不过,说起其兄弟Frame就不会陌生了。Frame标记即帧标记,我们所说的多帧结构就是在一个浏览器窗口中显示多个HTML文件。现在,我们遇到一种很现实的情况:如有一个教程,是一节一节地上,每页末尾做一个“上一节“、“下一节“的链接,除了每节教程内容不同之外,页面其它部分内容都是相同的,如果一页一页地做笨页面,这似乎太让人厌烦了,这时突发奇想,如果有一种方法让页面其它地方不变,只将教程做成一页一页的内容页,不含其它内容,在点击上下翻页链接时,只改变教程内容部分,其它保持不变,这样,一是省时,另则以后如教程有个三长两短的变动,也很方便,不致于牵一发而动全军了;更重要的是将那些广告Banner、栏目列表、导航等几乎每页的都有的东西只下载一次后就不再下载了。   Iframe标记,又叫浮动帧标记,你可以用它将一个HTML文档嵌入在一个HTML中显示。它不同于Frame标记最大的特征即这个标记所引用的HTML文件不是与另外的HTML文件相互独立显示,而是可以直接嵌入在一个HTML文件中,与这个HTML文件内容相互融合,成为一个整体,另外,还可以多次在一个页面内显示同一内容,而不必重复写内容,一个形象的比喻即“画中画“电视。

  现在我们谈一下Iframe标记的使用。

  Iframe标记的使用格式是:

  <Iframe src="/URL" width="x" height="x" scrolling="[OPTION]" frameborder="x"></iframe>
  src:文件的路径,既可是HTML文件,也可以是文本、ASP等;
  width、height:"画中画"区域的宽与高;
  scrolling:当SRC的指定的HTML文件在指定的区域不显不完时,滚动选项,如果设置为NO,则不出现滚动条;如为Auto:则自动出现滚动条;如为Yes,则显示;
  FrameBorder:区域边框的宽度,为了让“画中画“与邻近的内容相融合,常设置为0。

  比如:

  <Iframe src="http://netschool.cpcw.com/homepage";; width="250" height="200" scrolling="no" frameborder="0"></iframe>

  二、父窗体与浮动帧之间的相互控制   在脚本语言与对象层次中,包含Iframe的窗口我们称之为父窗体,而浮动帧则称为子窗体,弄清这两者的关系很重要,因为要在父窗体中访问子窗体或相反都必须清楚对象层次,才能通过程序来访问并控制窗体。

  1、在父窗体中访问并控制子窗体中的对象

  在父窗体中,Iframe即子窗体是document对象的一个子对象,可以直接在脚本中访问子窗体中的对象。

  现在就有一个问题,即,我们怎样来控制这个Iframe,这里需要讲一下Iframe对象。当我们给这个标记设置了ID 属性后,就可通过文档对象模型DOM对Iframe所含的HTML进行一系列控制。

  比如在example.htm里嵌入test.htm文件,并控制test.htm里一些标记对象:
  <Iframe src="test.htm" id="test" width="250" height="200" scrolling="no" frameborder="0"></iframe>
test.htm文件代码为:
  <html>
   <body>
    <h1 id="myH1">hello,my boy</h1>
   </body>
  </html>
  如我们要改变ID号为myH1的H1标记里的文字为hello,my dear,则可用:
  document.myH1.innerText="hello,my dear"(其中,document可省)
  在example.htm文件中,Iframe标记对象所指的子窗体与一般的DHTML对象模型一致,对对象访问控制方式一样,就不再赘述。

  2、在子窗体中访问并控制父窗体中对象

  在子窗体中我们可以通过其parent即父(双亲)对象来访问父窗口中的对象。
  如example.htm:
  <html>
   <body onclick="alert(tt.myH1.innerHTML)">
    <Iframe name="tt" src="frame1.htm" width="250" height="200" scrolling="no" frameborder="0"></iframe>
    <h1 id="myH2">hello,my wife</h1>
   </body>
  </html>
  如果要在frame1.htm中访问ID号为myH2中的标题文字并将之改为"hello,my friend",我们就可以这样写:
  parent.myH2.innerText="hello,my friend"
  这里parent对象就代表当前窗体(example.htm所在窗体),要在子窗体中访问父窗体中的对象,无一例外都通过parent对象来进行。

  Iframe虽然内嵌在另一个HTML文件中,但它保持相对的独立,是一个“独立王国“哟,在单一HTML中的特性同样适用于浮动帧中。

  试想一下,通过Iframe标记,我们可将那些不变的内容以Iframe来表示,这样,不必重复写相同的内容,这有点象程序设计中的过程或函数,减省了多少繁琐的手工劳动!另外,至关重要的是,它使页面的修改更为可行,因为,不必因为版式的调整而修改每个页面,你只需修改一个父窗体的版式即可了。

  有一点要注意,Nestscape浏览器不支持Iframe标记,但在时下IE的天下,这似乎也无大碍,广泛采用Iframe标记,既为自己(网站)着了想,又为网友节省了网费,何乐而不为?
posted on 2006-11-06 16:41  罗明超  阅读(1760)  评论(0编辑  收藏  举报