 |
|
 |
I'm using ASP.NET 1.1 to develop my customer's site. They don't want to upgrade to 2.0 so your idea is really good. Thanks.
|
|
|
|
 |
|
 |
In these browsers, scrollTop is no longer located in document.body, but in document.documentElement. It will not work unless Lili2.cs is modified.
In Lili2.cs, locate:
writer.Write("document.getElementById(\"" + this.ID + "_OffsetY\").value = document.body.scrollTop;\n");
writer.Write("document.getElementById(\"" + this.ID + "_OffsetX\").value = document.body.scrollLeft;\n");
and replace it with:
writer.Write("if (document.documentElement.scrollTop || document.documentElement.scrollLeft) {");
writer.Write("document.getElementById(\"" + this.ID + "_OffsetY\").value = document.documentElement.scrollTop;\n");
writer.Write("document.getElementById(\"" + this.ID + "_OffsetX\").value = document.documentElement.scrollLeft;\n");
writer.Write("} else {");
writer.Write("document.getElementById(\"" + this.ID + "_OffsetY\").value = document.body.scrollTop;\n");
writer.Write("document.getElementById(\"" + this.ID + "_OffsetX\").value = document.body.scrollLeft;\n");
writer.Write("}");
After a recompile, this fixed mine
|
|
|
|
 |
|
 |
Using this for a project involving ASP.NET in VB. Works great with DropDownList boxes, inside DIV tags, etc.
Also a hint for some people who hate page flashing. Try this metatag. I found an article with this semi-solution on the web.
<meta http-equiv="Page-Exit" Context="blendTrans(Duration=0.01)">
Lili2 with that metatag improves the usability of the page 200% in my opinion. Thanks again.
|
|
|
|
 |
|
 |
Any ideas, why it doesn't works under IE7 (under IE6x it works fine)
|
|
|
|
 |
|
 |
I have not been able to get it to work under the following doctypes i take them out it works wonderfully put them in and it stops working i get no errors or warnings of any sorts. Just doesn't work
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">
XHTML 1.1 DTD
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
|
|
|
|
 |
|
 |
I am trying to create a link on a page back to the previous page.
But I would like to return the user to the scroll position on that page.
I can't use javascript:history.back() because they may have performed a postback
in which case it will not take them to the previous page.
Could this control be modified or used in the way I have said?
|
|
|
|
 |
|
 |
Hi Ibrahim,
Thank you for sharing Lili1 and Lili2. I am using Lili2 and I am quite happy to state that it works beautifully. I tested it in IE6 with SP1 and FireFox 1.5.0.7, both on Windows XP SP2. Cheers.
Farhan Noor Qureshi
|
|
|
|
 |
|
 |
The control you wrote works perfectly with my .NET app. I'm using a datagrid with edit/update/delete buttons and your control preserves the scroll position just like SmartNavigation does, but with the added bonus of working with our custom JavaScript libraries!
Thank you!!!
|
|
|
|
 |
|
 |
İbrahim
Really nice work with the control!
I can't d/l lili3 - dunno why. I need the enabled functionality.
|
|
|
|
 |
|
|
 |
|
 |
Hi
I'm using Lili3 with the Enabled property. It seems that once you disable it in a PostBack, it can't be enable anymore (Enabled = true had no effect).
Thanks
|
|
|
|
 |
|
 |
enabled property is not saved in the viewstate . You must save it in the viewstate like
Private Property Enabled as boolean
set(byval value as boolean)
Viewstate("enabled") = value
end set
get
return Viewstate("enabled")
end get
end property
Ibrahim ULUDAG
Software Developer
ibrahimuludag@gmail.com
www.ibrahimuludag.com
|
|
|
|
 |
|
 |
I have smart navigation turned off and added your control to my page, but when using the meta tag refresh "meta http-equiv=refresh content=300" the auto refresh triggers and the page scrolls to the top. Anyway to get around this problem? I noticed the same thing happened when using the .net smart navigation.
|
|
|
|
 |
|
 |
Because refresh does not post the page. That's why it does not work. You can make change by using cookies.
Ibrahim ULUDAG
Software Developer
ibrahimuludag@gmail.com
www.ibrahimuludag.com
|
|
|
|
 |
|
 |
El control funciona muy bien, muchas gracias.
Medellin - Colombia
|
|
|
|
 |
