Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to raise a javascript function from another Form ?

Status
Not open for further replies.

vilrbn

Programmer
Oct 29, 2002
105
0
0
FR
Hello,

I use two forms, having each the same two frames.
When I go from Form2 to Form1, I check a radio button in Form1 (page_load).
This runs a javascript function that makes visible buttons on another frame (EnableBottom).
Code behind is working fine, but I don't manage to raise the onclick Event which is on client side.Except if I click on rdb1 (EnableBottom() is correctly launched).

Here's my Form1 code:

Code-behind:

Private Sub Page_Init(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Init
rdb1.Add("onClick", "javascript:EnableBottom();")

Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
If Not Page.IsPostBack Then
...
rdb1.Checked = True
rdb1_CheckedChanged(sender, e)

HTML:
<script>
function EnableBottom()
{
parent.frBottom.Enable();
}
</script>

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top