SitePoint Sponsor

User Tag List

Results 1 to 7 of 7
  1. #1
    SitePoint Evangelist runeveryday's Avatar
    Join Date
    Jul 2009
    Posts
    437
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    How to write a pop up window function?

    Code:
    $.ajax({
        //....
        success: function() {
        },
    On success I want to pop up a fixed height and width window. There is a closed single locates on the window right angle. I did as the following, but it doesn't work.

    I add a div which has a class named success-tip. I add some style to it and hide it at first. Then I use the following:

    Code:
    $.ajax({
        //....
        success: function() {
            success();
            $('.success-tip').show();    
        },
    It doesn't pop up. What do I need to do to my code? Thanks in advance.

  2. #2
    Unobtrusively zen silver trophybronze trophy
    paul_wilkins's Avatar
    Join Date
    Jan 2007
    Location
    Christchurch, New Zealand
    Posts
    14,687
    Mentioned
    100 Post(s)
    Tagged
    4 Thread(s)
    Quote Originally Posted by runeveryday View Post
    It doesn't pop up. What do I need to do to my code? Thanks in advance.
    Everything should work, based on what you have shown there, so further investigation seems to be needed.
    Can we see a test page from you that demonstrates the problem that you have having?
    Programming Group Advisor
    Reference: JavaScript, Quirksmode Validate: HTML Validation, JSLint
    Car is to Carpet as Java is to JavaScript

  3. #3
    SitePoint Evangelist runeveryday's Avatar
    Join Date
    Jul 2009
    Posts
    437
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by paul_wilkins View Post
    Everything should work, based on what you have shown there, so further investigation seems to be needed.
    Can we see a test page from you that demonstrates the problem that you have having?
    http://www.silkfabricwholesale.com/s...pale-bule.html

  4. #4
    SitePoint Evangelist runeveryday's Avatar
    Join Date
    Jul 2009
    Posts
    437
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by paul_wilkins View Post
    Everything should work, based on what you have shown there, so further investigation seems to be needed.
    Can we see a test page from you that demonstrates the problem that you have having?
    this part.2012-12-18_103732.png

    when i click the send submit button. i receive two emails. i don't know why? the email.php access the passed information of the form, then send to my email box.

    i using jQuery('.success-tip').hide(); but it also not work. why?
    many thanks

  5. #5
    SitePoint Evangelist runeveryday's Avatar
    Join Date
    Jul 2009
    Posts
    437
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    @paul_wilkins, could you help me to see it again?

  6. #6
    Unobtrusively zen silver trophybronze trophy
    paul_wilkins's Avatar
    Join Date
    Jan 2007
    Location
    Christchurch, New Zealand
    Posts
    14,687
    Mentioned
    100 Post(s)
    Tagged
    4 Thread(s)
    Quote Originally Posted by runeveryday View Post
    @paul_wilkins, could you help me to see it again?
    With what you have currently provided, there is not enough information to indicate what's causing the problem.

    Is email.php being called twice? You can check the web browser network diagnostics to determine that.

    If it's not being called twice, then the double email is occuring from somewhere on the server side.
    If it is being called twice, then it's possible that the script issuing an ajax request, and the default behaviour of the form is occurring too.

    In order to work out where you need to investigate, we need more information about what is causing the problem.
    So either you can provide that information to us, or you can provide a test page that demonstrates the problem, so that we can investigate things further.
    Programming Group Advisor
    Reference: JavaScript, Quirksmode Validate: HTML Validation, JSLint
    Car is to Carpet as Java is to JavaScript

  7. #7
    Unobtrusively zen silver trophybronze trophy
    paul_wilkins's Avatar
    Join Date
    Jan 2007
    Location
    Christchurch, New Zealand
    Posts
    14,687
    Mentioned
    100 Post(s)
    Tagged
    4 Thread(s)
    Quote Originally Posted by runeveryday View Post
    @paul_wilkins, could you help me to see it again?
    With what you have currently provided, there is not enough information to indicate what's causing the problem.

    Is email.php being called twice? You can check the web browser network diagnostics to determine that.

    If it's not being called twice, then the double email is occuring from somewhere on the server side.
    If it is being called twice, then it's possible that the script issuing an ajax request, and the default behaviour of the form is occurring too.

    In order to work out where you need to investigate, we need more information about what is causing the problem.
    So either you can provide that information to us, or you can provide a test page that demonstrates the problem, so that we can investigate things further.
    Programming Group Advisor
    Reference: JavaScript, Quirksmode Validate: HTML Validation, JSLint
    Car is to Carpet as Java is to JavaScript


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
  •