Form submission not working

2,853 views
Skip to first unread message

John Holden

unread,
Feb 20, 2018, 4:52:28 AM2/20/18
to Chromium-discuss
I have a web site that fires a javascript to click a button to logout a user. This was working fine until Chrome 64. It works fine in IE11, Edge, and Firefox. Here is the relevant HTML and Javascript:


<button type='submit' id='btn' formmethod='get' formnovalidate style='display:none;'>.</button>

parent.frames['SessionFrame'].document.getElementById('btn').style.display = "inline";
parent.frames['SessionFrame'].document.getElementById('btn').click();

I downloaded version 65 (beta), ran the test with it, and it worked. Ten minutes later, I tried it again, and it failed. Have tried many times since, still failing. I am setting a breakpoint in VS 2017 script code on the first instruction in the server-side script to determine failure/success. I have set both method (get) and action (logout.asp) in the form.


PhistucK

unread,
Feb 20, 2018, 4:54:49 AM2/20/18
to jo...@sbtinc.com, Chromium-discuss
Unless you restarted Chrome in those ten minutes, this sounds like a code issue rather than a browser issue.
Any console error/warning (try to turn on the verbose logging)?


PhistucK

--
--
Chromium Discussion mailing list: chromium...@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-discuss

---
You received this message because you are subscribed to the Google Groups "Chromium-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-discuss+unsubscribe@chromium.org.

John Holden

unread,
Feb 26, 2018, 12:45:03 PM2/26/18
to Chromium-discuss, jo...@sbtinc.com
OK, I've discovered something. If I start Chrome and go to Settings->Advanced->Reset and Reset Chrome, the button click() works. I removed all extensions except Webex, but after Reset, it is disabled. I then restart Chrome and fire the javascript button click() and now it fails. To confirm, I Reset Chrome again, ran the test and it works. Restart Chrome, now it doesn't work. I've spent days working on this problem and from all the Google searches I've done, there are many developers out there having similar problems. I'll bet whatever is causing this is a root cause of all the submit/click/event problems specific to Chrome. BTW, there are no console messages and verbose is on.


PhistucK

To unsubscribe from this group and stop receiving emails from it, send an email to chromium-discu...@chromium.org.

PhistucK

unread,
Feb 26, 2018, 1:00:18 PM2/26/18
to jo...@sbtinc.com, Chromium-discuss
If you can post a URL that reproduces the issue, that would help much in diagnosing it.

You can search crbug.com for an existing issue and star it. If you cannot find one, file a new issue using the "New issue" link on the same page.
Please, do not add a "+1" or "Me too" or "Confirmed" (or similar) comment. It just wastes the time of Chrome engineers and sends unnecessary e-mails to all of the people who starred the issue.

You can reply with a link to the found or created issue and might get triaged (and fixed) faster.

Thank you.



PhistucK

To unsubscribe from this group and stop receiving emails from it, send an email to chromium-discuss+unsubscribe@chromium.org.

John Holden

unread,
Feb 26, 2018, 6:47:29 PM2/26/18
to Chromium-discuss, jo...@sbtinc.com
Unfortunately, the site is a secure site with logon and since the target is a server-side asp script, it wouldn't do you much good to give you access to the client side. The button click just fires a js to run logout.asp on the server. Here is some background info:
1    Site has 12 iframes.   
2.    User logs on
3.    During logon, a page in an iframe is built with form that has logoff info
4.    Top page has onload="windows.addEventListener("beforeunload", Cleanup"
5.    Cleanup function clicks the button to submit the form with the logoff info (method="get" action="logout.asp")
6.    Server-side logoff.asp script hits DB and removes their info.

I tried to build a page for you that shows the problem, but it worked fine, of course. My server is Windows Server 2016 w / IIS 10.0. However in troubleshooting that page and comparing logs to my failing site, I noticed in the IIS logs that when it works:

    I had just Reset Chrome which clears the cache.
    I see "GET"s with my names for pages (ie "/webcas.exe/color_global.asp") 
    I see a "GET" for logout.asp in the log.
    Worked correctly.

When it fails, in the IIS logs:

    I have just restarted Chrome. We should have a cache now.
    I see  "GET" references to my pages but instead of my names, they show "/webcas.exe/#" where the # is a digit (1,2,3). I assume this means it resolved it from the cache.
     I see no entry for logout.asp which means the button click failed for some reason.
    It is not a "Blocked alert" since I have no alert, prompt, or confirm.
    It is not an Extension, so Content Policy should not come into play.

From the IIS logs, it looks like it works when there is no cache and it fails when there is a cache.

John


PhistucK

To unsubscribe from this group and stop receiving emails from it, send an email to chromium-discu...@chromium.org.

PhistucK

unread,
Feb 27, 2018, 12:29:31 AM2/27/18
to jo...@sbtinc.com, Chromium-discuss
Hey

You sent this directly. Hit "Reply to all" instead to send it to the groups so others could benefit or help.



PhistucK

To unsubscribe from this group and stop receiving emails from it, send an email to chromium-discuss+unsubscribe@chromium.org.

Reply all
Reply to author
Forward
0 new messages