Search DominoPower's 11,443 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.
JAVASCRIPT FOR FUN AND PROFIT
Using JavaScript to get the Query_String from a frameset
By Dan Velasco

At my company, we recently received an application a consulting company had created for us that had a fatal flaw. Well, maybe not a fatal flaw, but definitely one that would make developers want to slit their wrists because of all the maintenance and customization involved.

It was an e-commerce application designed to assist our customers in buying our products. The main page was a frameset with three frames: a top frame, a left-hand side frame, and a main body frame. The main body frame, by default, contained login information, and that was all, as you can see in Figure A. The challenge we faced was that we wanted to create custom home/login pages for each of the products showing a picture of the product along with a customized welcome message.

FIGURE A


The default screen only contains login information, challenging us to customize it for each of our products. Roll over picture for a larger image.

The fatal flaw in the application the consulting company had created for us was that in order to create custom home pages for each of our products, it required the following steps:

  1. Create a new frameset and then name it after the product;
  2. Create a custom home page Domino form for the product;
  3. Create a configuration document for each product that includes such information as the name of the product, its home page URL, and an attached file that contains a picture of the product, among other things.

In case you're keeping count, that's two Domino design elements that would have to be created for each product. Multiply this by an initial set of almost 30 products and you get the picture of how unwieldy this could quickly become. As you are no doubt thinking, the method above does not require a lot of skills but it does require that the person who is creating these custom home page framesets and forms have a Notes Designer client. Gee, whom would they come to with change requests?

This solution was simply unacceptable to me, and I knew there had to be a better way. Well, there is, and all it involves is a basic understanding of JavaScript, Query_Strings, and the code I am about to give you. The solution outlined in this article is designed to work in Notes/Domino R5 only. For a sample database containing the complete code described in this article, please go to http://dan.velasco.com.

How do you get the Query_String of a frameset?
OK, here's a quick refresher. The Query_String is the part of the URL that usually starts with either the question mark or exclamation mark, as the case might be. For instance, in the URL http://sample/db.nsf/MainFrameset?OpenFrameset&;fname=Dan&lname=Velasco, the Query_String would be "?OpenFrameset&fname=Dan&lname=Velasco". There are two parameters, one called fname with a value of "Dan" and one called lname with a value called "Velasco." When you are not using framesets, it is fairly easy to get and manipulate the Query_String using a computed for display field on the form set to Query_String or by getting doc.Query_String(0) via LotusScript. When the form is in a frameset, however, you've got to take a different approach.


1  ·  2  ·  3  ·  4  ·  5  ·  Next »
Other articles you might like
Home > Internet Technologies > JavaScript (13 articles)
   Sorting your Domino views with JavaScript
   Give your Domino views life with DHTML
   Using dynamically generated HTML to thwart spam email address harvesting
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
Syncing Notes with Android phones
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
Latest Lotus Headlines
Xpages not loading? JVM errors? - Solution
How to implement an iCalendar feed into your Notes calendar with XPages
DWA Hotfixes for Domino 8.5.1FP1 - A Gotcha
IBM Adds DB2 to Lotus Foundations SMB Package
SNTT : XPages onclick Ghosts in the machine
Ports used by Lotus Sametime 8.5 servers
Exploring a Domino Date Bug
>> Read all the news
More from the ZATZ journals
Computing Unplugged: Online safety for virtual learning
David Gewirtz Online: CNN commentary and analysis
OutlookPower: Seek and find: Strategies to locate filed-away emails fast
-- Advertisement --

Find unused Lotus Notes groups and clean up your address book
Have you ever wanted to get rid of old Lotus Notes groups that were cluttering up your address book, but you weren't sure if they were used? Find Unused Groups can help.

Find Unused Groups will check your ACL, mail, multi purpose and server groups to help you determine if they are used, and who uses them.

Learn how to easily clean up your address book.

-- Advertisement --

Integrate your Notes Applications with Microsoft Office and Symphony
Integra for Notes Integrates Microsoft Office and/or IBM Lotus Symphony
Requires NO change to the design of the appliation or Installations of DLL's and EXE's
  • Integra is a ready to use solution, enhance static reports with Excel data analysis, pivot tables, macros
  • User friendly aproach, using a point and click access to features
  • Reports from any Lotus Notes databases
  • Runs reports through a Notes client, web browser and scheduled basis
  • Allows use of LotusScript for advanced data manipulation
  • Enables self service reporting capabilities to end-users


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