Search DominoPower's 11,425 Lotus-related article archive 
Home
EasyPrint
News details Click here for the RSS feed's XML code. This is not a browser URL.
Articles-only Click here for the RSS feed's XML code. This is not a browser URL.
Twitter Feed Click here for the Twitter feed.
Beginners guide to developing wireless applications (continued)

<HDML VERSION="3.0" TTL="0" PUBLIC="TRUE">
<DISPLAY>
<CENTER>Wireless Test Page


Congratulations, you have successfully made a wireless page!
</DISPLAY>
</HDML>

Step 3
Type in the URL on your phone browser or simulator and view the page. The URL would be something like http://servername/sample.hdml. You should see something similar to Figure C.

FIGURE C


The sample page is simple, but it's the start of a new area of development for you. Roll over picture for a larger image.

A simple agent to redirect users
If you want to redirect people who hit your main Web site URL to either an HTML page or an HDML page, depending on if they're accessing your page via a Web browser or a wireless phone, I've got a simple agent you can use. It's one I've used on a major Web site, and it has run fine with no appreciable impact on the server as far as I can tell. Here's the code:

Sub Initialize

Dim session As New NotesSession
Dim doc As NotesDocument
Set doc = session.DocumentContext

browserType$ = LeftChar ( doc.HTTP_USER_AGENT(0), "/" )

If ( browserType$ = "UP.Browser" ) Then
Print "[http://sitename/home.hdml]"
Else
Print ""
End If

End Sub

Here is the LeftChar function code:

Function LeftChar (Byval Text As String, Delim As String) As String
%REM
Returns the part of the string to the left of the delimiting character(s),
which is searched for from the left of the string. If the delimiter is not
found or no delimiter was provided, the entire string is returned.
%END REM
length = Len(text)
delimlength = Len(Delim)
If delimlength = 0 Then
LeftChar = text
Exit Function
End If
character = Mid$(text, length, 1)

%REM
Search the string character to determine the position of the delimiter.
If the position is greater than 0 return the portion of the string to the left of the delimiter. Otherwise, return the entire string.
%END REM

checkpos = 1
pos = Instr(checkpos, text, delim)
If pos > 0 Then
pos = pos - 1
LeftChar = Left$(text, pos)
Else
LeftChar = text
End If

End Function

Now all you need to do is change the home page URL on the Domino server to open this agent when someone types in the main URL for your server. Be sure and put a leading "/" before any subdirectory or else Domino will show the full URL when you hit the server rather than showing just the base site URL. Also, as you can see in the sample redirection agent above, I've used an absolute URL to specify where a phone user should be directed. Phone.com recommends using absolute rather than relative URLs when redirecting phone users.

Conclusion
It's going to be a wireless world, but it's going to take a while. There will need to be more killer applications out there before we reach a critical mass of wireless phone users. This is where we Domino developers come into play. This is an excellent chance to get in on the ground floor of a new technology, and there aren't that many great chances to do that.


« Previous  ·  1  ·  2  ·  3  ·  4  ·  5  ·  Next »
Other articles you might like
Home > Mobile Technology (32 articles)
   Troubleshooting Lotus Notes Traveler: the basics
   How Holt CAT mobilizes Notes throughout the enterprise
   Interesting new solution for making Notes Mail mobile
Get Weekly Email Updates
Subscribe to our regular weekly email newsletter. It's packed with tips, reviews, deep analysis, and the latest news.
 
Recent DominoPower Articles
Application development, William Shatner, and the origin of the universe
Learn Domino Designer 8.5 for free
The (near) future of Sametime, Quickr, Connections, and Symphony
Inside the IBM Innovations lab
Lotusphere 2010: Hot fixes and cool news for Notes, Domino, and LotusLive
Lotusphere 2010: mobility and collaboration
2010: A Lotusphere of change
Latest Lotus Headlines
Quickr place Superusers
Writing Client-Side Javascript for Re-Use
Lotus Notes R8.5.1: Bug in Contacts "Print Selected View"
New Notes/Domino Technotes published about Chile's extended daylight saving time
SnnT: How to prevent Google from listing your Sametime Server
How to send someone an email that shows your calendar availability
"The collection has become invalid"
>> Read all the news
More from the ZATZ journals
Computing Unplugged: The iPad defenders have spoken
David Gewirtz Online: CNN commentary and analysis
OutlookPower: More about disappearing text
-- Advertisement --

Sophisticated Meets Simple For Document Management
Share. Control. Manage.
Documents, emails, and content in the context of how work is done. Native to Lotus Domino. The User Experience unseen for Lotus Domino. Do more with less. Really.

See the possibilities Docova unleashes for Lotus Domino.
-- Advertisement --

Struggling with exporting Notes data to spreadsheets? No More!
Try IntelliPRINT, The world's leading Reporting, Dashboards, and Analysis solution for Notes & Domino

  • Don't spend unproductive time maintaining different versions of the same spreadsheet
  • Preserve data integrity and security in multi-user environments
  • Create reports in minutes INSIDE Notes
  • Get freedom from iterative report requests, deliver self-serve capabilities

Experience Reporting, Dashboards, and Analysis INSIDE Notes.

Try IntelliPRINT NOW!

ZATZ Home  ·  News  ·  Back Issues  ·  Credits/Trademarks ·  Link To Us
Copyright © 1998-2010, ZATZ Publishing. All rights reserved worldwide.
Editor's Login