show or hide Panel using ajax or javascript
-
hi all, I am using MS.NET 2005 and Ajax.dll in my web application. How can I hide or show panel on dropdown item selected event(on change event). Thanks in advance!!
All I ever wanted is what others have....
CrazySankerHide: document.getElementById('panelid').style.display = 'none' Show: document.getElementById('panelid').style.display = 'block'
Parwej Ahamad g.parwez@gmail.com
-
Hide: document.getElementById('panelid').style.display = 'none' Show: document.getElementById('panelid').style.display = 'block'
Parwej Ahamad g.parwez@gmail.com
Hi Friend, Thank you for your quick reply. But unfortunately it is not working.. <table> <tr> < td >hai sanker <td> </tr > < asp:panel id=p1 style="display:block;" <tr> < td >sanker@sanker.com <td> </tr > > </asp:panel > <tr> < td > ph:0501651816 <td> </tr > </table> or on cahnge event of dropdwon
function mypanel() { alert('hai'); document.getElementById('p1 ').style.display = 'none' }
that alert is wrking but hide is not wrking. any idea??All I ever wanted is what others have....
CrazySanker -
Hi Friend, Thank you for your quick reply. But unfortunately it is not working.. <table> <tr> < td >hai sanker <td> </tr > < asp:panel id=p1 style="display:block;" <tr> < td >sanker@sanker.com <td> </tr > > </asp:panel > <tr> < td > ph:0501651816 <td> </tr > </table> or on cahnge event of dropdwon
function mypanel() { alert('hai'); document.getElementById('p1 ').style.display = 'none' }
that alert is wrking but hide is not wrking. any idea??All I ever wanted is what others have....
CrazySankerIn id you have use sapce: document.getElementById**('p1 ').**style.display = 'none' document.getElementById('p1')style.display = 'none'
Parwej Ahamad g.parwez@gmail.com
-
Hi Friend, Thank you for your quick reply. But unfortunately it is not working.. <table> <tr> < td >hai sanker <td> </tr > < asp:panel id=p1 style="display:block;" <tr> < td >sanker@sanker.com <td> </tr > > </asp:panel > <tr> < td > ph:0501651816 <td> </tr > </table> or on cahnge event of dropdwon
function mypanel() { alert('hai'); document.getElementById('p1 ').style.display = 'none' }
that alert is wrking but hide is not wrking. any idea??All I ever wanted is what others have....
CrazySankertry using function ShowPanel() { alert('hai'); document.getElementById('p1').style.display = 'block'; } and on cahnge event of dropdwon function mypanel() { alert('hai'); document.getElementById('p1').style.display = 'none' }
Paras Kaneriya
The difference between genius and stupidity is that genius has its limits. -
In id you have use sapce: document.getElementById**('p1 ').**style.display = 'none' document.getElementById('p1')style.display = 'none'
Parwej Ahamad g.parwez@gmail.com
-
In id you have use sapce: document.getElementById**('p1 ').**style.display = 'none' document.getElementById('p1')style.display = 'none'
Parwej Ahamad g.parwez@gmail.com
While using javascript check how the applicaion works in other browsers like mozilla i.e test your application in other browsers also if you want your application to be browser compliant
Thanks and Regards Sandeep If If you look at what you do not have in life, you don't have anything, If you look at what you have in life, you have everything... "
-
try using function ShowPanel() { alert('hai'); document.getElementById('p1').style.display = 'block'; } and on cahnge event of dropdwon function mypanel() { alert('hai'); document.getElementById('p1').style.display = 'none' }
Paras Kaneriya
The difference between genius and stupidity is that genius has its limits. -
hi all, I am using MS.NET 2005 and Ajax.dll in my web application. How can I hide or show panel on dropdown item selected event(on change event). Thanks in advance!!
All I ever wanted is what others have....
CrazySankerActually i am using Ajax.dll. i am new to this AJAX wrold also. my doubt is though ajax we can enable or hide panale?? means i ave a c# function like
[Ajax.AjaxMethod] public string ChangeMe() { if (DrpDelMode.SelectedValue == "B") { Pnlcounter.Visible = false; PnlBankDet.Visible = true; TxtPaymentDetails.Rows = 8; } else { Pnlcounter.Visible = true; PnlBankDet.Visible = false; TxtPaymentDetails.Rows = 4; } TxtPaymentDetails.Text = DrpDelMode.SelectedItem.Value; return "Hai Ajax"; }
On change event of a dropdwon control i can invoke a JS functionfunction showpanle() { alert('ha1'); showpanel.ChangeMe(callback_Show); } function callback_Show(res) { document.getElementById("TxtPaymentDetails").innerText = res.value; }
in this above piece of code alert wrking fine and document.getElementById("TxtPaymentDetails").innerText value is null how can i can solve this issue?All I ever wanted is what others have....
CrazySanker