> -----Original Message----- > From: Richard Lynch [mailto:ceo@xxxxxxxxx] > Sent: Tuesday, December 18, 2007 11:57 PM > To: Hiep Nguyen > Cc: php-general@xxxxxxxxxxxxx > Subject: Re: control browser with <a href> tag > > > > On Tue, December 18, 2007 12:23 pm, Hiep Nguyen wrote: > > hi friends, > > > > i have two pages: list.php and update.php > > > > list.php will have a hyper link that when click on, it will open a > new > > window for user to update info. once user clicks update button on > > update.php page, i want to close update.php and return to list.php. > > however if user doesn't click update button, i don't want user to go > > back to list.php. in other word, freeze up list.php until user > closes > > or clicks update button on update.php. > > > > is this possible to do with php? > > It's not even possible with a browser and HTTP, whether PHP is in the > picture or not... > > You're describing a desktop application behaviour. > > Stop doing that; You'll just make yourself and your users miserable. > > Write a web application. It's different. > > Don't popup a new window unless you absolutely have to. If I want a > new window, I'll use right-click and do it myself. > > Don't try to "freeze" up the list (you can't anyway) cuz I might want > to look at other things in the list to decide how to correctly update > the original anyway. > > -- > Some people have a "gift" link here. > Know what I want? > I want you to buy a CD from some indie artist. > http://cdbaby.com/from/lynch > Yeah, I get a buck. So? > > -- I agree on the point that you should not try to achieve the behavior "with PHP alone", for the rest of it... I disagree. Why do users have to rethink application behavior? Sure, the web environment is different, there is a clear barrier between client and server... but what do "end users" have to do with all of that? Moreover, why we, developers, have to rethink UI and application design when we switch from desktop to the web? I think we shouldn't... it's only the "legacy stuff" we had to tolerate year after year, once the web became a massive thing. But now things are evolving, do things like Web 2.0, Ajax, Adobe Air, Mono, Silverlight, and the .Net Framework sound familiar to you (yes, the last two are created by the crappy M$ that we all know)? Because as far as I can see, an effort is been made everywhere to shorten the desktop-web distance. Why is CSS, XML and JavaScript so popular these days? We hated them some years ago, didn't we? They help to shorten the distance now, don't they? Yes, browsers are a mess to deal with, but they are not as much of a mess as they where some time ago, and we have some good abstraction layers such as PrototypeJS, JQuery and Mootools; and... at least we have now IE 7, which is a big step forward for M$ (despite being buggy as EVERY BROWSER IS), and Firefox and Opera... or are you going to tell me you still use HTML 3, PHP 3, MySQL 2 and put "This site looks better in Firefox, Get Firefox Now!" buttons in your websites? Have you tried ExtJS or the Yahoo UI?... Why is everyone using this "geeky" stuff?. I believe we should take the desktop-web distance as a "temporary fact" that can be fixed to some extent, and keep that in mind... but THAT'S ALL. We must also be prepared for evolution, listen to the trends, and try a bit with the "new kids on the block"...because evolution will happen, and we'll either be in or out of the "standard"... because the standard will change. All the above sh_t said to Richard (just an opinion, hope you don't take it wrong), this last paragraph is for the original user. I would search in a JavaScript forum for a way to "mask" the existing contents, open a DHTML window on top with a form in it, validate the form (maybe Ajax, maybe only JavaScript, it depends on what you need to validate) and then if it passes the test remove the mask and return to the old contents. Otherwise, for a straightforward solution, that makes use of this "mask thing" give a try to the form components in ExtJS (if you feel like you can handle JavaScript very well... of course). If you don't find your way... then you are not ready and you'd probably better off by creating two pages, so you make the user move from one to the other and back again... so unless the user fills in the correct data, you don't display the original form again, but the "data input" form every time. A last resort, may involve using a regular "pop-up" window, but the only way to make it "truly modal" is in IE for the PC (I think). Happy coding (and read more, so you'll ask better questions ;)) Rob P.S. You'll see no links in this email... but you can use google to find the resources -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php