Obtaining User Interests Using Facebooks API?
Apr 6, 2011
I'm playing around with the facebook API with very limited knowledge of JavaScript, and I was wondering how I could use the FB social graph to extract user interests and display it on my site. I have the authentication set up, but I'm not sure how I would retrieve the interests, which is a JSON array.
Here's my code so far
FB.api('/me', function(user) {
if(user != null) {
//create image variable and getting image
[code]....
I'm not sure how I would get the movies and display the information- I know what I did isn't right since "movies" is an array...
View 1 Replies
ADVERTISEMENT
Sep 9, 2011
The page will display brief instructions followed by a table containing the quiz.The first is with the Score() function which reads as follows:
function Score(){
for(i=1;i<=10;i++)
if(ans[i]== yourAns[i])
[code]....
Now unless I'm mistaken (which I am since the score isn't being tabulated correctly) this function essentially uses a for to cycle through both arrays, comparing the user's input against the array containing the right answers. If the contents within index i are the same on both arrays the score increases by one point. Once it cycles through the arrays, it passes score over to prequiz.score.value which will later pass this number to the text box that will display the grade to the user.
Thinking it was the setAnsArray(question, answer) function I added a document.writeline to it. However it showed that the values were being passed correctly to the answer array. Added a document.writeline to the Score() function. Unlike the point above, score always displays as 00000 regardless of how many right answers I provide.
The second issue I'm having is that the reset button is not working correctly. If I hit reset and answer the first question, the score will come back as double the score displayed before.
<?xml version="1.0" encoding= "utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
[code]....
View 10 Replies
View Related
Mar 13, 2006
I need to use javascript and get the current url which is being used in
firefox and pass it on to another script. Can someone help me out with
it? Plz pass on the required code if u do have it.
View 1 Replies
View Related
Jul 23, 2005
Is there anyway to obtain the width of the scrollbar? I've tried
var sb = document.body.offsetWidth-document.body.clientWidth ;
but this does not appear to be correct.
View 3 Replies
View Related
Apr 12, 2006
My HTML is shown in an iframe. There is a link in the HTML that needs
the ID of the iframe to be used in the onclick event. How do I get it?
I tried accessing the target property, but it turns out to be
undefined. Also I do not know the frame number in the parent's frame
collection. SO I cannot do parent.frames[2].id.
View 1 Replies
View Related
Dec 6, 2006
I just wanted to know if there was any way to use script to display a
list of methods linked to a particular object? The object I have in
mind is getBrowser(), and I can't seem to find any documentation online
with regards to it's methods.
Also, as I am learning, it would be nice to be able to know what
methods are available for a particular object/function, without
necessarily having to spend a while looking up an object's method when
it's documented in a lot of different places, but only vaguely.
View 8 Replies
View Related
Mar 23, 2010
i've been trying to figure the best method to achieve obtaining siblings between specific selectors. Let me be concrete with an example:
...
<tr class="rowTypeA">
...
[code]....
View 4 Replies
View Related
Mar 29, 2004
I have the following html code:
Code:
<form name="temp" method="get">
<select name="name"
<option value="10"selected>10</option>
<option value="25">25</option>
<option value="50">50</option>
</select>
</form
when a change in selection is made, I would like to obtain the form element in the f() function.
I know that it can be done using the form name or index.
I am looking for a way to do it via the <select> element itself.
Something along the line of:
Code:
is this possible? a browser compatible method is prefered
View 1 Replies
View Related
Jul 24, 2010
I'm creating an AJAX user validation so that when a user types in a username, it checks it in the database to see if it exists. I want it to execute after the user finishes typing. I've tried using:
$("#username_field").keyup(function(){
which works, but I don't want a query executed every time the users presses a key. I was wondering if there was a better way to do it. Meaning I what the check to be preformed after the user finishes typing.
View 5 Replies
View Related
Oct 14, 2011
is it possible to track whether user is typing in the browser's address bar or aside google search box ( which appears in most of the browsers besides address bar)? if yes, I would like to know HOW? references are welcome.
View 4 Replies
View Related
Nov 28, 2010
I have to come up with a user authenication page the logs the user in and also gives them access to do the right things. I have attached the code and the access file and have got started on a few things.I first need to create a login page with the fields username and password have that check the access database and then proceed it to a page to do the following depending on the user access. For The Login button to even be enabled the username and password must have a value in it. I have no idea how to do that
Add A User [No duplicate Users]
Modify A User
Delete A User
[code]....
View 4 Replies
View Related
Dec 2, 2005
I have read all posts about how to detect that url have changed to new
page and trigger the event handler then eg.
function aidLogout(evt) {
if(evt) {
/* maybe via analyse of evt object i can detect the close of the
browser window */
}
if(window.event) {
/* maybe via analyse of window.event object i can detect the close of
the browser window */
}
var i = new Image();
i.src = "aidlogout.asp?uid=1562&SessionID=ABCDEFGHIJKLMNOP"
} /* assuming that aidlogout.asp will return nothing or empty image */
window.unload = aidLogout;
/* or via
if(window.addEventListener) {
window.addEventListener("unload", aidLogout, false);
} else
if(window.attachEvent) {
window.attachEvent("unload", aidLogout);
}
PS i know about super Gecko onclose event which fires when browser
window is closed, but i could not find such method in IE.
View 8 Replies
View Related
Feb 22, 2011
How to show/hide several paragraphs when the user clicks next and then the reverse when the user clicks prev.
View 1 Replies
View Related
Feb 15, 2011
Imagine a wife has signed on to a web site in a browser tab. She does not sign off and walks away to do something else. Her husband sits at the computer and seeing her signed on, opens a new tab and tries to sign on to the same site. I need to automatically sign the wife off when this happens so as to avoid confusion later regarding which session is active.
View 10 Replies
View Related
Feb 24, 2009
I need help with user input. I need to restrict the user to input age greater than 17 and weight restricted to the range of 80-300.
My code is not working:
View 6 Replies
View Related
Nov 30, 2006
Is there a way to know if the user has javascript on? Also, is it a
good idea to validate all input in js and php or will this slow down
the website?
View 10 Replies
View Related
Jul 20, 2005
I'm trying to get the current system logged in user name.
When I use the follwing code, I receive a "'system' is undefined" error.
<script language="javascript">
document.write (system.properties("user.name"));
</script>
As far as I am aware this is the proper code to use top do what I want, however the error keeps popping up.
Can anyone please point me in a clear direction?
View 2 Replies
View Related
Jul 20, 2005
I've got an internet site and 2 domain adress.
The first adress go on my Home page and I would like the second one to go to
a specific page of my site.
I want to know how to capture the URL which has been tape by the user to
reorient the user to the good page.
View 1 Replies
View Related
May 24, 2011
How would you specify when user right clicks?
View 6 Replies
View Related
Jul 20, 2011
I have written a little bit of javascript to make a DIV appear like a pop-up window when the user clicks on a link,I then have a CSS fle which I use to format the DIV.I currently use the CSS to make the div position absolute and make appear in the middle of the screen, when the scroll-bars are all the way up and left.This works well, but I want to set the position property of the DIV in its style attribute so that it appears at the point where the mouse was clicked (i.e. over the top of the hyperlink).How do I get the mouse x and y or the click-location? And do I have to compensate for the scrollbar position?
View 1 Replies
View Related
Oct 19, 2006
I'm working on a program, it's a java servlet. It's interacting with an oracle DB. I need to add users and privaledges to the DB, but do not want people typing random usernames, I need to force them to use their company ID, i.e jmsmith, which is the username they log into their terminal from.
What I need to know, is there anyway possible to grab their current username from windows? i.e. a query to windows to see what user is currently logged into the terminal?
View 1 Replies
View Related
Sep 16, 2011
I haven't been able to find out how to get input from the user. What would be the equivalent way to this line of code in javascript?
do {
String str1;
cout << "blah blah code" << endl;
cin >> str1;
[Code].....
I would like to get '10_01_root_raw.txt' as a string variable from the user, so I could use a different text file as needed.
View 2 Replies
View Related
Mar 28, 2011
How can I detect that user use IE7 or IE6.
I made a google search but I was confused.
For example does this link works ok for IE7 or IE6?
Meaning that navigator.appName returns "Microsoft Internet Explorer"
View 19 Replies
View Related
Feb 24, 2006
How would i make it so if a user visits
http://www.mysite.com/a.php
i would have a javascript set a cookie
then if the same user visits (within 30 days or so)
http://www.mysite.com/b.php
it'll write their ip address to ips.txt?
is this simple to do?
View 6 Replies
View Related
Nov 14, 2001
I would like to put a welcome message on one of my sites... something like "welcome username!" with the username being the login name that that person used to login to their computers.
Is it possible to gather this information using client-side js? if not, how can i accomplish this without having each person enter their name upon entering the page?
View 3 Replies
View Related
Jul 23, 2005
I'm trying to make some changes to the Javascript portion of our
corporate intranet site and I'm trying to find if theres a way to find
the User's login id from a Javascript function?
If not, is there a way to run a 'echo %USERNAME%' from DOS command
window and obtain the output. I realize there's an inherent security
risk if Javascript were to allow that.
Am I barking on a completely wrong tree, is NTLM authentication what I
should be looking at?
Basically, I need to get the user id without the user having to supply
it on the page manually. Can this be automated?
View 2 Replies
View Related