- This topic is empty.
Viewing 10 posts - 1 through 10 (of 10 total)
Viewing 10 posts - 1 through 10 (of 10 total)
- The forum ‘JavaScript’ is closed to new topics and replies.
The forums ran from 2008-2020 and are now closed and viewable here as an archive.
Home › Forums › JavaScript › Can anyone help why my javascript wont work on codepen
I am new to javascript, and also new to codepen. When I click on browser refresh, it tries to reload, but only the html portion is working. Here is a link to my codepen. Thank you.
From what I can see, the Javascript is loading fine; whenever I enter something in the field and click the button, some data is being shown in the console.
Thank you. That’s encouraging!. But why can’t I see it on my browser. I must have miss something. Do I have to be a codepen PRO to be able to see the data. I will check it out from another computer on the public network, if it works, than it must have something with codepen not allowing the data to display on my browser.
You don’t have to be a PRO member to see the data.
The only place where the data appears though, is the console. Did you try other browsers?
I try firefox and then chrome, nothing got displays on the console.
I suppose the issue is that you can’t make a cross origin Ajax request on Codepen like that…
It’s still totally working for me though. I enter something in the search box, hit the Submit button, and the results show up right away.
It was a syntax error for my url in the ajax function. I had it as “action=openSearch&search=” instead of “action=opensearch&search=”. It is working now.
How odd, @Senff. Even with the right url, I’m still getting errors. Wondering why that isn’t the case with your setup…
I took my code for a review at freecodecamp gitter.im yesterday. Someone pointed out that I had to change the lettercase from openSearch to opensearch. I did that and it starts working. I can see the console display right away.