Skip to main content

SmartNavigation without ASP.NET????

Tip of the day,
Wanna reproduce smartnavigation behaviour for your web pages?????
Was playing around with the feature provided by ASP.NET and it performs somewhat like this:

<script>
function TrialSaving()
{
StorageSpace.document.write(document.body.innerHTML);
StorageSpace.document.forms[0].submit();
StorageSpace.document.body.innerHTML="";
setTimeout("tryMe()",300);
return false;
}
function tryMe()
{
if(StorageSpace.document.body.innerHTML=="")
setTimeout("tryMe()",300);
else
document.body.innerHTML=StorageSpace.document.body.innerHTML;
}
</script>

<iframe name='StorageSpace' width=100%></iframe>

Call function TrialSaving before submiting your form. And, voila, the page does not seem to refresh. U can go about adding hidden fields to indicate last focussed controls etc.
Of course this is a miniature version, can be modified to perform better and add more functionality.

Comments

Popular posts from this blog

Theming in Whidbey using CSS

Continuing my blog titled Themes in Whidbey . I would like to mention some great points I did find out today about Whidbey featrures. How many times have you got sick of developing Sites which have themes???? I mean every page u create has to have, maybe in ASP, something like <link href="<%=Session["ThemeFile"]%>.css"/> I have been doing since a long time. Do mention if you have a simpler method of defining a variable CSS for your page!!! Whidbey simplifies this further. Now in ASP.NET, all you will have to do is Create Themes directory, if not aldready present, Create a directory for each theme required, maybe Black, Gray,etc. Dump your CSS files into this directory. in Page_PreInit method define the Theme as Page.Theme="<Theme directory Name>". Further can be made into Page.Theme=(string)Session["ThemeType"] and viola, your theme management is take care by ASP.NET When you want to change the theme, the...

B.O.F.H.

Was browsing the net, and found some old link to BOFH. Not sure as to how many used to read PCQuest some time back when it used to come, but i remember reading them, with of course re-reads and re-re,etc...i can go on you know. Anyway, it's about a system operator who is bugged by no-brainers asking silly computer related queries, and this guy repling with wierd answers. I had never known the origin of this character, until i saw this . Anyway for those who have never read BOFH, here are two of them.