Manage Learn to apply best practices and optimize your operations.

Checking for Edit Mode on the web

This tip describes how to check edit mode on the Web.

If you've ever needed to determine actions based on edit/read mode from a web browser here is a really simple function which will tell you the mode.

This is of course only one of many ways in which the check could be achieved, but I came across it today so I thought I'd submit it to the pile :)

The function can be stripped down to the basics:

var form=document.forms[0] var temp=form.method if (temp.toLowerCase()=='post' ){ //do stuff } the rest is just embellished for understanding of why :) function checkMode(){ var form=document.forms[0] //If the method is "get" then we are in read mode //If the method is "post" then we are in edit mode var temp=form.method if (temp.toLowerCase()=='post' ){ //We use toLowerCase because the NS6 browser returns 'Post' - uppercase P alert('Edit Mode') } else { alert('Read Mode') } }

Dig Deeper on Domino Resources - Part 3

Start the conversation

Send me notifications when other members comment.

Please create a username to comment.




  • iSeries tutorials's tutorials provide in-depth information on the iSeries. Our iSeries tutorials address areas you need to know about...

  • V6R1 upgrade planning checklist

    When upgrading to V6R1, make sure your software will be supported, your programs will function and the correct PTFs have been ...

  • Connecting multiple iSeries systems through DDM

    Working with databases over multiple iSeries systems can be simple when remotely connecting logical partitions with distributed ...