Results 1 to 3 of 3

Thread: jquery form to formwizard script : Disable 'next' button

  1. #1
    Join Date
    Aug 2011
    Posts
    5
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Exclamation jquery form to formwizard script : Disable 'next' button

    1) Script Title: jquery form to formwizard script

    2) Script URL (on DD): http://www.dynamicdrive.com/dynamici...formwizard.htm

    3) Describe problem: I have an ajax routine that checks email not in db when user exits email field. This pops an alert but I would like to disable the "next" button on the current section/page until user inputs valid address.
    How would I do this / interface with the formwizard validation routine?
    Any suggestions?
    Or, modifying the formwizard.js, what var should I use to assign an id to the 'next' span on the sections? If they had an id I could interface with that.
    I tried altering the line:

    Code:
    var $paginatediv=$('<div class="formpaginate" style="overflow:hidden;"><span class="prev" style="float:left">Back</span> <span class="status">Step 1 of </span> <span class="next" id="'+ i + '" style="float:right">Next</span></div>')
    But it seems "i" is not the right reference.
    Thanks
    Yaresh

  2. #2
    Join Date
    Aug 2004
    Posts
    10,143
    Thanks
    3
    Thanked 1,008 Times in 993 Posts
    Blog Entries
    16

    Default

    Or, modifying the formwizard.js, what var should I use to assign an id to the 'next' span on the sections? If they had an id I could interface with that.
    Giving the "next" span a unique ID value is simple enough. Just replace the original line you cited above with the below instead:

    Code:
    			var $paginatediv=$('<div class="formpaginate" style="overflow:hidden;"><span class="prev" style="float:left">Back</span> <span class="status">Step 1 of </span> <span class="next" style="float:right" id="'+setting.formid+'_next">Next</span></div>')
    With it the "next" span now carries an ID value of "formid_next", where "formid" is the ID value of your FORM element, such as "feedbackform_next".

    If being able to access the "next" span directly doesn't suffice in accomplishing what you want, take a look at using the onpagechangestart event handler in conjunction.
    DD Admin

  3. The Following User Says Thank You to ddadmin For This Useful Post:

    Yaresh (08-07-2011)

  4. #3
    Join Date
    Aug 2011
    Posts
    5
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default

    Thanks very much for that. Actually I was hoping to assign an unique id to each NEXT span on the form.
    Yaresh

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •