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.

Form problem

Discussion in 'HTML & Website Design' started by mmerlinn, Nov 23, 2021.

  1. #1
    I have code like below on a few of my pages. Every few months someone tells me that nothing happens when he clicks on either button (no focus issue?). Works for most people. Works fine in all browsers I have tested. Have not been able to pin down exactly where and when it fails. Last time user said he was using Chrome, though it has worked in Chrome for me.

    All other code on those pages works fine even when these submits do not work.


    <FORM ACTION = '/catalog/computer.htm' METHOD = 'post' TARGET = '_TOP'>
    <BR>
    <INPUT TYPE = 'submit' VALUE = 'I am a computer'>
    </FORM>

    <FORM ACTION = '/forms/human.htm' METHOD = 'post'>
    <BR>
    <INPUT TYPE = 'submit' VALUE = 'I am human'>
    </FORM>


    What am I missing here?
     
    mmerlinn, Nov 23, 2021 IP
  2. sarahk

    sarahk iTamer Staff

    Messages:
    28,500
    Likes Received:
    4,460
    Best Answers:
    123
    Trophy Points:
    665
    #2
    interesting feedback from codepen.io's "analyze" tool - could those users be using a less flexible browser? I didn't realise double quotes were actually a rule.

    screenshot.jpg
     
    sarahk, Nov 23, 2021 IP
  3. deathshadow

    deathshadow Acclaimed Member

    Messages:
    9,732
    Likes Received:
    1,998
    Best Answers:
    253
    Trophy Points:
    515
    #3
    That's some mighty fine HTML 3.2 you have there... unfortunately that's likely your problem. Some UA's might also choke on those extra "spaces for nothing" around your = signs.

    Though with that rubbish TARGET attribute in there, if there is a parent it could be updating that and not the viewed page. That attribute was deprecated in '98 for a reason, and the fact that it's back in HTML 5 doesn't fix the fact it's an indication of inaccessible junk coding -- in this case probably framesets?
     
    deathshadow, Nov 29, 2021 IP
  4. sarahk

    sarahk iTamer Staff

    Messages:
    28,500
    Likes Received:
    4,460
    Best Answers:
    123
    Trophy Points:
    665
    #4
    They were meant to be there? I thought that was a copy-paste goof.
     
    sarahk, Nov 29, 2021 IP
  5. deathshadow

    deathshadow Acclaimed Member

    Messages:
    9,732
    Likes Received:
    1,998
    Best Answers:
    253
    Trophy Points:
    515
    #5
    It was a practice that in the mid '90's a lot of developers did to try and make the code more "legible". Typically it was the C programmers -- the types who put their { on a line all by itself -- who disliked the idea of so little whitespace.

    It was deprecated / made invalid in 4 strict the same time quotes around attribute values were made mandatory, though most older UA's still support it. I know from experience that all browsers descended from Konqueror -- so Safari and Chrome-likes -- have a buggy implementation of parsing that where it just up and decides not to work willy-nilly. I've never been able to quite figure out the how/why of when it fails, I just know it SOMETIMES does.

    Again, this is why 25 year old markup practices are a BAD idea. Support for them is slowly fading and/or just plan neglected.

    But what do I know? I consider the mere presence of single quotes around attribute values to be an indicator that someone's not qualified to write back-end code... since the know-nothings who insist on using double-quote strings in languages like PHP seem to love vomiting up HTML that way... just so they can use the slow memory wasting inlined variables to avoid going ', variable, ' with single quotes.
     
    deathshadow, Nov 30, 2021 IP
    sarahk likes this.
  6. Hooman Bahreini

    Hooman Bahreini Greenhorn

    Messages:
    8
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    11
    #6
    Have you checked your website to see if there are any JavaScript error on the Page?
     
    Hooman Bahreini, Nov 30, 2021 IP
  7. mmerlinn

    mmerlinn Prominent Member

    Messages:
    3,197
    Likes Received:
    818
    Best Answers:
    7
    Trophy Points:
    320
    #7
    1) Did not know that single quotes would be a problem since it seems to be common that either are correct to avoid double nested quote errors. Recently discovered that square brackets in FoxPro are also legitimate quote delimiters in FoxPro, but not likely anywhere else.

    2) The upper casing is a holdover from my Applesoft and FoxPro programming and did not know it could be a problem.

    3) Ditto for the extra spaces around '=' etc.

    4) Page is a stand alone page and not part of a frameset.

    5) Page was coded about 20 years ago and works well most of the time. Around 10 complaints in 20 years about this problem, so it is not a critical issue.

    6) Current issue is odd since visitor cannot get form to focus in his Chrome browser when he accesses the page from my website, but when I email him the exact same link, it works as expected. I would think that it would always work/fail regardless of source.

    7) There is no javascript to gum things up.

    8) Page is generated by FoxPro so it has not changed in decades.

    That said, I will look into these notes to see if any of them are causing problems. If so, I will change FoxPro to correct them.
     
    mmerlinn, Dec 4, 2021 IP