Questions tagged [javascript]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
-1
votes
1answer
194 views

pset 8: infoWindow is not being updated

guys, The problem I am facing is that after I have created all the markers every time I click on them I see all the same links in infoWindow. Why is it happening? Everything seems to be written just ...
0
votes
1answer
23 views

PSet8; Why am I getting this error in my Gedit?

Just like all the psets before starting pset8 I started to practice some examples from a book, the first program I wrote is giving me this error on my editor but yet the code is running can anyone ...
1
vote
1answer
98 views

Why are functions defined where a parameter should go?

I am working on pset8 now, and I am looking at the Google Maps API. In many examples, I find that functions are defined in a way that is really strange to me. google.maps.event.addListener(marker, '...
0
votes
1answer
386 views

Why do we always use anonymous functions in javascript?

I don't understand why do we always use anonymous functions in javascript when we want to execute some code? I know it might sound like a weird question but I am used to C programming and even PHP is ...
1
vote
1answer
789 views

How to edit HTML label text and apply CSS using Javascript?

I'm working on This Problem on the first studio of module 8 in CS50x. Basically I just want edit that label and apply the CSS with Javascript if an error is encountered, but I don't know enough about ...
1
vote
1answer
340 views

pset8 infoWindow appearing with wrong marker

I have everything working with addMarker() except for the fact that the infoWindow pops up in the wrong spot, as in the last marker that was loaded. I found the link below which seems relevant and the ...
0
votes
1answer
274 views

Objects in javascript

I'm somewhat stuck at pset 8... not really "stuck" stuck as so far my code is working the way it should, but seeing how I am a bit confused in how objects work, I guess I must have been lucky (or ofc ...
0
votes
1answer
93 views

change icon of marker problem in mashup

In add marker function i added the code and all the marker are getting displayed. So i thought lets change the default image of the marker so i added two line //image line 1 and 2 ... please see ...
1
vote
1answer
76 views

jQuery syntax help

In looking through the source code and through examples online, I keep coming across something like: $.getJSON("test.php", parameters) .done(function (data) { // code for success }) While I can ...
0
votes
1answer
476 views

pset8 - addMarker/showInfo - Uncaught TypeError: Cannot assign to read only property 'gm_bindings_'

It seems like I am really close to finishing my implementation of addMarker. I'm using markers with labels, I've got the articles loaded into an JSON object, and I've created the content to pass to ...
-2
votes
1answer
779 views

PSET8 addMarker

I can't seem to get addMarker in the Javascript file to work. My search.php seems to work, if I use soem of the test url's...various json objects are produced. This is my addMarker code..anyone have ...
1
vote
1answer
354 views

Javascript Timer- Start when Typing Detected

I want to make a js timer that starts when typing is detected in a certain html input box. The timer does not need to be displayed on the webpage, or need to be in js. Preferably it should record in ...
1
vote
1answer
44 views

How to Redirect Only When a User Clicks Ok on a Popup?

I want a JS popup to appear after something is successfully completed. How do I make it appear, and disappear only when the user closes it, then redirect to the next page? By the way this is in a php ...
2
votes
1answer
75 views

Pset7 How to Program Popup?

I'm trying to create a popup after a user successfully sells a stock. I want it to look like Chrome's confirm form resubmission popup I'm pretty sure I need javascript, html, and css, but I'm not ...
0
votes
1answer
338 views

to what extent does CS50 teach the different languages? [closed]

There are many languages taught in CS50. javascript, css, html, c, [tag: PHP], etc. To what extent are they taught? Can I make my own websites after CS50 ? To what extend do I have to learn these ...
0
votes
1answer
41 views

How does Canvas data URL WORKS?

Working with HTML5 I came across CANVAS API. So first suppose I draw or render a picture on CANVAS in HTML5 and with little bit JS we get a dataURL of our files which may be used as a permalink across ...
0
votes
3answers
142 views

What is markup language?

I'm little confused with html, it is said as markup language but what exactly a markup language is and how it is different from programming language and scripting languages. Does it need to be ...
0
votes
2answers
2k views

$.getJSON in PSET8 mashup's addMarker function in scripts.js

I am attempting to retrieve the array containing news articles for my marker infoWindow in the addMarker function using the following code snippet: var parameter{ geo: place.postal_code } $....
3
votes
1answer
63 views

Google Earth frame is displayed in front of javascript alerts

When I click start engine in the right rail of the application, an alert is displayed behind the Google Earth frame of the Harvard Yard. I cannot click on any items that are displayed on this alert, ...
1
vote
0answers
59 views

Google Earth plugin becomes blank when debug tool is opened to view console

I'm working on pset8 on a Windows 7 machine with plenty of resources. When I open up the JavaScript Debugger in Chrome to interact with the console, the Harvard Yard displayed in Google Earth goes ...
0
votes
2answers
8k views

How to create an HTML button linked to a drop-down menu

I am trying to create an HTML button that allows the user to select an option to submit. My code does indeed create a button with an embedded drop-down menu, but when the user tries to select a ...
0
votes
1answer
70 views

Error when I give a passenger a seat

This is how I am giving a passenger a seat shuttle.seats[i].name = PASSENGERS[i].name; // i is the index you know shuttle.seats[i].house = PASSENGERS[i].house; but it gives me the error ...
4
votes
1answer
3k views

Accessing information from PHPmyadmin using Javscript

I am currently working on my final project and trying to add markers to my Google map using information from a MySQL table. I called this table ideas and the table contains info such as the longitude ...
0
votes
1answer
932 views

Is window.location.href not enough to get the current url?

In service.js, it employs the follwoing code to get the current url var url = window.location.href.substring(0, (window.location.href.lastIndexOf("/")) + 1); many javascript tutorials on the web ...
1
vote
2answers
123 views

How can I compare the .js files to check if passengers are freshmen?

In pset 8, to check if a passenger is allowed to take the shuttle I must check if the passenger's house (https://shuttle.cs50.net/js/passengers.js) is in the HOUSES array (https://shuttle.cs50.net/js/...
1
vote
1answer
29 views

JS/HTML automatic reloads

I'm using Javascript/HTML/CSS to create a web tool for my final project. The way my page is set up, I have information in a div element on the left side of the page, and an input table on the right ...
2
votes
4answers
303 views

How to use inspect Element to view HTML and CSS of a website?

I was trying to view the html source code or css used in timeslide theme used on blogger.com. I cannot find out what CSS is used for that expansion effect that we click on a time stamp and the topic ...

1
2