To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.publish.htmlOpen lugnet.publish.html in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 Publishing / HTML / 296
295  |  297
Subject: 
Re: Disabling HTML form button if any changes made to an edit box?
Newsgroups: 
lugnet.publish.html
Date: 
Mon, 2 Jun 2003 14:22:46 GMT
Viewed: 
2497 times
  
In lugnet.publish.html, Dan Boger wrote:
On Mon, Jun 02, 2003 at 05:20:56AM +0000, Todd Lehman wrote:
p.s.  The application here is that I want to prevent accidental
posting of messages where the user has forgotten to preview the
message. After Preview is clicked and the preview is displayed, the
Post button should be enabled. But if any changes are made, then the
Post button should be immediately disabled.

why use JS?  just combine the post and preview button to one, and detect
on the server if the data was changed.  If it was, preview, if it
wasn't (matches a CRC in a hidden form element), it posts.

   You don't even need the CRC.  Do what you said on the message edit page about
combining post & preview so that there is only preview, but then on the Message
Preview page remove the whole lower section containing the message edit box,
preview and post buttons.  If the user sees something they need to change they
should use their browser's Back button.  I do it all the time in IE.

Brian H. Nielsen



Message has 2 Replies:
  Re: Disabling HTML form button if any changes made to an edit box?
 
Quoting "Brian H. Nielsen" <70401.2635@compuserve.com>: (...) while that's workable, I like being able to edit while seeing the end result that caused my edit. Meaning if I'm trying to change some formatting, I wouldn't want to have to hit back, to (...) (21 years ago, 2-Jun-03, to lugnet.publish.html)
  Re: Disabling HTML form button if any changes made to an edit box?
 
(...) Except that relying on the browser's Back button is asking for trouble. Say you edit a reply, look at the preview, then go do something else, and when you return, the page is gone from your browser's cache. That would be a nasty surprise. I've (...) (21 years ago, 2-Jun-03, to lugnet.publish.html)

Message is in Reply To:
  Re: Disabling HTML form button if any changes made to an edit box?
 
(...) why use JS? just combine the post and preview button to one, and detect on the server if the data was changed. If it was, preview, if it wasn't (matches a CRC in a hidden form element), it posts. (21 years ago, 2-Jun-03, to lugnet.publish.html)

19 Messages in This Thread:





Entire Thread on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact

This Message and its Replies on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact
    

Custom Search

©2005 LUGNET. All rights reserved. - hosted by steinbruch.info GbR