SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Enthusiast freakme619's Avatar
    Join Date
    Aug 2009
    Posts
    30
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Help me guys about javascripting

    Hi guys,

    I'm working as a Web Developer just beginner in this field. Can you help me on how to code a javascript wherein a pop-up window will appear upon submitting the form.

    And how do I trap the email adds, and some embed codes from being inputed in the input box using javascript?

    I'm using PHP as source of my code but I want to include a scripting code on my code as well. And by the way, I'm using MYSQL Database.

    Thanks in advance for any advice.
    I love musics

  2. #2
    SitePoint Evangelist TommiChi's Avatar
    Join Date
    Oct 2008
    Posts
    440
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    >> What you want to do is post the form you your PHP page (you should have attributes such as method="post" and action="mypage.php" in your form tag), and take care of handling the fields in your PHP code
    >> In the form, the submit button should be of type "button", and onclick you can call a function "submitFrom()".
    >> The submitFrom function would look something like this:
    function submitFrom() {
    alert('my text');
    document.getElementById('myForm').submit();
    }
    }

  3. #3
    SitePoint Enthusiast freakme619's Avatar
    Join Date
    Aug 2009
    Posts
    30
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    That's what I'm looking for Tommi, I'm gonna try it, if it works.


    Now, my second problem is that, how do I code using javascript trapping the email adds, embed codes?
    I love musics


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
  •