1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

Chrome shows file, IE10 shows dialog box

Discussion in 'JavaScript' started by chrisj, May 21, 2015.

  1. #1
    In Chrome, and IE8, when this link is selected:
    
    <a href="../upload/[blk1.thumbnail]"><form action="../upload/[blk1.thumbnail]"><input type="image" src="../images/MI.png"></form></a>
    Code (markup):
    the file appears successfully.

    In IE10 and IE9, instead of the file appearing successfully, a dialog box appears asking "Do you want to open or save (the file name) from www.somesite.com? OPEN SAVE CANCEL

    In FF it says "You have chosen to open (the file name) which is application/ocet-stream from www.somesite.com OPEN SAVE CANCEL

    What can I add (or change) so that the file appears, upon selecting the link, in IE10, IE9 and FF? instead of a dialog box appearing?
     
    chrisj, May 21, 2015 IP
  2. PoPSiCLe

    PoPSiCLe Illustrious Member

    Messages:
    4,623
    Likes Received:
    725
    Best Answers:
    152
    Trophy Points:
    470
    #2
    Why the fuck do you have a form inside an a? That's invalid HTML, and there's no point in that form at all - all it has is an image to be clicked - it doesn't DO anything. Redo the code, is my suggestion.
     
    PoPSiCLe, May 21, 2015 IP
  3. chrisj

    chrisj Well-Known Member

    Messages:
    606
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    101
    #3
    Not really helpful
     
    chrisj, May 21, 2015 IP
  4. deathshadow

    deathshadow Acclaimed Member

    Messages:
    9,732
    Likes Received:
    1,998
    Best Answers:
    253
    Trophy Points:
    515
    #4
    PoPSiCle put it more politely than I would; your markup is gibberish -- I'm wondering why the **** it's even a form and why the **** you are using an input instead of an IMG when it's obviously NEITHER. What possible jacktarded reason do you have to be using a FORM there?!?

    <a href="../upload/[blk1.thumbnail]">
    	<img src="../images/MI.png" alt="DESCRIBE THIS!!!">
    </a>
    Code (markup):
    Should be all you need.

    Not sure where you got that markup or how you thought that was valid or made the least bit of sense, but... - wherever you got that from, or whoever made that code needs a good swift kick in the crotch.

    Also not sure why you posted this in JavaScript since there is no reason for ANY of that to even be using scripting, you posted no scripting, and for a simple image open there is no reason to even get scripting involved unless it's for a lightbox type effect, and even that would just be a img inside an anchor, not some jacktard anchor around a form nonsense.
     
    deathshadow, May 21, 2015 IP
  5. chrisj

    chrisj Well-Known Member

    Messages:
    606
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    101
    #5
    Thanks for the deserved thrashing. I appreciate you taking the time to enlighten me (as painful as it might be).
    I've corrected the link and asked a related question here: https://forums.digitalpoint.com/threads/one-site-opens-dialog-box-one-site-does-not.2755197/

    Any additional help will be appreciated.
     
    chrisj, May 22, 2015 IP