当窗口完成loding时重新启用链接 [英] reenable link when window finish loding

查看:90
本文介绍了当窗口完成loding时重新启用链接的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

HI,
我有一个链接,当我点击链接时,它会在另一个窗口中打开一个页面并禁用链接。
我希望这样一旦新窗口被锁定,就应该启用链接。< br>
下面是链接:

< a href =" javascript:EqpWindow('equipment_entry_form.asp?cabrv = <%= objRS(" CarrierCompany")%> & CloseWinAlert = Y');" onclick =" this.disabled = true; this.onclick = function(){return false ;}" > <% = objRS( " CarrierCompany" )& " - " &am p; objRS( " Carr_Name" )%> < / a >

任何帮助非常感谢。
谢谢你提前了

解决方案

如果你有一个'equipment_entry_form.asp'

如果你需要在'equipment_entry_form.asp'的bodyload上创建一个函数


< body onload =" enablehyperlink()'>
function enablehyperlink()
{
window.parent.enabeHyperlinkParent()\\ enableHyperlinkParent是您必须在父页面中定义的函数



现在在父页面中

创建一个名为 enableHyperlinkParent()的函数
{
然后使用
document.getElementsByTagsName(" a")[0] .disabled = false;
}


然后再次启用你的超链接按钮,这样这种方法只有在你有一个内在的页面'equipment_entry_form'

HI,
I have a link , when i click the link it opens a page in another window and disable the link .
I want such that once the new window is loded the link should be enabled.

below is the link:

<a href="javascript:EqpWindow('equipment_entry_form.asp?cabrv=<%=objRS("CarrierCompany")%>&CloseWinAlert=Y');" onclick="this.disabled=true;this.onclick=function(){return false;}" ><%=objRS("CarrierCompany")&"-"&objRS("Carr_Name")%></a>

Any help is much appreciated.
Thanks in Advance

解决方案

it easy if you have acess to 'equipment_entry_form.asp'
if you have acess to form make a function on bodyload of 'equipment_entry_form.asp'

<body onload="enablehyperlink()'>
function enablehyperlink()
{
    window.parent.enabeHyperlinkParent()\\ enableHyperlinkParent is the function you have to define in the parent page
}



and now in the parent page

make a function named enableHyperlinkParent ()
{
and then use
document.getElementsByTagsName("a")[0].disabled = false ;
}


and then again enable your hyperlink button so this approach only works if you have acess to innner page 'equipment_entry_form'


这篇关于当窗口完成loding时重新启用链接的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