42 users online (1 members and 41 guests)  

Thread: Right Justify


  Results 1 to 10 of 10
  1. #1
    terPanther's Avatar
    New User

    Status
    Offline
    Join Date
    Feb 2002
    Location
    Greensboro, NC
    Posts
    3

    Right Justify

    Is there any way to make text you type into an Input Text box begin at the right of the box or in the center of the box? I know you can align Table Items to the right, but suppose you have an Input Type=Text as a cell in your table. There seems to be no way to make the Text start typing from the right side of the Text Box no matter what type of alignment you put on the TD tag. I'm wanting the actual text inside the box to align to the right side of the box, not the TD itself. Any suggestions appreciated greatly!

  2. #2
    QuietDean's Avatar
    Administrator

    Status
    Offline
    Join Date
    Oct 2000
    Location
    Bournemouth, UK
    Posts
    2,662

    wow, thats a new one!

    lol. No-one has ever asked this one before.

    First glance, I would say 'no'.

    You could probably 'fake' it by using maybe a padding-left: 10px style in the input tag.
    try that, see if it works, if not, post again.

    Welcome to the forum, by the way!
    If one of our members helps you, please click the icon to add to their reputation!
    No support via email or private message - use the forums!
    Before you ask, have you Searched?

  3. #3
    terPanther's Avatar
    New User

    Status
    Offline
    Join Date
    Feb 2002
    Location
    Greensboro, NC
    Posts
    3

    QuietDean

    Thanks for your Reply, I'll give that a try. I'm very new to Web Page Forms development, but have been programming in Visual Basic for many years. I guess I asked this because in VB, often if I have a list of columns that a user is entering data into, I want all the numbers to line up to the right. Can I do this with the Input Text Box? Can I do some sort of Event programming when they leave the Input Text Box and Right Justify the field with VB Script? I'm still trying to get the hang of Web Pages and what sort of event programming you can do with them. In Visual Basic as I'm sure you know, you can program based on anything from Tabbing through fields to rolling the mouse. I appreciate the help!

  4. #4
    benzden's Avatar
    Senior Member

    Status
    Offline
    Join Date
    Feb 2002
    Location
    San Antonio, Texas
    Posts
    652
    One suggestion to help maintain your sanity on the web for the rest of your internet life:

    KISS

    Remember that web pages are viewed by people all over the world - many with limited browsing skills and slow computers. Don't make the web page, including FORMs interactions, more sophisticated than the visitor coming to it. (That doesn't mean that the "invisible to users" internal web page coding can't be as sophisticated as one wants to make it - just don't let the fancy-schmancy techniques therein visible and thereby confusing to the visitor.)

  5. #5
    terPanther's Avatar
    New User

    Status
    Offline
    Join Date
    Feb 2002
    Location
    Greensboro, NC
    Posts
    3

    Advice

    I appreciate the advice and understand what you are saying. Right now, I'm really trying to do just that. I want to do simple alignment, etc. to make the page look nice. Also trying to do things like populate a description field when the user types in a Code and tabs out of the field. This is more for Data Entry on an Intranet Application than a published Web Page on the www. Maybe I need to look closer at Javascript or XML to do this sort of thing.

  6. #6
    benzden's Avatar
    Senior Member

    Status
    Offline
    Join Date
    Feb 2002
    Location
    San Antonio, Texas
    Posts
    652
    Sounds like you're on your way to getting involved in 'interactive' FORMs; ie., those that minimize the redundancy of typing by the user and change options presented on subsequent choice screens based upon choices made on prior screens. And, saves all that data into an online (confidential) database that eliminates almost all the need for typing on subsequent visits - something that's really user friendly.

    A friend of mine in Washington has paid $50,000 to have professionals set something like that up for her yet to be announced interactive web site. They've been working on it for the past year.

    Good luck - there's a good future in that knowledge base.

  7. #7
    QuietDean's Avatar
    Administrator

    Status
    Offline
    Join Date
    Oct 2000
    Location
    Bournemouth, UK
    Posts
    2,662

    True

    Good words from benzden there.

    The only HTML embedded Event Programming is JavaScript, unfortunately. However, it has it's uses.

    onblur() & onfocus() might be useful for what you are trying to recieve. I think you might be able to knock something up with them, but to be honest, it would probably be quite buggy, and would use an awful lot of cpu resources for the client (for some reason, messing with form inputs is really hard for some browsers to keep up for any length of time).

    The 'interactivity' sounds more promising. To point you in the right direction, look up innerhtml (its outerhtml on netscape ). This is basically accessed through JavaScript, and is a very simple (and efficient) way to update 'static' webpages on the fly.

    An extremely simple example of innerHTML use is here -

    http://conc.somepeople.net

    Basically, onmouseout() and onmouseover() generate html in a <div>.
    If one of our members helps you, please click the icon to add to their reputation!
    No support via email or private message - use the forums!
    Before you ask, have you Searched?

  8. #8
    benzden's Avatar
    Senior Member

    Status
    Offline
    Join Date
    Feb 2002
    Location
    San Antonio, Texas
    Posts
    652
    That reminds of what seems to be the primary problem with FORMs - especially multi-screen FORMs like those involved with interactivity:

    the more screens there are and the longer the wait, the more likely the user is going to lose their connection and/or place during some step in that process - what can really piss some people off and make them go somewhere else for what they want.


    The solution has to be in the 'confidential' online database AND in keeping track of each step in the process so that the user can return to EXACTLY where they left off when disconnect problems arise. That's easy enough to do from page to page but involves much more complexity and "interactivity" with the user's keystrokes within any one page. In other words, something must keep track of each separate <INPUT ...> step in the FORM process BEFORE any page <ACTION ...> commands are executed. It might be easier to just have multiple mini-<ACTION ...> steps, one after each <INPUT ...> item on the page, that the user 'hovers' over or clicks before proceeding to the next step, but, then, I'm not programming this stuff ...

  9. #9
    QuietDean's Avatar
    Administrator

    Status
    Offline
    Join Date
    Oct 2000
    Location
    Bournemouth, UK
    Posts
    2,662

    wow

    Thats some good thoughts there.

    Got me thinking now... after each field you can update to a database...hmmm...onblur() should be able to handle.

    The only problems I foresee are JavaScript (due to 'security', I am not sure submit() can be used that easy) and also cpu usage for the client.

    Still, Its a fantastic idea. I will be looking into that. If I get anywhere, I'll be posting it here!
    If one of our members helps you, please click the icon to add to their reputation!
    No support via email or private message - use the forums!
    Before you ask, have you Searched?

  10. #10
    benzden's Avatar
    Senior Member

    Status
    Offline
    Join Date
    Feb 2002
    Location
    San Antonio, Texas
    Posts
    652
    Look forward to seeing your efforts.



Tags for this Thread