Javascript working in Chrome, but not IE11 [closed] - javascript

Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 6 years ago.
Improve this question
Using the following code in IE:
function clearfields()
{
billing_phone.value="";
billing_email.value="";
billing_first_name.value="";
billing_last_name.value="";
} window.onload = clearfields
Working in Chrome, Firefox but not IE11. Console in IE says "'billing_phone' is undefined", but the billing_phone is definitely defined. Onload problem? I'm using this in Wordpress, so that should probably be taken into account.

You should be referencing the element correctly.
It is either by id="billing_phone"
document.getElementById("billing_phone").value="";
or by name="billing_phone"
document.formName.billing_phone="";
or
document.getElementById("formId").billing_phone.value="";

Related

Chrome inline extension installation error [closed]

Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 5 years ago.
Improve this question
I am getting following error when i try to install Chrome extension:
extensions::webstore:34 Uncaught Chrome Web Store installations can only be started by the top frame.
I think the error is pretty self-explanatory.
The code you're using to initiate chrome.webstore.install() is running in a document that's not the top one (i.e. is an iframe inside another document).
This is not allowed. It has to be a top document for inline installation to start.

Jquery click event is not getting fired up [closed]

Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 5 years ago.
Improve this question
Here is the js code which does'nt work :
$('#change-priority-modal').find('.btn-primary').unbind().on("click", function () { //my_func_body }
However the same works with developer console.
Any help appreciated.
The problem was that the click function needed to be in success block of the ajax call of the parent click function. Thanks a tonne for everyone who helped.

XMLHttpRequest in Edge (responseURL property) [closed]

Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 6 years ago.
Improve this question
Basically I use the responseURL variable that XMLHttpRequest's give back. The problem is for some reason my code wasn't working on Microsoft Edge, but it was on Chrome/Firefox.
You will also notice that the responseURL property isn't in the Edge docs,
https://msdn.microsoft.com/en-us/library/ms535874(v=vs.85).aspx
but is in the Mozilla docs
https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest?redirectlocale=en-US&redirectslug=DOM%2FXMLHttpRequest
Is the responseURL property not available on Microsoft Edge? If so, are there any alternatives I can use?

Unable to getElementById on one specific site [closed]

Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 8 years ago.
Improve this question
Working on creating an auto-login app, but I'm running into a problem on the following site:
https://www.navient.com/loan-customers/
Site Element
<input type="text" id="lblUserId" value .../>
Console Code
document.getElementById('lblUserId').value = 'testUserName';
Error Message
Any ideas why this isn't working? I've tried it on several other sites and it works perfectly.
Thanks ya'll!
the site uses frames. switch above console "top frame" to "ctl16_frlogin"

Chrome 38 Extension - history.pushState [closed]

Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 8 years ago.
Improve this question
history.pushState is causing my extension to crash since update 38. Is there a new way to do this or is this a bug ?
Any crash is a bug. Please file an issue at crbug.com/new, including a crash ID if possible, and follow up here with a link to the bug.

Categories