SitePoint Sponsor

User Tag List

Results 1 to 6 of 6
  1. #1
    .* draziW tnioPetiS *. bronze trophy
    Join Date
    Jun 2004
    Location
    "Then I figure the most good good guy will win."
    Posts
    1,666
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Firebug: Error logging?

    Hi,

    I have a script that submits to a different page... Long story short, I am not able to read the error messages because I go to a new page.

    What can I do to read the JS error messages via Firebug? Is there an easy way to log errors? Or, should I disable the submit via JS?

    I just need to bug test my form, but I can't read the errors quick enough! Lol.

    Tips?

    Thanks!
    Micky

  2. #2
    Non-Member
    Join Date
    Aug 2006
    Location
    Kansas City
    Posts
    98
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Just guessing....

    <form onclick="method(); return false" ...>

    or...

    <form action="method(); return false" ...>

    Forgot which one, it just wont submit the current form.

  3. #3
    Obey the Purebreed trib4lmaniac's Avatar
    Join Date
    Dec 2004
    Location
    Cornwall, UK
    Posts
    594
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I think onsubmit is the attribute you are thinking of.
    HTML Code:
    <form onsubmit="method(); return false">

  4. #4
    .* draziW tnioPetiS *. bronze trophy
    Join Date
    Jun 2004
    Location
    "Then I figure the most good good guy will win."
    Posts
    1,666
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi!

    Good ideas! Thanks.

    I am sure that will do the trick. Hehe.

    Have a great day/night!!!!

    Cheers,
    Micky

  5. #5
    SitePoint Wizard Pepejeria's Avatar
    Join Date
    Jan 2005
    Location
    Too far up north
    Posts
    1,566
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Use the following:
    Code HTML:
    <form onsubmit="return validateForm(this);"></form>

    Then you return false (form is not submitted) in the function if there are errors and true if no errors (form is submitted).

    And about your Firebug question: check out the "Firebug and Logging page".

  6. #6
    .* draziW tnioPetiS *. bronze trophy
    Join Date
    Jun 2004
    Location
    "Then I figure the most good good guy will win."
    Posts
    1,666
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks Pepejeria!


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
  •