FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » form & lookup columns
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Re: form & lookup columns [message #172370 is a reply to message #172366] Mon, 14 February 2011 13:06 Go to previous messageGo to previous message
sheldonlg is currently offline  sheldonlg
Messages: 166
Registered: September 2010
Karma:
Senior Member
On 2/14/2011 7:11 AM, Tim Streater wrote:
> In article <ijb1id$bq3$1(at)news(dot)albasani(dot)net>,
> The Natural Philosopher <tnp(at)invalid(dot)invalid> wrote:
>
>> Wolf wrote:
>>> Thanks a lot for your suggestion; have you got some links with
>>> examples of this solution?
>>
>> which one?
>>
>> Iframes - there probably are solutions out there. I dunno.
>>
>> Javascript? its a question of replicating a lot of SQL style stuff in
>> javascript and no I have no examples. Took me long enough to write a
>> much less complex version of this myself.
>>
>> The approach I followed was to have EVERY POSSIBLE screen loaded, and
>> hide everything except the starting point, and unhide the bits that
>> became relevant as selections were made. In my case it was a giant
>> flyout menu system, so my event triggers were onmouseover events. In
>> your case you probably want to use onselect() events or onclick()..
>
> Use ajax as I just posted.
>
>> Really you are building a custom web page without the convenience of
>> form input elements, if you go this route.
>>
>> And RELYING 100% on javascript being enabled.
>
> Of course it will need to be enabled. I'm always amused by people saying
> make your page work without JS.
>
>> However to do this seamlessly without the user actually pressing a
>> button, you will have to use some form of javascript event handler,
>> even if its as crude as an onselect.. to trigger either javsacript
>> driven page reformat, or a partial reload of the page.
>>
>> What iframes allow, is that partial reload into an area of the page
>> without reloading the whole page, which means you can do a mini form
>> submit of a part of a form to allow the server to dish up the clever
>> stuff.
>
> True but see my other post.
>
>> You still have to trigger that somehow, though, and I am not enough of
>> a guru to say whether or not that can happen without some sort of
>> javascript.
>
> "No" is the answer.
>
>> I think the main point to make is that this is a very big task
>> indeed..days if not weeks, of work. Not a quick cut and paste of some
>> crib code.
>>
>> And will require you to acquire some pretty in depth knowledge of bits
>> of javascript, the DOM and the way server and client side languages
>> work, to get it done.
>
> This is all true. It's quite a big task if you don't have much experience.
>

Absolutely AJAX! It is not such a big deal. There are links out there
with sample code to do the send and to process the receive.

For the OP:
It basically works like this:
1 - The selection of the region invokes a JS call.
2 - That call sets up a listener and sends an asynchronous message to
the server where the php file it calls does a db search for the provinces.
That file also creates a message that it sends back to the listener.
3 - The listener receives the message in JS and processes it creating
the proper HTML.

Google for some examples. What I did when I learned it was to set up my
own general purposes modifications from that code I found and now I use
it as a sort or library whenever I need to use AJAX.

Of course what Tim says is quite true. If you are the beginning stages
of programming, it will take a bit to understand the concept of this
kind of programming.

Without JS, just forget it.

--
Shelly
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Stats comp.lang.php (last 7 days)
Next Topic: Curious problem
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Tue Nov 26 04:32:41 GMT 2024

Total time taken to generate the page: 0.03847 seconds