I was recently working with an application in which users requested for a fixed header that would not move with the web page as its users scroll left or right.
I went through a bunch of options to do it and every attempt I have made in the past with similar requests were kind of close and I had to include the usage of either quick javascrit functions that runs with a specified interval or I had to use the tag named "<!doctype>" and end up screwing my happiness with thanks to the different versions of the beautiful internet explorer.
I dont remember where I got the following stuff, but I really though that using "expression" with css is a no brainer. I also remember words from certain geeks advicing not to rely on them.
May be I dont understand the geeks yet, cos this 'expression' stuff with css seems to be good. Following is what I am taking about
<div style="left: 0px; left: expression(eval(document.body.scrollLeft)); position: fixed; top: 0px; top: expression(eval(document.body.scrollTop));">
My header contents </div>
I never knew that I had to use expression with eval of something. kriss... Thats some trick that I got to know better and remember. After all it makes life easier. Plus, this still has a few issues with the great internet explorer.Advanced users will eventually never use IE so better find a different browser to always work with.
On top of it, this code, I mean the usage of Expression keyword with Eval keyword is a trouble that you have to go through for IE alone. Because, "position:fixed" alone would do the work in Firefox and Chrome.
Share your thoughts and find that its getting better every day. This work of mine helps me realize that.
Thursday, January 31, 2013
Thursday, January 17, 2013
List all ODBC Connections mapped with Lotus Notes using Lotusscript
A while ago I was given a very nice job of finding why a lotus script agent was not able to communicate with a DB2 server. And the nice stupid part about that is I never had acess to even view the log files of the server where the issue occurs. It was kind of frustrating for a while to understand/find the source of the issue with virtually no resources. It was that I was thinking about the most basic of the scenarios like, network problems, lan cable issues etc etc,
So eventually I just wanted to know if there is a way to list down the kind of connections that are prevalent with a lotus domino server and ended up discovering the following. Again I just discovered if for myself. It was always able on the innernet some how of the other.:)
The following code gives you a message box with something like,
"The usable connections are file, notes, odbc2, oledb"
Atleast this is what I got. Evidently db2 was missing in the list for me and hurray, administrators found it at last that db2 was not mapped properly with the lotusdomino servers after looking at the proof . What ever that means. :P
Dim session As New LCSession
Dim conName As String
Dim text_str As String
' list the connectors available
' the parameters for connector code, identity flags, and
' identity names are optional and omitted in this example
Call session.ListConnector(LCLIST_FIRST, conName)
text_str = conName
While session.ListConnector(LCLIST_NEXT, conName)
text_str = text_str + ", " + conName
Wend
Msgbox "The usable Connectors are " & text_str
So eventually I just wanted to know if there is a way to list down the kind of connections that are prevalent with a lotus domino server and ended up discovering the following. Again I just discovered if for myself. It was always able on the innernet some how of the other.:)
The following code gives you a message box with something like,
"The usable connections are file, notes, odbc2, oledb"
Atleast this is what I got. Evidently db2 was missing in the list for me and hurray, administrators found it at last that db2 was not mapped properly with the lotusdomino servers after looking at the proof . What ever that means. :P
Dim session As New LCSession
Dim conName As String
Dim text_str As String
' list the connectors available
' the parameters for connector code, identity flags, and
' identity names are optional and omitted in this example
Call session.ListConnector(LCLIST_FIRST, conName)
text_str = conName
While session.ListConnector(LCLIST_NEXT, conName)
text_str = text_str + ", " + conName
Wend
Msgbox "The usable Connectors are " & text_str
Labels:
Lotus Notes,
Lotusscript,
ODBC Connectivity
Thursday, January 3, 2013
Formula inMemory note - Web Hack
When researching about the _doClick related concepts, I found a hack that might possibly be a serializaied representation of the memory segment where a formula command will be stored in a server.
This sounds funny and frightening to me - "Yin and Yang" concept, if I am not wrong.
Well as usual try the following ridiculous stuff and tell me that I am not crazy.
1. Create/open a form in Lotus Notes
2. Create a button and put some formula code inside it as illustrated in the following screen shot.
3. Now navigate to the HTML tab of the button properties dialog and simply add "<>" in the 'Other' field as illustrated in the previous screen shot .
4. Now preview the form in browser and you will be able to see some thing like this
Discussion points in few forums say that these numbers are memory segment representation sort of stuffs in the server with the domino uses via "_click" field in post data or a &click argument in a url to trigger and execute these formula commands.
Man this stuff is crazy.
This sounds funny and frightening to me - "Yin and Yang" concept, if I am not wrong.
Well as usual try the following ridiculous stuff and tell me that I am not crazy.
1. Create/open a form in Lotus Notes
2. Create a button and put some formula code inside it as illustrated in the following screen shot.
3. Now navigate to the HTML tab of the button properties dialog and simply add "<>" in the 'Other' field as illustrated in the previous screen shot .
4. Now preview the form in browser and you will be able to see some thing like this
Discussion points in few forums say that these numbers are memory segment representation sort of stuffs in the server with the domino uses via "_click" field in post data or a &click argument in a url to trigger and execute these formula commands.
Man this stuff is crazy.
Labels:
Formula,
Hacks,
Lotus Notes
_doClick in Lotus Notes - A javascript refresh trigger other than window.reload
This was a strange stuff that I have never encountered before. This is a nice stuff that one can use to screw your lotus domino based web pages with as well. Hope there are not too many hackers around.
I stumbled upon this when I had to avoid a page refresh that was triggered due to selection of the property named "Refresh fields on keyword change" for a combobox field type in the lotus notes form.
It was like there were no ways to impose a partial refresh of web page segments like the ones available with XPages. Eventually search for a desparate hack went in vain but I was able to discover the existence of this particular hack.
Hope this helps some one though I did not have any use for the same. Following is what I am speaking about.
1. Create a form. Include a dropdown "combo" field in it. Give it some options and select the property "Refresh fields on keyword change".
2. The property selection I am speaking about is illustrated as follows
5. Now preview the form on the web. Nothing big right. You see 2 simple fields just as expected
6. And if you change a value in the dropdown, you page will be refreshed because of the associated option "Refresh fields on keyword change". So eventually, you will be able to see a new time that is computed and displayed on the webpage
7. Now go back to the designer and uncheck the option "Refresh fields on keyword change" in your combobox properties window
8. And add the following code in the onchange event of the dropdown box.
_doClick('$Refresh', this, '_self', '#_RefreshKW',"myDropDown")
9. Now save and preview your webpage again and try changing the values in the dropdown again. You will be able to recognize that the page behaves in a simialr way and it is no different from the property selection on the dropdown field.
10. Interesting right.
Now my worry is I guess, I will be able to perform a few hacks with this. So more to think about when developing webpages in future :(
Hope this helps :)
I stumbled upon this when I had to avoid a page refresh that was triggered due to selection of the property named "Refresh fields on keyword change" for a combobox field type in the lotus notes form.
It was like there were no ways to impose a partial refresh of web page segments like the ones available with XPages. Eventually search for a desparate hack went in vain but I was able to discover the existence of this particular hack.
Hope this helps some one though I did not have any use for the same. Following is what I am speaking about.
1. Create a form. Include a dropdown "combo" field in it. Give it some options and select the property "Refresh fields on keyword change".
2. The property selection I am speaking about is illustrated as follows
3. Put a date time field near by the combo box and ensure that it displays time upto seconds at any point of its display
5. Now preview the form on the web. Nothing big right. You see 2 simple fields just as expected
6. And if you change a value in the dropdown, you page will be refreshed because of the associated option "Refresh fields on keyword change". So eventually, you will be able to see a new time that is computed and displayed on the webpage
7. Now go back to the designer and uncheck the option "Refresh fields on keyword change" in your combobox properties window
8. And add the following code in the onchange event of the dropdown box.
_doClick('$Refresh', this, '_self', '#_RefreshKW',"myDropDown")
9. Now save and preview your webpage again and try changing the values in the dropdown again. You will be able to recognize that the page behaves in a simialr way and it is no different from the property selection on the dropdown field.
10. Interesting right.
Now my worry is I guess, I will be able to perform a few hacks with this. So more to think about when developing webpages in future :(
Hope this helps :)
Labels:
Hacks,
Javascript,
Lotus Notes
Subscribe to:
Posts (Atom)