1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Suggention cancel button in post

Discussion in 'Help with the forum and suggestions' started by gimplay, Nov 29, 2007.

  1. gimplay

    gimplay New Member

    Joined:
    Nov 27, 2007
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    1
    Hi!

    I wonder in that makes sense for you to add a cancel button to POST|PREVIEW...

    Thanks in any case,
    Cheers,

    gpa!
     
  2. El Llama

    El Llama Active Member

    Joined:
    Nov 28, 2007
    Messages:
    1,362
    Likes Received:
    0
    Trophy Points:
    36
    Occupation:
    youtube.com/llamavlog :D
    Location:
    Franklin, Tennessee
    Home Page:
    I think you can just click "Back" or do the little forum jump up on top. Good idea, but not too practical since it would involve rewriting part of the code.
     
  3. yonyonjohn

    yonyonjohn Member

    Joined:
    Dec 6, 2007
    Messages:
    327
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    right behind you
    Home Page:
    It woulden't be that hard to add.

    the javascript would be

    <script language="JavaScript" type="text/javascript">
    function cancelPost() {
    var ask = confirm("Are you sure you want to leave this page?\n\nIf you do, All of your message will be deleted.")
    if (ask) {
    history.go(-1)
    }
    }
    </script>


    and the xhtml would be

    <input type="button" onclick="cancelPost()" value="Cancel" />

    Just insert the javascript inside the <head> tags and put the xhtml right after

    <input type="submit" name="preview" value="Preview" tabindex="4" onclick="return event.ctrlKey || previewPost();" accesskey="p" />

    and before

    </td>

    that would do it.&nbsp; :D
     
  4. Siddharth

    Siddharth Active Member

    Joined:
    Nov 27, 2007
    Messages:
    1,829
    Likes Received:
    0
    Trophy Points:
    36
    Location:
    India
    Home Page:
    nice script bro :)
    the admins will do the rest ;D
     
  5. yonyonjohn

    yonyonjohn Member

    Joined:
    Dec 6, 2007
    Messages:
    327
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    right behind you
    Home Page:
    sweeeet&nbsp; ;D
     
  6. Gimper

    Gimper Member

    Joined:
    Aug 31, 2007
    Messages:
    962
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Sydney
    Home Page:
    hey yonyonjohn, did you write that your self?
    regarding the cancel button i don't think its realy needed, i mean you can always just press back right? if you guys think its important then lets see the votes :D
     
  7. Siddharth

    Siddharth Active Member

    Joined:
    Nov 27, 2007
    Messages:
    1,829
    Likes Received:
    0
    Trophy Points:
    36
    Location:
    India
    Home Page:
    I think not much important
     
  8. yonyonjohn

    yonyonjohn Member

    Joined:
    Dec 6, 2007
    Messages:
    327
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    right behind you
    Home Page:
    I don't think that its needed.
    My back button isn't broken, so I'm all set&nbsp; :D

    @gimper
    yep I wrote it. I'm a web programmer at heart.
     
  9. sglider12

    sglider12 Active Member

    Joined:
    Nov 30, 2007
    Messages:
    3,610
    Likes Received:
    0
    Trophy Points:
    36
    Occupation:
    I work at Best Buy as a Digital Life Sales Associa
    Location:
    Aubrey, Texas
    Home Page:
    Ooh..maybe we should make a poll...just a thought.. :D
     
  10. yonyonjohn

    yonyonjohn Member

    Joined:
    Dec 6, 2007
    Messages:
    327
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    right behind you
    Home Page:
    A poll would be a good idea,
    Ill go make it.
     

Share This Page