OK. It was suggested, that I need to use JavaScript to confirm the deletion of an object. Can I execute some dtml tags inside of a JavaScript? What I have is this: <script language="JavaScript"> <!-- function confirm_entry() { input_box=confirm("Deleting Document. Are you sure?"); if (input_box==true) { // Output when OK is clicked <dtml-call expr="REQUEST.set('id', getId())"> <dtml-call expr="Documents.deleteDocumentFile(REQUEST, RESPONSE)"> <dtml-return expr="1"> } else { // Output when Cancel is clicked this.form.reset(); } } --> </script> <input type="submit" name="delete" onclick="confirm_entry()" value=" Delete Document " /> <input type="submit" name="cancel" onclick="this.form.reset()" value=" Cancel " /> of course, it doesn't work at all... Stephan
Stephan Goeldi wrote:
OK. It was suggested, that I need to use JavaScript to confirm the deletion of an object.
Can I execute some dtml tags inside of a JavaScript?
Remember, DTML just generates the page returned to the browser... your DTML will have executed before the Javascript is even started ;-) cheers, Chris
On Monday 29 July 2002 14:18, Stephan Goeldi wrote:
OK. It was suggested, that I need to use JavaScript to confirm the deletion of an object.
Umm... No. Why you should use this "JavaScript masturbation"? (sorry, this phrase is taken from ESR essays :) -- no offence. To make yet another one lynx-incompatible site which is *REQUIRED* JavaScript turned on? IMHO, it is much better to use a form in page from you want to delete something: <form action=confirmator method=post>. ...and a method "confirmator" with form you want to use for real delete...: <form action=deleteReally method=post> <input type=hidden value=<dtml-var id> <input type=submit value="Delete"> </form> <form action=index_html method=post> <input type=submit value="Cancel"> </form> ...and a method "deleteReally" where you delete your document forewer, which is actually delete method for any stuff you want and available only for valid users. Yes, user will load three pages, not two. Yes, user will wait for page, if page will be bloated by not needed graphics and banners. Yes, user can "back". But this WILL work on ANY browser what is main goal, I think... P.S. Surely, this example is a _way_, not an implementation! ;-) -- Sincerely yours, Bogdan M. Maryniuck Microsoft is not the answer. Microsoft is the question. NO (or Linux) is the answer. (Taken from a .signature from someone from the UK, source unknown)
Bo M. Maryniuck wrote:
Umm... No. Why you should use this "JavaScript masturbation"? (sorry, this phrase is taken from ESR essays :) -- no offence. To make yet another one lynx-incompatible site which is *REQUIRED* JavaScript turned on?
Bahh ... technology purists ... Let's see ... we have the most popular technology in decades called the web. Where the user has voted with their feets, almost all of them, that they want modern browsers. Ie. they have upgraded to newer versions. And then we should let the use be hampered by accomodating a few Lynx users? I don't get it. It was the same attitude against the browser in the beginning. "I can do nothing in a browser I cannot do with Gopher, only better." The web is about looks and interaction as much as it is about the "hypertext ideal." Practically nobody wants to use Lynx. Get over it ;-) regards Max M -- "Sorry I would Really Like To Help More On This Project, But Am To Busy Doing Paid Work On A Tight Deadline" Max M
On Mon, Jul 29, 2002 at 04:08:53PM +0200, Max M wrote:
Bahh ... technology purists ...
Let's see ... we have the most popular technology in decades called the web. Where the user has voted with their feets, almost all of them, that they want modern browsers. Ie. they have upgraded to newer versions.
And then we should let the use be hampered by accomodating a few Lynx users? I don't get it. It was the same attitude against the browser in the beginning. "I can do nothing in a browser I cannot do with Gopher, only better."
The web is about looks and interaction as much as it is about the "hypertext ideal." Practically nobody wants to use Lynx.
Javascript confirmation popups also have problems with Konqueror. Maybe not all of them, but the ones used in ZCVSFolder do not work correctly. Marius Gedminas -- Un*x admins know what they are doing by definition. -- Bernd Petrovitsch
On Monday 29 July 2002 16:08, Max M wrote:
Bo M. Maryniuck wrote:
Umm... No. Why you should use this "JavaScript masturbation"? (sorry, this phrase is taken from ESR essays :) -- no offence. To make yet another one lynx-incompatible site which is *REQUIRED* JavaScript turned on?
Bahh ... technology purists ... No, technology for any. If we have a solution, which is available only for Mozilla/5.0 Windows; U; Windows NT 5.0; en-US; rv:1.0.0 (BTW it's time to patch your windoze) that solution is terrible.
Let's see ... we have the most popular technology in decades called the web. Where the user has voted with their feets, almost all of them, that they want modern browsers. Ie. they have upgraded to newer versions. Wait a moment. We have not a "modern browsers", but W3C, RFC and ISO's. Can you point me to JavaScript *standard*? JS is SUN Microsystems Trademark, originally called LiteScript. Actually, Microshaft hates SUN and pushes its own Visual BASIC. JS is *optional* stuff and if user wanna use without JS -- he is right. So if you use JS is not bad (anyway better than BASIC :). But if you use ONLY JS complicated solution -- that's lame IMHO.
And then we should let the use be hampered by accomodating a few Lynx users? I don't get it. That's does not matter you get it or not. You should provide compatibility by standards, not by "what the software use my near friends". First, write JS which detects JS availability. Second, turn to the way you have determined. Sure!, if you've build "Home Page of my favorite homepets" -- I guess your provider will not have so much pain with traffic overload. ;-)
It was the same attitude against the browser in the beginning. "I can do nothing in a browser I cannot do with Gopher, only better." You can do all, what is described over http://www.w3c.org
The web is about looks and interaction as much as it is about the "hypertext ideal." Practically nobody wants to use Lynx. FUD. A lot of www.amazon.com users use Lynx.
-- Sincerely yours, Bogdan M. Maryniuck Microsoft Corp., concerned by the growing popularity of the free 32-bit operating system for Intel systems, Linux, has employed a number of top programmers from the underground world of virus development. Bill Gates stated yesterday: "World domination, fast -- it's either us or Linus". Mr. Torvalds was unavailable for comment ... (rjm@swift.eng.ox.ac.uk (Robert Manners), in comp.os.linux.setup)
On Monday 29 July 2002 16:35, Bo M. Maryniuck wrote:
originally called LiteScript. Nuts! called "LiveScript". Sorry...
By the way, if somebody like design a web app, please read this first: http://www.tuxedo.org/~esr/html-hell.html -- Sincerely yours, Bogdan M. Maryniuck And 1.1.81 is officially BugFree(tm), so if you receive any bug-reports on it, you know they are just evil lies." (By Linus Torvalds, Linus.Torvalds@cs.helsinki.fi)
--On Monday, July 29, 2002 4:35 PM +0200 "Bo M. Maryniuck" <b.maryniuk@forbis.lt> wrote:
Can you point me to JavaScript *standard*?
ECMA-262, <URL:http://www.ecma.ch/ecma1/STAND/ECMA-262.HTM>.
But if you use ONLY JS complicated solution -- that's lame IMHO.
I agree. Any page I write that uses JavaScript, I make sure it works without it, too. -- Lance E Sloan Web Services, Univ. of Michigan: Full-service Web and database design, development, and hosting. Specializing in Python & Perl CGIs. http://websvcs.itd.umich.edu/ - "Putting U on the Web"
On Monday 29 July 2002 16:59, Lance E Sloan wrote:
--On Monday, July 29, 2002 4:35 PM +0200 "Bo M. Maryniuck"
<b.maryniuk@forbis.lt> wrote:
Can you point me to JavaScript *standard*?
ECMA-262, <URL:http://www.ecma.ch/ecma1/STAND/ECMA-262.HTM>.
From history: This ECMA Standard is based on several originating technologies, the most well known being JavaScript (Netscape) and JScript (Microsoft). Since I didn't found this standard in w3c.org, I can't clame this "standard". But in anyway thank You to point me to a good document!
I agree. Any page I write that uses JavaScript, I make sure it works without it, too. ...and optionally, try to view on mostly popular browsers: Mozilla, Netscape, Konqueror, Opera, Voyager, Lynx and Links.
P.S. What?! MSIE!?? -- Sincerely yours, Bogdan M. Maryniuck "sic transit discus mundi" (From the System Administrator's Guide, by Lars Wirzenius)
participants (6)
-
Bo M. Maryniuck -
Chris Withers -
Lance E Sloan -
Marius Gedminas -
Max M -
Stephan Goeldi