|
 |
Hi mate,
good lump of code. Works in safari on a mac, btw.
Only thing is, I can't get it to work in firefox on a pc.
I'm using v1.06 of firefox.
any thoughts are welcome.
cheers,
Frank
|
|
|
|
 |
|
 |
In Lili2.cs, locate:
writer.Write("document.getElementById(\"" + this.ID + "_OffsetY\").value = document.body.scrollTop;\n");
writer.Write("document.getElementById(\"" + this.ID + "_OffsetX\").value = document.body.scrollLeft;\n");
and replace it with:
writer.Write("if (document.documentElement.scrollTop || document.documentElement.scrollLeft) {");
writer.Write("document.getElementById(\"" + this.ID + "_OffsetY\").value = document.documentElement.scrollTop;\n");
writer.Write("document.getElementById(\"" + this.ID + "_OffsetX\").value = document.documentElement.scrollLeft;\n");
writer.Write("} else {");
writer.Write("document.getElementById(\"" + this.ID + "_OffsetY\").value = document.body.scrollTop;\n");
writer.Write("document.getElementById(\"" + this.ID + "_OffsetX\").value = document.body.scrollLeft;\n");
writer.Write("}");
After a recompile, this fixed mine in Firefox and IE7
modified on Thursday, March 26, 2009 1:47 PM
modified on Thursday, March 26, 2009 3:21 PM
|
|
|
|
 |
|
 |
I have a datagrid on a page where I am using lili2. lili2 works great but I want to be able to tell it NOT to scroll if a "pager" was clicked sending a postback. It is causing the next page in the grid results to scroll down to the bottom when I don't want that. Suggestions?
Thanks.
|
|
|
|
 |
|
 |
You can try this control. The used is the same. Just set the enabled property.
http://www.ibrahimuludag.com/external/lili3.zip
Ibrahim ULUDAG
Software Developer
ibrahimuludag@gmail.com
www.ibrahimuludag.com
|
|
|
|
 |
|
 |
If I still want lili to work on the page but just not for the pagers, is this still what I need? Can I mark it disabled only if the pager is clicked and have it still work correctly when the pager is not clicked?
|
|
|
|
 |
|
 |
This is the same control. Only the enabled feature (which you want) is added. In the paging function add MyLili.enabled = false. Then it will be disabled. The enabled property is not stored in the viewstate. So you should set enabled = false when you need. You need not to set enabled = true.
|
|
|
|
 |
|
 |
I have not made myself clear, I'm sorry. I do not want to disable the control for the page. I actually use it on the page. On this page I have a datagrid that is paged. There are pager buttons at the bottom of the page to move to other pages within the paged list. When those pager buttons are clicked I do not want lili to scroll the page when it displays the next page. But there are functions on that same page that post back to the current page with processing and I want lili to scroll at that time. So I only want to disable lili if the pagers are clicked but I want it to work for all other postbacks. Is that making sense?
Thanks.
|
|
|
|
 |
|
 |
the control doesn't seem to be working when i use a doctype am i doing something wrong here or is it normal that it doesn't work with doctype.
greetings
the friendly stranger
|
|
|
|
 |
|
 |
I just read this and tried my code without a doctype and it worked. However I really need the doctype. Is there any fix to this?
|
|
|
|
 |
|
 |
In Lili2.cs, locate:
writer.Write("document.getElementById(\"" + this.ID + "_OffsetY\").value = document.body.scrollTop;\n");
writer.Write("document.getElementById(\"" + this.ID + "_OffsetX\").value = document.body.scrollLeft;\n");
and replace it with:
writer.Write("if (document.documentElement.scrollTop || document.documentElement.scrollLeft) {");
writer.Write("document.getElementById(\"" + this.ID + "_OffsetY\").value = document.documentElement.scrollTop;\n");
writer.Write("document.getElementById(\"" + this.ID + "_OffsetX\").value = document.documentElement.scrollLeft;\n");
writer.Write("} else {");
writer.Write("document.getElementById(\"" + this.ID + "_OffsetY\").value = document.body.scrollTop;\n");
writer.Write("document.getElementById(\"" + this.ID + "_OffsetX\").value = document.body.scrollLeft;\n");
writer.Write("}");
After a recompile, this fixed mine
|
|
|
|
 |