GIGJ.COM
welcome to my space
X
Welcome to:gigj.com
Search:  
NAVIGATION - HOME

Input field active - setting the focus on page load

Published by: mike 2010-03-18

  • Is there a way to make the input field 'active' as soon as the page opens - whether it's the main form page or just a simple form?

    Tim


  • David's suggestion above was for search forms created by the user (http://www.wrensoft.com/zoom/support/faq_howto.html#searchform) (in HTML).

    An alternative method that would not require a form name (and thus, not require editing the search script) would be the following:
    Particletree » Lightbox Gone Wild!::
    Feb 1, 2006 If you want to switch the focus to the lightbox add this to the displayLightBox function . Is there a way to automatically display a light box on page load? I fixed this with css. Just set the cursor for your text fields. However when you click inside an input box, a flashing cursor
    http://particletree.com/features/lightbox-gone-wild/
    HOME
    Struts-Layout - Improve Struts-Layout : skin configuration::
    error.focus, Set the focus on the first error field. Default is false. numberOfMenusLoaded, Number of menus to load at once in the treeview. autoskip.active, Enable skip to next field when a field maxlength is reached. that can be used by setting the model attribute of the input field tags to "myModel".
    http://struts.improve-technologies.com/configuration.html
    HOME



    For more information on using Javascript with forms, check out this page (http://home.cogeco.ca/~ve3ll/jstutor4.htm) (also try a search on Google).


  • Ray

    Thank you for this line of code and the referral. I will look into converting to this method in the future.


  • I am trying to achieve the same effect as tj, however, I am using .asp. The browser does not default the cursor either, as was suggested by David and although I have tried applying David's solution (in the body of search_template.html file) I do not get a cursor defaulting to the search box ready for users to input their text.

    In the search.asp file the form is not named :-

    Response.Write("") & VbCrlf
    Response.Write(STR_FORM_SEARCHFOR & " ") & VbCrlf

    Any suggestions on how this could be achieved? I have viewed in IE, Netscape 6.1 and Firefox and get the same results with all.


  • I thought I'd try adding the missing form name and apply David's solution to the search_template.html file and hey presto I now have the cursor blinking away in the search input box! (I remembered to use ZoomIndexer to make the change to the search.asp file)

    Response.Write("") & VbCrlf
    Response.Write(STR_FORM_SEARCHFOR & " ") & VbCrlf

    I hope this helps anyone else who has encountered a similar need.


  • The browser will normally do this for you. So it is not normally required.

    However if you want to change the default browser behaviour you need to use some additional Javascript code to do this.

    For the sake of an example, imagine that this was your Zoom search form,






    Then you could use Javascript like this to set the position of the cursor (the focus) by adding an onLoad attribute to the tag.



    --------
    David
    WrenSoft





  • Nortel Unveils Vision, Strategy for Israeli High-Performance Net
    Busy Friday Leads to Strong Close for Net Stocks

  • how much down payment
  • cost of equity
  • getting student loans out of default and credit collection questions
  • mutual fund holdings data
  • optimum working hours days
  • buying property as a group in new york city
  • theoretical net worth
  • federal contracts
  • avoiding or reducing capital gains tax
  • need online or local bay area training in keeping corporate legal records
  • accceptance of american express worldwide compared to visa and mastercard
  • financial ratios
  • business assignment
  • free information about historical
  •  
  • network marketing newsgroups
  • oil gas need financing expert
  • all time high and all time low stock prices
  • r d 39 s impact to a company 39 s bottom line
  • joe 39 s net value increase
  • owning 2 homes relocation and taxes in nc
  • uk magazine printing prices
  • cfo 39 s of largest publishing companies
  • calculating interest rate
  • web services for financial information
  • leaving a business partnership
  • were and how to buy escorpio to import in mexico
  • business forms
  • #If you have any other info about this subject , Please add it free.#
    Your name:
    E-mail:
    Telphone:

    Your comments:


    If you have any other info about Input field active - setting the focus on page load , Please add it free.
    About us |Contact us |Advertisement |Site map |Exchange links
    Copyright© 2008gigj.com All Rights Reserved