SitePoint Sponsor

User Tag List

Results 1 to 3 of 3

Thread: Page load issue

  1. #1
    SitePoint Wizard billy_111's Avatar
    Join Date
    Jul 2009
    Posts
    1,683
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Page load issue

    Hey,

    I was wondering if anyone knows why i have a page load issue here: http://www.loumolloy.com/testing2.php

    On page load you will see a popup, if on the popup you click next it should take users to "Step 2" but what happens is that the page reloads and you stat on the same page..

    Any ideas??

    Thanks again
    Software Engineer ASP, ASP.NET, VB, PHP

    Kind regards
    Billy

  2. #2
    Unobtrusively zen silver trophybronze trophy
    paul_wilkins's Avatar
    Join Date
    Jan 2007
    Location
    Christchurch, New Zealand
    Posts
    14,716
    Mentioned
    103 Post(s)
    Tagged
    4 Thread(s)
    That is the default action that is occurring (of submitting the form) that you need to prevent.
    The default action is prevented by returning false to the onclick event.

    Alternatively you should not use a type of submit, and could use a type of button instead.
    Programming Group Advisor
    Reference: JavaScript, Quirksmode Validate: HTML Validation, JSLint
    Car is to Carpet as Java is to JavaScript

  3. #3
    SitePoint Wizard billy_111's Avatar
    Join Date
    Jul 2009
    Posts
    1,683
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks,

    I tried with the return false method and it worked..

    Thanks again
    Software Engineer ASP, ASP.NET, VB, PHP

    Kind regards
    Billy


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
  •