Confirm box

Discussion in 'JavaScript' started by CloudyVideos, Nov 11, 2013.

  1. #1
    Hey,
    Not sure if this is the right place but I think it's close enough... I need some quick help hopefully someone here could direct me to the right place...
    I'm looking to change the default browser 'Yes' 'No' box when asking if to delete a file
    and to put something designed instead...

    How do I do that? anyone got a tutorial I could follow up?
    Thanks in advance
     
    CloudyVideos, Nov 11, 2013 IP
  2. sarahk

    sarahk iTamer Staff

    Messages:
    28,830
    Likes Received:
    4,541
    Best Answers:
    123
    Trophy Points:
    665
    #2
    You only have a limited ability to change the alert box - if you need it to be fancier you'll need to popup a new window. How you do that will depend on what javascript library you are already using (jquery, prototype etc). Let us know and we'll be able to give more info.
     
    sarahk, Nov 11, 2013 IP
  3. CloudyVideos

    CloudyVideos Member

    Messages:
    33
    Likes Received:
    5
    Best Answers:
    1
    Trophy Points:
    35
    #3
    Thanks for the quick help,
    I am using jQuery this is the function that call out the alert box I changed it to be more readable since its all dynamic and changes with file name

    <a href="?op=my_files/file" onClick="return confirm('delete file')"><img src="images/delimg.png" title="delete"></a>
     
    CloudyVideos, Nov 11, 2013 IP
  4. sarahk

    sarahk iTamer Staff

    Messages:
    28,830
    Likes Received:
    4,541
    Best Answers:
    123
    Trophy Points:
    665
    #4
    sarahk, Nov 11, 2013 IP
  5. CloudyVideos

    CloudyVideos Member

    Messages:
    33
    Likes Received:
    5
    Best Answers:
    1
    Trophy Points:
    35
    #5
    Thank you very much @sarahk, i'll look into it :)
     
    CloudyVideos, Nov 11, 2013 IP