Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re: How to make a friendly UI

by thpfft (Chaplain)
on May 03, 2001 at 18:19 UTC ( [id://77657]=note: print w/replies, xml ) Need Help??


in reply to How to make a friendly UI

You have two options, i think.

1. dump data from your script into javascript variables and include javascript code on the page itself that will select from it to update the value of some boxes when other boxes are changed. You get this sometimes on very structured sites where lots of subcategorisation is required. there are no server-side processes after the initial page-building step. You tend to get large pages this way, because of all the permutations that need to be considered, and you'll need a reasonable command of javascript.

2. make repeated cgi calls. if you want to get data from the server based on user input, you have to go through the usual 'send data, receive data' process, and that means you have to refresh the page. If you wanted things to unfold in friendly way then you could do something with frames or pop-up windows, but you face the prospect of building and debugging a system with interdependent javascript, perl and frame targetting. ugly.

Two other considerations i'd like to mention.

Firstly, neither of these approaches will work well without strictly controlled and relatively simple input. perhaps you were just glossing over the details, but this sort of thing will only work reliably with drop-down lists or checkboxes (ie, fields where the values are defined in advance) rather than text fields or textboxes, where typos abound. They also offer onClick or onSelect methods (?terminology?) that are more reliable than onChange, which rather unhelpfully requires you to tab _out_ of the field to trigger the script.

Secondly, what's wrong with refreshing the page? i can see cases where you want to let people choose subcategories on a complex form without hassle, but if the form is that complicated, are you sure you wouldn't be better off building a simpler one? Given that the goal is friendliness, you'll get better results from clear language and consistent behaviour than from gui cleverness. imho.

Replies are listed 'Best First'.
Re: Re: How to make a friendly UI - Thanks
by daveh71 (Novice) on May 03, 2001 at 19:50 UTC
    Thank you all for your comments.

    The user base for the project is fairly small, and controlled, so I have no worries about browser javascript conflicts.
    I would have worries about putting all the infromation into javascript variables, and doing more jscript coding. I think it might slow things down, and speed is a critical factor.
    The push for a more friendly UI is comming from the users that are used to 'filemakerPro' type interaction, where everthing is editable all the time. I've stuck with the web medium because some users will access parts of the information from outside the company, and it seems to be easier to code.
    I have a feeling I will revert back the the 'submit' type form, and try to incorporate a more complex screen layout with frames, so that information viewing can happen at the same time as information viewing.

    Thanks to everyone.<br. david

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://77657]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others surveying the Monastery: (3)
As of 2024-04-19 22:42 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found