Results 1 to 3 of 3

Thread: Problem with dialog box in IE

  1. #1
    Join Date
    Jan 2011
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Problem with dialog box in IE

    I have an attachement
    Code:
    <a href="http://mydomain.com/attachment.php?&C=cd80f871f7e8d4dfjz&id=8">CV.docx</a>
    The name of CV.docx in the server is "cd80f871f7e8d4dfjz.docx", the system changed the name when file was uploaded.In attachment.php I get the attachement "Real Name" and "Changed name" from database .
    After that

    PHP Code:
    header("Content-type: application/octet-stream");            
    header("Content-disposition: attachment; filename=$RN");
    $file=file_get_contents("attaches/".$FN);
    echo 
    $file
    Where $RN is the "Real Name".
    And $FN is the Changed Name(Name in the server)

    So when I click on a link a dialog box is displayed with "Open", "Save" and "Cancel" buttons.
    If I save the file it works good.
    But when I try to open the file with IE, this messages occurs

    The file could not be found.
    (C:\...\CV[1].docx\)

    With other browsers this method is works.

  2. #2
    Join Date
    Jan 2011
    Posts
    50
    Thanks
    0
    Thanked 1 Time in 1 Post

    Default

    is it necessary to use IE?..if it works with other browsers, then there's nothing to it i guess..if you really want to use IE, then try using scripts that the browser supports..that way, your page won't be ruined..

  3. #3
    Join Date
    May 2007
    Location
    Boston,ma
    Posts
    2,127
    Thanks
    173
    Thanked 207 Times in 205 Posts

    Default

    Comment out the header lines, and out put the expected variables are the values different between ie and other browsers?

    You also may want to remove the first & from

    ?&C=cd80f871f7e8d4dfjz&id=8
    the & is for additional variables since c is the first one the & is not necessary and could cause some error.

    ?C=cd80f871f7e8d4dfjz&id=8
    Corrections to my coding/thoughts welcome.

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
  •