| | |
Problem with View More Messages title appearing
Please support our JavaScript / DHTML / AJAX advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
![]() |
•
•
Join Date: Jul 2005
Posts: 1
Reputation:
Solved Threads: 0
Hi All
I am hoping someone can help me out since this is driving me nuts.
On my ASP.Net page I have DIV areas and one ASP.Net server label control :
Code:
_DIV area 1_____________________________________________________
Message Center View All Messages|
_DIV area2_____________________________________________________
(lblMsgCenter)
This is first test message. |
|
This is 2nd test message. |
_______________________________________________________
The scroll bar of the 2nd DIV area appears if the messages increase beyond the height of the DIV area. That is not a problem, and the View All Messages hyperlink shows up in the first DIV area. When the messages are less and within the DIV height, scroll bar should not appear and the View All Messages hyperlink in the first DIV area shouldn't show up. The problem is - it shows up. Please help me. This is the snippet of my code:
<script language="JavaScript" id="ViewMore" type="text/javascript">
function lib_bwcheck(){ //Browsercheck (needed)
this.ver=navigator.appVersion
this.agent=navigator.userAgent
this.dom=document.getElementById?1:0
this.opera5=this.agent.indexOf("Opera 5")>-1
this.ie5=(this.ver.indexOf("MSIE 5")>-1 && this.dom &&
!this.opera5)?1:0;
this.ie6=(this.ver.indexOf("MSIE 6")>-1 && this.dom && !
this.opera5)?1:0;
this.ie4=(document.all && !this.dom && !this.opera5)?1:0;
this.ie=this.ie4||this.ie5||this.ie6
this.mac=this.agent.indexOf("Mac")>-1
this.ns6=(this.dom && parseInt(this.ver) >= 5) ?1:0;
this.ns4=(document.layers && !this.dom)?1:0;
this.bw=(this.ie6 || this.ie5 || this.ie4 || this.ns4 || this.ns6 ||
this.opera5);
// 07/05/05 - added by PS
//alert('lib_bwcheck call');
// end
return this;
}
//var bw=new lib_bwcheck();
function makeObj(obj,nest){
var bw=new lib_bwcheck();
if(!bw.bw) return lib_message('Old browser')
nest=(!nest) ? ""
'document.'+nest+'.');
this.el=bw.dom?document.getElementById(obj):bw.ie4?
document.all[obj]:0;
this.css=bw.dom?document.getElementById(obj).style:bw.ie4?
document.all[obj].style:0;
this.offsetHeight=this.el.offsetHeight;
this.scrollHeight=this.el.scrollHeight;
this.obj = obj + "Object";
return this;
}
//Makes the object
function ViewMoreMsgInit(){
oCont = new makeObj('divMsgArea');
oMore = new makeObj('divMore');
alert('in ViewMoreMsgInit');
if ( oCont.scrollHeight > oCont.offsetHeight)
oMore.css.visibility = "visible";
else
oMore.css.visibility = "hidden";
}
</script>
</HEAD>
<body>
<table class="spreadsheet wide">
<tr>
<th class="mergeRight metaHeading cell">
Message Center</th>
<th class="mergeLeft metaHeading cell" id="TH1">
<div class="cell" id="divMore" align="right" runat="server"><a id=vAll
href="<%=ViewDetail()%>"
Runat="server">View All Messages</a></div>
</th>
</tr>
<tr>
<td class="cell" id="tdMsgArea" colSpan="2">
<div id="divMsgArea" style="OVERFLOW: auto; HEIGHT: "150px">
<asp:label id="lblMsgCenter" Runat="server"></asp:label></div>
</td>
</tr>
</table>
<script>
ViewMoreMsgInit()
</script>
</body>
Note: The 'lblMsgCenter' is getting filled up in the server-side code in the Form Page_Load event.
I would appreciate if whoever has a suggestion to please post their reply and also send me an e-mail to pankaja_shankar@ml.com
Thanks.
I am hoping someone can help me out since this is driving me nuts.
On my ASP.Net page I have DIV areas and one ASP.Net server label control :
Code:
_DIV area 1_____________________________________________________
Message Center View All Messages|
_DIV area2_____________________________________________________
(lblMsgCenter)
This is first test message. |
|
This is 2nd test message. |
_______________________________________________________
The scroll bar of the 2nd DIV area appears if the messages increase beyond the height of the DIV area. That is not a problem, and the View All Messages hyperlink shows up in the first DIV area. When the messages are less and within the DIV height, scroll bar should not appear and the View All Messages hyperlink in the first DIV area shouldn't show up. The problem is - it shows up. Please help me. This is the snippet of my code:
<script language="JavaScript" id="ViewMore" type="text/javascript">
function lib_bwcheck(){ //Browsercheck (needed)
this.ver=navigator.appVersion
this.agent=navigator.userAgent
this.dom=document.getElementById?1:0
this.opera5=this.agent.indexOf("Opera 5")>-1
this.ie5=(this.ver.indexOf("MSIE 5")>-1 && this.dom &&
!this.opera5)?1:0;
this.ie6=(this.ver.indexOf("MSIE 6")>-1 && this.dom && !
this.opera5)?1:0;
this.ie4=(document.all && !this.dom && !this.opera5)?1:0;
this.ie=this.ie4||this.ie5||this.ie6
this.mac=this.agent.indexOf("Mac")>-1
this.ns6=(this.dom && parseInt(this.ver) >= 5) ?1:0;
this.ns4=(document.layers && !this.dom)?1:0;
this.bw=(this.ie6 || this.ie5 || this.ie4 || this.ns4 || this.ns6 ||
this.opera5);
// 07/05/05 - added by PS
//alert('lib_bwcheck call');
// end
return this;
}
//var bw=new lib_bwcheck();
function makeObj(obj,nest){
var bw=new lib_bwcheck();
if(!bw.bw) return lib_message('Old browser')
nest=(!nest) ? ""
'document.'+nest+'.');this.el=bw.dom?document.getElementById(obj):bw.ie4?
document.all[obj]:0;
this.css=bw.dom?document.getElementById(obj).style:bw.ie4?
document.all[obj].style:0;
this.offsetHeight=this.el.offsetHeight;
this.scrollHeight=this.el.scrollHeight;
this.obj = obj + "Object";
return this;
}
//Makes the object
function ViewMoreMsgInit(){
oCont = new makeObj('divMsgArea');
oMore = new makeObj('divMore');
alert('in ViewMoreMsgInit');
if ( oCont.scrollHeight > oCont.offsetHeight)
oMore.css.visibility = "visible";
else
oMore.css.visibility = "hidden";
}
</script>
</HEAD>
<body>
<table class="spreadsheet wide">
<tr>
<th class="mergeRight metaHeading cell">
Message Center</th>
<th class="mergeLeft metaHeading cell" id="TH1">
<div class="cell" id="divMore" align="right" runat="server"><a id=vAll
href="<%=ViewDetail()%>"
Runat="server">View All Messages</a></div>
</th>
</tr>
<tr>
<td class="cell" id="tdMsgArea" colSpan="2">
<div id="divMsgArea" style="OVERFLOW: auto; HEIGHT: "150px">
<asp:label id="lblMsgCenter" Runat="server"></asp:label></div>
</td>
</tr>
</table>
<script>
ViewMoreMsgInit()
</script>
</body>
Note: The 'lblMsgCenter' is getting filled up in the server-side code in the Form Page_Load event.
I would appreciate if whoever has a suggestion to please post their reply and also send me an e-mail to pankaja_shankar@ml.com
Thanks.
![]() |
Similar Threads
- Can't open messages from Hotmail (Web Browsers)
- Windows 2000 - Windows Explorer folder view is gone (Windows NT / 2000 / XP)
- Dlink router blocking hotmail (Networking Hardware Configuration)
- Virus Problem (Viruses, Spyware and other Nasties)
- What Forum Do You Use? (Growing an Online Community)
- Windows XP Plug N Play problem (Windows NT / 2000 / XP)
- can't view offline webpages (Web Browsers)
- Msn Messenger Won't Work (Windows Software)
- Need help removing hotoffers.info ... (Viruses, Spyware and other Nasties)
Other Threads in the JavaScript / DHTML / AJAX Forum
- Previous Thread: Need to find a solution similar to Yahoo News related search
- Next Thread: Printing using Web Control Print button VB.NET
| Thread Tools | Search this Thread |
acid2 ajax ajaxexample ajaxhelp ajaxjspservlets animate array automatically beta box browser captchaformproblem cart child close codes column css date debugger decimal dependent design disablefirebug dom download element embed engine enter error events ext file firefox focus form forms frameworks getselection google gwt gxt hiddenvalue highlightedword hint html htmlform ie7 ie8 iframe index java javascript javascripthelp2020 jawascriptruntimeerror jquery jsp jump libcurl listbox maps masterpage math media menu microsoft mimic mp4 onmouseoutdivproblem onmouseover onreadystatechange paypal pdf php player position post problem programming prototype redirect safari scale scriptlets scroll search security select software sql textarea toggle unicode w3c web website window windowofwords \n





