SitePoint Sponsor

User Tag List

Results 1 to 6 of 6

Threaded View

  1. #1
    do righteous deeds
    Join Date
    Aug 2006
    Location
    Türkiye Turkey تركيى
    Posts
    266
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    var re = /[jpg|jpeg]$/

    jpeg or jpg must be selected by the visitors.
    When I select ajaxtabscontent.zip, it displays "jpeg or jpg ". What can I do? Thanks...
    Code:
    <script type="text/javascript">
    function kontrol(){
    var el = document.getElementById('inputfile');
    var re = /[jpg|jpeg]$/
    if(re.test(el.value) ) { alert("jpeg or jpg "); }
    if(!re.test(el.value) ) { alert("not jpeg and jpg "); }
    }
    </script>
    </head>
    <body>
    <form action="giris.php">
    <input type="file"  id="inputfile" name="ad" onkeypress="return false;" onchange="kontrol()">
    </form>
    Last edited by muazzez; Jun 12, 2007 at 06:48.


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
  •