Questions tagged [javascript]
The javascript tag has no usage guidance.
78
questions
0
votes
1
answer
11
views
Trivia Lab 8 Week 8 - Issues with Free Answer Question
My "Check Answer" button doesn't work for the free response question. I followed the "Not sure how to solve?" video so there might be have been a problem while copying it over.
...
-1
votes
0
answers
13
views
Razorpay magic checkout function not found
I am trying to integrate Razorpay Magic Checkout (Hard Code) Razorpay Documentation onto our Wix website. For that please check these files and pages on my website:
https://mynachiketa.com/razorpay ...
0
votes
0
answers
6
views
CS50W Mail sent email not showing
I have tried sending the mail and the console of the Chrome DevTools has shown "Email sent successfully" but it is not reflecting in the mailbox.
This is function for loading the mailbox;
// ...
0
votes
3
answers
107
views
Problem in using API link in fetch command for AJAX
I'm in CS50w, lecture 5 (JavaScript)
I have a problem in lecture 5(JavaScript) time: 1:34:40.
Brian said using http://api.exchangeratesapi.io/latest?base=USD in code below:
<!DOCTYPE html>
<...
0
votes
1
answer
693
views
Flask Filter Search/List in Python
I created a country list on the python search page section, the data is sent to the Html table with jinja syntax “ The Html table also has a JavaScript function it functions correctly no help with ...
0
votes
1
answer
111
views
Trivia | Uncaught TypeError: correct.addEventListner is not a function
Inside the script tag there was a error:
Uncaught TypeError: correct.addEventListner is not a function
at HTMLDocument. (index.html:14)
Please help me fix it here's the code:
var correct = document....
0
votes
1
answer
3k
views
How to fix if statements within event listeners in Javascript
I'm struggling to spot the error in my javascript code in pset8. Specifically the code doesn't execute as I'd expect when using an if statement within an event listener.
I've tried talking to the duck,...
0
votes
1
answer
2k
views
Calling a javascript function from flask
For my final project, I am creating a flask web mapping application, which with user input displays different things on a map.
At the moment, when they input a place name via a form, my python ...
0
votes
1
answer
1k
views
Mail CS50 Web - How to Send Email (API not working)
I'm very new to Javascript and working on mail, project 3 for CS50 web.
I've been working on just sending the email initially, for about a week and I'm getting very discouraged. I can't seem to get ...
0
votes
1
answer
439
views
CS50W Project 4 / Network - like counter not always saving to database
I was able to implement a like counter where it keeps track of all the likes. For some reason though, it randomly doesn't save the counter to the database when I submit the PUT request. I can't figure ...
0
votes
1
answer
35
views
Finance - trouble implementing javascript
I am trying to set up my index page so that each stock in the user's portfolio has buttons to buy and sell said stock.
The first step is working so far. Each row in the index table has buy and sell ...
0
votes
1
answer
608
views
CS50w / Project 3 - Mail / Inbox showing duplicates
I'm currently on Project 3 in CS50 Web and pretty much completed it. However, there seems to be a bug in unarchiving emails. Whenever I click the unarchive button and it reloads the Inbox, there seems ...
0
votes
1
answer
61
views
how to autofit a webpage to any screen size
I am pursuing web track for pset8. I am using fixed number instead of percentages for size of each element.
How can I make sure that the webpage can fit to all screen / window sizes without getting ...
0
votes
0
answers
29
views
Final Project: dynamic page creation to show just 10 SQL entries per page
I'm developing a web-page for my CS50's Final Project for contacting japanese students around Argentina. The only official japanese exam takes place in Buenos Aires, and there are no many good places ...
0
votes
0
answers
64
views
can't fetch value from frontend..... "document.querySelector('#text').value;" not working
<html>
<head>
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/socket.io/2.3.0/socket.io.js"></script>
<script src="http://ajax.googleapis....
0
votes
0
answers
194
views
PSET8 CS50 Finance: /Check fails to run, does not catch or notify of duplicate usernames
I have been struggling with the check function in PSET8 for a few weeks now, and have run into various problems as I tried to work through my issues.
Currently, it seems by check .get function does ...
0
votes
1
answer
21
views
Stuck on custom validation
I am trying to do the check part of the assignment in Finance via Bootstrap validation but I am failing miserably trying to understand how it works at all.
https://getbootstrap.com/docs/4.1/components/...
0
votes
0
answers
27
views
Very Basic JS Troubles!
I don't know why this is proving so difficult but over two hours of googling has not solved my problem!
My code is below. I have create a very simple set of mutually exclusive radio buttons. What I ...
0
votes
1
answer
85
views
javascript not running in pset7 survey
I finished form in html.
I wrote script below form in script in body. It is not having any syntax errors (hopefully). entire script is a single function called validate() which returns true or false ...
0
votes
1
answer
107
views
cs50web socketio : broadcast does not include the sender
I work on ubuntu 18.04. I set up a virtual environment so that I am sure to work with python3 according to the instructions found here:https://vitux.com/install-python3-on-ubuntu-and-set-up-a-virtual-...
0
votes
1
answer
158
views
pset7 survey - for loop to give alerts not working properly, why not?
I can't figure out what's wrong with my for loop, written in Javascript. It isn't functioning as needed.
1- It only sometimes gives the javascript alert message saying "Please make sure you have ...
0
votes
1
answer
734
views
CS50 Pset8 Finance /check - TypeError: The view function did not return a valid response
I've got most of finance working but I can't for the life of me sort out /check.
No matter what I do, I get the error:
'TypeError: The view function did not return a valid response. The function ...
2
votes
1
answer
453
views
CS50 Finance: Register unique username (/check) problem: pythion GET function not working
I am working on the new /check additional on the Finance problem. I am trying to prevent the register form from being submitted when the username is already taken, is empty, or is just one character. ...
0
votes
0
answers
94
views
Issue with CS50W's Project2 - submitted text not passed to chat window
I have a problem regarding passing posted messages into the proper field and presenting them to the user. The app is supposed to transfer the text submitted in "messenger" into the "messages" so to ...
2
votes
1
answer
347
views
How to integrate handlebars(written in raw javascript) into django templates
Please, I'm still rather new to handlebars templating, my handlebars template works perfectly with just html files, but when I try to render the page containing the handlebars template, I get all sort ...
0
votes
1
answer
35
views
Mashup: javascript variable doesn't retain value
I am trying to implement addMarkers function and calling "/articles" endpoint to get JSON data. However, while creating infoWindow javascript variable loses value.
function addMarker(place)
{
var ...
0
votes
1
answer
89
views
Final Project: Using data in SQL to modify HTML of web page?
I am not sure if this is the right place to ask for help with my final project or if I should use a more general programming forum, but hopefully you guys can help me out.
How do you modify the HTML ...
0
votes
1
answer
1k
views
Access just the text from a db.execute return
Evening all.
I am working on my final project and have a question about db.execute.
When I run my SQL search the return always has the format {"key": value}. Is there any way to then extract the ...
0
votes
1
answer
24
views
PSET8 invalid sw.
When I am trying to use the search bar, the autofill just gives me " , , " and when I click on that suggestion the console tells me "invalid sw".
After reasearching the problem a bit, everyone seems ...
0
votes
1
answer
34
views
What is the purpose of using anonymous functions within other functions?
What is the purpose of putting addMarketMethod() within an anonymous function in this example?
function drop() {
for (var i =0; i < markerArray.length; i++) {
setTimeout(function() {
...
0
votes
1
answer
38
views
Javascript 'Undefined' Variable
I am trying to import values for coordinates using getJson however the map doesn't load now and if I try to print the coordinates in an alert box for testing purposes, it says 'undefined'.
// get ...
0
votes
1
answer
1k
views
Send Variable from Javascript to Flask Application
In a Javascript file scripts.js, how do you send a variable called place which contains information about a place (e.g. name, location, rating) to a Flask Python application.py.
0
votes
1
answer
862
views
Google Maps Places API Code Not Running - Final Project
I am quite far into my final project and needed either a database or software which would return places when given a keyword and an area as input. E.g. Restaurants in London.
I tried using the ...
0
votes
0
answers
37
views
Map not appearing
I implemented the configure() function. It worked for a few days but after that the map did not appear. There is only the search textbox which also doesn't work now. When I check the javascript ...
0
votes
1
answer
298
views
pset8 2018 mashup search
I have changed nothing in the pset8 distribution code and only implemented search function and formatted configure in script.js, but no suggestion shows up from the search box 'q'.
This worked ...
1
vote
1
answer
43
views
What purpose does "eventData" serve in the pset8 source code "$("#q").focus(function(eventData)"?
I have read the jQuery documentation on .focus() as per the pset8 instructions. However, I still do not fully understand the code below:
// hide info window when text box has focus
$("#q").focus(...
0
votes
1
answer
40
views
JS Dropdown in final project
My final project is a conversion website. I am trying to make a dropdown menu that when you click one of the options in the DD, you are taken to another page. When I put in the following code (from ...
0
votes
1
answer
90
views
How to get info from an asynchronous javascript function into html - help with callback function
For my final project, I am accessing an API, and I want to display data from that API in a web-page (the API provides data on forecast electricity generation from solar PV in the UK, it's provided by ...
1
vote
1
answer
336
views
How do I cluster markers on a googlemap?
For my final project I'm creating a google map web app - building from what we learned in Pset8.
I've got over 1,000 locations to add to my map - which looks pretty crowded, as you can see:
I'm ...
0
votes
1
answer
60
views
Don't understand why a function accessing an API is not returning a response
I'd appreciate some help with something I'm working on for my final project.
I'm trying to create a web-app based on what we had to do for Pset8 - creating a google map that updates with information ...
0
votes
1
answer
410
views
pset8 addMarker - unable to display contents of JSON inside info window
I'm struggling with this part of Pset8. I've written the code to add markers to my map, and to create an info window that opens when I click the marker. I can get a string of content into the window ...
0
votes
1
answer
407
views
Final Project Search Suggestions
I'm currently working on my final project, a website. I'm trying to include a search suggestion box (typeahead), similar to that of pset8's. I tried to implement it similar to pset8's, but for some ...
1
vote
1
answer
316
views
CS50 Final Project: Dropdown Menu / Typeaheads
For my final project (a website where people can write diaries and read others' diaries), I am trying to implementing a search box where the user may search usernames to read others' diaries, so I ...
0
votes
1
answer
30
views
CS50 Final Project: Enabling a form button
So in a separate html form, I created a textarea (id: blog) and a button (id: final). I would like to disable that button when the length of the textarea is below 500, and enable it when such a length ...
1
vote
0
answers
57
views
how can we step through pset8 in debug mode?
So when I run my code in flask I get no infowindows. I wondered what this does in the distribution code:
// open info window (if not already open)
info.open(map, marker);
How can I debug in ...
1
vote
1
answer
224
views
CS50 Pset8: Final Questions before Wrap-Up
After pulling multiple allnighters I have finally submitted my last problem set before turning to the final project. I hope someone can shed some light on my last questions in regard to problem set 8 ...
2
votes
1
answer
370
views
CS50 Pset8: Info Window Not Showing
I have been working on addMarker() from scripts.js and was stuck at the second half of the prompt. My markers and labels are showing perfectly, however, the info windows are not popping up when I ...
0
votes
1
answer
189
views
Pset8 addMarker Help Needed (search textbox also not working)
I'm trying to do addMarker() on Problem Set 8. I've got one marker showing on the map with a label, but that's it. I can't figure out how to show all of the markers that should go on the map at a ...
0
votes
1
answer
32
views
question on Week 10's video lecture
question on Week 10's lecture at 1:10:49 or so where he runs ajax0.html, correct? Then he goes into his webpage and types in his IP address with :8080/quote?symbol=NFLX and it pops out that script ...
0
votes
1
answer
859
views
CS50 Mashup: addMarker clarification
Been struggling with pset8 for a few days now. I've many problems here but I guess the main one is I'm not seeing my markers properly, not to mention that the infoWindow isn't happening...
I've some ...