Notes Ninjas Notes Ninjas
Lotus Notes hints, tips, error messages
Pseudo Ajax using Target Frame property of lotus notes form

Hint Short Cut: Add this to your code & documentation to help you find this page.
http://www.notesninjas.com/#PseudoAjax or http://www.notesninjas.com/A555F9/nn.nsf/ByAlias/PseudoAjax


A colleague found an existing database that used the seldom used property Target Frame of a Notes Form.

This is not to be confused with the @settargetframe function or setting target='_blank' in an anchor tag.





The trick is to set the target frame property which is below the WebQuerySave property to the name of a frame or iframe.

We used "steve" for no particular reason, though "graham" (Simmons) and "doug" (Tait) were involved.

NB I tried setting this to be a field but it didn't work, disappointingly.

 

Now the result of setting target frame property is that the result of a

@command([FileSave])

or even

@Command([FileSave]);

@Command([FileCloseWindow])

 

in a button (possibly using a WebQuerySave) is to paste the result into a frame or an existing iframe or a new frame.

 

To use an iframe with no borders can create a pseudo ajax effect without a round trip:

<iframe frameborder=0  name="steve"  id="steve" src="" width=200 height=200 ></iframe>

or a tiny 1 pixel high 1 pixel wide iframe would give a silent save (Doug Tait likes this).

 

To put the result into a small pop up window on saving or submitting stick this code into the onsubmit event.

opt='height=550, width=500, menubar=no,statusbar=no,titlebar=no, screenX=200, screenY=100, left=200, top=100, resizable=no,scrollbars=no';
var remote=open(' ,'steve', opt );

(NB if you have an iframe already called Steve this will not work)

If you do not have the onsubmit or an iframe a new window will be created, which might also be useful, but using the onsubmit allows the dimensions to be preset.

Nice Eh?

 

 

 Jump to:     Notes Tips
    Lotus Notes Index 
  Register for Tips
Previous Lotus Notes Tip 
    Next Lotus Notes Tip
Your company logo here?
Adam Foster
Free Cash Making Web Site
Free Revenue Earning Blog Site
 Free Revenue Earning Newsletter Site   
Free Search Pages Free Web stats
Free Contact Us page
Cheap .com domain names
 Need a website or 
   Lotus Notes
  problem solved?
Adam Foster
Beginning Java Web Services by Andre Tost, Henry Andre Bequet, Meeraj Kunnumpurath, Sean Rhody
Web services are no longer a nascent technology in the programming industry; every major software vendor is rolling out web services-related APIs and products. Today Java developers are successfully adopting web services as the latest technology in application development in order to enable...
See at: Amazon.co.uk | Amazon.com |