RE: [PHP] control browser with <a href> tag
| From: | Andrés Robinet | Date: | Thu, 27 Dec 2007 15:24:00 +0000 |
| Subject: | RE: [PHP] control browser with <a href> tag | ||
| References: | 1 2 3 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-266296@lists.php.net to get a copy of this message | ||
> -----Original Message-----
> From: Hiep Nguyen [mailto:hnguyen@jadesterling.com]
> Sent: Thursday, December 27, 2007 11:51 AM
> To: php-general@lists.php.net
> Subject: Re: [PHP] control browser with <a href> tag
>
> ""Warren Vail"" <warren@vailtech.net> wrote in message
> news:024801c841a9$a82366f0$1573480a@ds.corp.yahoo.com...
> >> 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?
> >
> > Yes and no, don't think you intend to, but you may be mixing
> technologies.
> > You refer to hyperlinks, etc, which is web technologies and windows,
> which
> > is not unless you use javascript or ajax. With PHP you can cause
> your
> > browser to open a new browser by adding target="_blank" to the
> hyperlink,
> > but you cannot easily disable functionality of the old browser (It's
> still
> > open, just usually covered up by the new browser), and if the user
> clicks
> > your hyperlink again a 3rd browser will be opened. You could name
> your
> > target (target=mypage) which means if the user clicks it a new
> browser
> > will
> > be opened, and if the user clicks the same link again, a 3rd window
> will
> > not
> > be opened, but the page in the "mypage" target will be refreshed.
> >
> > HTH,
> >
> > Warren Vail
>
> after read all your replies, i understand and want to redefine the
> problem.
>
> if user clicks on the hyperlink on list.php page, i want to open a new
> windows for user to update info. once user clicks update on update.php
> page, i want to close the update.php page automatically and refresh
> list.php
> page. i think this is possible. can someone give me suggestions how
> to do
> this?
>
> thanks
Yes, you will need something like this http://www.wildbit.com/labs/modalbox/ or a regular
javascript popup (window.open).
Modalbox is based on prototype and scriptaculous, but there are other lightweight solutions over
there too (someone mentioned jQuery and Thickbox I think, and there's also a Mootools version
called MOOdalbox or something).
This is something you need to program on the client-side (at least most of it), so it's not
about PHP.
Rob
Andrés Robinet | Lead Developer | BESTPLACE CORPORATION
5100 Bayview Drive 206, Royal Lauderdale Landings, Fort Lauderdale, FL 33308 | TEL 954-607-4207 |
FAX 954-337-2695
Email: info@bestplace.net | MSN Chat: best@bestplace.net | SKYPE: bestplace | Web: http://www.bestplace.biz | Web: http://www.seo-diy.com