Skip to main content

Posts

Showing posts from November, 2012

Replacing xpage tabbed panel with jQuery tabs:

Replace xpage tabbed panel with jQuery tabs. So that every time when the tabs are changing the refreshing won't occur. And it is fancy as you like. Step1: Paste the following code in the editor side of your xpage to get the tabs:   <script>     $(function() {         $( "#tabs" ).tabs();     });   </script> <div id="tabs">     <ul>         <li><a href="#tabs-1">Nunc tincidunt</a></li>         <li><a href="#tabs-2">Proin dolor</a></li>         <li><a href="#tabs-3">Aenean lacinia</a></li>     </ul>  <div id="tabs-1">        tab1 content     </div>     <div id="tabs-2">      ...

Sample HTML page.

<html> <title>Sample Test Page</title> <h1>Test Page</h1> <head> <script> function myFunction() { alert("Successfully submitted!"); } </script> <style> #header ul {     list-style: none;     padding:0;     margin:0; } #header li {     float: left;     border: 1px solid;     border-bottom-width: 0;     margin: 0 0.5em 0 0; } #header li a {     padding: 0 1em; } #header a {         padding: 0 1em;         text-decoration: none;         color: #a80;         background: #fe5; } #header a:hover {         background: #fc0;         color: #540; } body {         font: small arial, helvetica, sans-serif;   ...

sahaayane sahaayane

sahaayane sahaayane from saattai

Dynamically changing the combo box values in Javascript:(Lotus Notes)

I need to change the 2nd combobox value depend on the value of the first combobox value. Steps: 1) Create a combo box name it as "cmbValue" . And have some values. 2) Give  default value to that combobox. 3) In the Onchange of that combo box place the code below. 4) Create another combobox value and name it as "cmbValue1" . 5) Give default value to that combobox also. Sample Code(Modify according to your values):   var doc = document.forms[0].cmbValue; var doc1 = document.forms[0].cmbValue1; if(doc.options[doc.selectedIndex].text=="--Select--") { doc1.remove(0) doc1.options[0] = new Option("--Select--","cmbValue1") return false; } else { if(doc.options[doc.selectedIndex].text=="One") {     doc1.options[0] = new Option("four","cmbValue1")     doc1.options[1] = new Option("five","cmbValue1")     return false; } else if(doc.options[doc.selectedIndex].text=="Two") {     doc1.opt...

"Responses" and "Response to responses"

Lotus Notes has any kind of format of lotus notes document, but what about the “response” and “response to the response.” When you design the form in lotus notes application you can chosen: to create a document with the document format under the primary documents call “response document” or create a document under response documents call “response to the response.” Lotus notes develops can decide whether to provide some structure when you create notes documents. There are many cases that are more relevant documents are clear. Example: a data entry in a document, you can information to employees in the two documents to be attached to the first. Remember that you have entered in the accounting documents of each set a unique ID.  How to tie documents to respond to the main document is to add a field in response documents called $REF. $REF argues that ID is not taken into account. copies of the parent. How “responses” differ from “response to responses”? Do you have a hierarchy of do...

Lotusscript to establish ODBC connection:

The script, when executed from a button, will create a new record in a specified ODBC data source, attempt to save the new record and display a message indicating whether the operation was completed successfully. If the operation is not completed sucessfully, it is likely that either your data source is read-only or your ODBC driver does not permit updates to the data source. Important: Complete each of the four steps below before running the script. 1. Create a new agent and add the following UseLSX command to the Options event: UseLSX "*LSXODBC" 2. Add the following script to the Initialize event of the agent. NOTE: Do not add the 'Sub' and 'End Sub' lines. Dim ui As New NotesUIWorkspace     Dim uidoc As NotesUIDocument     Dim doc As NotesDocument     Dim connection As ODBCConnection     Dim query As ODBCQuery     Dim result As ODBCResultSet         Set uidoc=ui.CurrentDocument ...

Getting the Combo box and radio button values in javascript:

Put it on the Onchange of the Combo box field: var doc = document.forms[0].cmbGender; if(doc.options[doc.selectedIndex].text=="--Select--") { return false; } else { alert(doc.options[doc.selectedIndex].text) return false; } Put it on the onchange of the radio button: var doc = document.forms[0] rdButtonvalue="" for(i=0;i<rdGender.length;i++) { if(rdGender[i].checked) { alert(rdGender[i].value) } }  

To find the number of seconds, minutes, hours, days, weeks between the two selected dates in lotus script.

Dim workspace As New NotesUIWorkspace     Dim uidoc As NotesUIDocument     Dim varDate1 As NotesItem     Dim varDate2 As NotesItem     Dim dt1 As NotesDateTime     Dim dt2 As NotesDateTime     Dim dt3 As New NotesDateTime("")     Dim dt4 As New NotesDateTime("")     Dim diffSeconds As Long     Dim minutesLeft As Long     Dim hoursLeft As Double     Dim daysLeft As Integer     Dim weeksLeft As Integer     Dim monthLeft As Integer     Dim remDays As Integer     Dim mNames As Variant     Dim currMonth As String     Dim lastMonth As String             Set uidoc = workspace.CurrentDocument     Set varDate1 = uidoc.Document.GetFirstItem("txDate1")     Set dt1 = varDate...