Note that there are some explanatory texts on larger screens.

plurals
  1. POJquery being imported but AJAX not working?
    text
    copied!<p>I am making a chrome extension to auto login into the wifi, I use AJAX to do the post request but when I check the network of the pop it no POST request is sent instead, it just shows the popup files being loaded, and a jquery-1.10.1.min.map GET failed. Here is my popup.html:</p> <pre><code>&lt;!doctype html&gt; &lt;html&gt; &lt;head&gt; &lt;title&gt;BCA Auto Login&lt;/title&gt; &lt;script src="jquery.js"&gt;&lt;/script&gt; &lt;script type="text/javascript" src="login.js"&gt;&lt;/script&gt; &lt;style type="text/css"&gt; body{ background-color: #2c3e50; } label{ color:#f1c40f; } &lt;/style&gt; &lt;/head&gt; &lt;body&gt; &lt;form method="POST" id="form"&gt; &lt;label&gt;Enter username &lt;input id="username"&gt; &lt;/label&gt; &lt;br&gt; &lt;label&gt;Enter password &lt;input id="password" type="password"&gt; &lt;/label&gt; &lt;br&gt; &lt;button type="submit" id="button"&gt;Submit&lt;/button&gt; &lt;/form&gt; &lt;/body&gt; &lt;/html&gt; </code></pre> <p>Here is my manifest.json:</p> <pre><code>{ "manifest_version": 2, "name": "BCA Auto Login", "description": "This extension automatically signs you into the BCA wifi", "version": "1.0", "permissions": [ "cookies", "http://*/*", "https://*/*" ], "content_scripts": [{ "matches": ["http://*/*","https://*/*"], "js": ["jquery.js","login.js"], }], "browser_action": { "default_icon": "icon.png", "default_popup": "popup.html" } } </code></pre> <p>And here is my login.js:</p> <pre><code>$('#form').submit(function (event) { event.preventDefault(); var url = 'https://ccahack.bergen.org/auth/perfigo_validate.jsp'; $.ajax({ type : 'POST', url : 'http://whatsmywork.appspot.com/auth/perfigo_validate.jsp', data : { reqFrom: 'perfigo_simple_login.jsp', uri: 'https://ccahack.bergen.org/', cm: 'ws32vklm', userip: 'IP', os: 'MAC_OSX', index: '4', username: 'user', password: 'pass', provider: 'fds', login_submt: 'Continue' } }); }); </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload