Re: Notification of listbox selection change
| From: | Larry Martell | Date: | Wed, 08 Jan 2014 22:17:41 +0000 |
| Subject: | Re: Notification of listbox selection change | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-322651@lists.php.net to get a copy of this message | ||
On Sat, Dec 14, 2013 at 7:00 AM, Tedd Sperling <tedd@sperling.com> wrote:
> On Dec 9, 2013, at 3:40 PM, Larry Martell <larry.martell@gmail.com> wrote:
>
>> Is there any way in php to have a function be called when the value of
>> a listbox selection changes?
>
> Larry:
>
> Sure, take a look at this:
>
> http://php1.net/a/zipcode-states/
>
> Everything except the database is there -- you as you may.
Tedd-
Thanks very much for this. I just got around to trying it, and I
adapted it for my needs and it's basically working. The one issue I
have is that my request returns a complete new page and I want to
replace the existing page with that. The problem is that the request
originates from a frame and when I try and replace the page with the
response the new page get rendered within the frame. Do you know how
to replace the entire page with the response?
I've tried:
document.open();
document.write(response);
document.close();
and:
var newDoc = document.open("text/html", "replace");
newDoc.write(response);
newDoc.close();
But I got the same undesirable results from both.
I realized this is not really a PHP question, but I wanted to continue
this thread here as others could benefit from it.
Thanks!
-larry