name | grade | action bob | 1.0 | [button class="button" id='1'] jack | 2.0 | [button class="button" id='2'] john | 3.0 | [button class="button" id='3'] When I click the button,
[Code]...
so if I were to press buttonid 1 how do I get the grade '1.0' without having to open the database?
I'm trying to wrap up my program now but cannot get it to stop at the right time. It should stop and print the report after the user enters "end" after being prompted to enter a course. I have do{}while loops in place. I also cannot seem to get it to store the amount of credits as totalCredits and the amount of points as totalPoints, which are necessary for the GPA formulaThe inputted Courses, Credits and Grade print out correctly but after typing "end" (in which it doesn't actually end but continues until you input the credit and grade for course "end" (which isn't a course)) it prints the Total Credits and Total "Quality Points" but the wrong GPA..The coding is almost the same as his, but I've tinkered with it for about 8hours straight now. I should've posted this 5hours ago when I first had the thought to do so, but I didn't
Does anyone have a cool way to deal with too many third party external javascripts. I have a total of 13 JS files being called. Mine plus, Google Analitics, tracking code and more.
I have 12 div sections on a page and I want the user to be able to specify the order in which they appear on the page. I'm thinking of something like this but want to ask what people think of this approach and maybe suggest another way or an article on how to do this.
// grab the innerhtml by: var theSpan1 = getElementById("span1") var theSpan1HTML = theSpan1.innerHTML
// then grab the innerHTML of the span you want to "swap" it to: var theSpan2 = getElementById("span2") var theSpan2HTML = theSpan2.innerHTML
// and switch the innerHTML's of the span by: theSpan1.innerHTML = theSpan2HTML theSpan2.innerHTML = theSpan1HTML
I've got a page that shows a number of packages available for sale. Each package has a little description, and then a (sometimes long) list of features for each package. I thought it would be a good idea to let visitors hide the details for each package, so that they can see just the summaries together. So I borrowed some code (can't remember from where), which was designed for expandable/collapsible menu trees, and used it to show/hide the details of the packages.
The code works fine, but the only problem is that when you hide a section, the page doesn't resize itself. The text underneath moves up, but below that a huge empty space is left. The scroll bars should change to reflect the page's new (smaller) length, but instead they stay the same, and let you scroll through all the empty nothing at the bottom of the page.
I've tested the page is IE6 and Firefox 0.9 - I only have this problem in Firefox, in IE the whole page shrinks and the scroll bars change accordingly. Any suggestions? I though maybe I need to call some javascript function to refresh/recalculate the page - I tried using document.normalize() straight after the section got hidden, but it didn't help. Any other such functions that might do the trick?
I created this thread on the html forum but I'm not sure if it can be done with javascript, so I'll post here as well. I was wondering if there's a way to make various sections of the image clickable? The sections on the image are not rectangular so I can't make divs. I don't think I can use imagemap either since that only works for making one clickable area right? I already cut out these sections in photoshop and saved them with alpha background, and created a "glowing" version of each section, since I want to make it so that when mouse hovers over it, it will glow. But I can't stack them on top of each other, since if I do that only the topmost layer will be clickable for those areas where they will overlap with rectangular divs. This is example of what I mean: [URL]
I created this thread on the html forum but I'm not sure if it can be done with javascript, so I'll post here as well. I was wondering if there's a way to make various sections of the image clickable? The sections on the image are not rectangular so I can't make divs. I don't think I can use imagemap either since that only works for making one clickable area right? I already cut out these sections in photoshop and saved them with alpha background, and created a "glowing" version of each section, since I want to make it so that when mouse hovers over it, it will glow. But I can't stack them on top of each other, since if I do that only the topmost layer will be clickable for those areas where they will overlap with rectangular divs.
I was wondering if someone could tell me what i'm doing wrong here. Real simple code, but it doesn't work. BTW, I really only care for this to work with IE 6+.
I wanted to know is it possible to password protect some files in web page?For example, If someone wants to download file, browsers requests password(one for all visitors), idea is that some files and/or sections of web site is accessible to those who know the password..
Ive made the quiz works fine but instead of a box which displays the percentage I would like to have a pop up box when they click the submit button, also inside the pop up box it displays i.e. you got 4 out of 10 for example.
<HEAD> <script language="JavaScript"> var numQues = 10;
I wrote quiz using HTML and JavaScrip. Score is accumulated in a variable called myScore. Now I want to email the result of myScore to an email address. How do I go about doing this? I don't want to use the mailto: command since that require that user actually press the send command to send the email. I want this done automatically after user finishes the quiz.
I am making a simple multiple choice quiz and if user gets all correct i need it to automatically go to a new page rather than having a manual button for that so they cant move on until all questons are answered correctly.
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">
I'm trying to make a Quiz that generates random pictures each time the page is launched , with multiple options for the user to choose the right answer satsifying the picture and its meaning .
I've made the pseducode and i understand the algorithm ..but i don't know how to write the statements .
My algorithm is :
1-Random picture is shown each time the page is launched.
2- 6 Buttons are placed .
3-user choses the right matching answer.
4- window is popped up saying "correct"when its correct if not , an alert saying ;'Your answer is incorrect. Please try again"
So this is the code i've made , i know there's errors but just to show the Idea.
I am trying to add a dropdown list with the point values 1, 2, 3 ,4.If I use the number 1 from the dropdown for the first question, I need it to not allow the user to use that value again for questions 2, 3, and 4.
1. I am trying to figure out how to open a tab, open a show/hide within that tab, and link to a particular person from an incoming link. 2. I also am trying to figure out how to open a tab and then a pane within that tab from an incoming link.
This is the code used for the tabs <script type="text/javascript"> $(document).ready(function() { $("ul.main.tabs").tabs("div.main.panes > div", {tabs: 'a.main', history: true }); $("ul.nested.tabs").tabs("div.nested.panes > div", {tabs: 'a.nested', history: true }); }); </script>
This is the code used for the toggle <script type="text/javascript"> // Andy Langton's show/hide/mini-accordion - updated 23/11/2009 // Latest version @ [URL] $(document).ready(function() { var showText='+/-'; var hideText='+/-'; var is_visible = false; .....
I want to make a simple quiz in HTML using JavaScript. I have made a web page called scoreboard which contains two tables. I have attached the screen shot of how the web page looks as well as the coding here with this msg. below is the description of my web page. If you find it lengthy or not understandable, pls refer my attached image of the web page.
Description: one table contains two rows - one for direct answers and another for answers which are given during their pass chance in the quiz. There are four buttons - Team A, Team B, Team C and Team D for both the direct and pass. And the second table contains four text boxes which which displays the score for each Team.
Now, in my web page i have typed the required coding so that when in click the TeamA, TeamB,...buttons in the direct row, the score board for Team A adds up 10 points.
Now i want to add 5 points for the respective teams when i click their team button in the pass row. I am not able to code that. the code goes below.
My assignment is to create an online quiz with a random image generator. I have created my online quiz using 5 linking files and everything works great. My only problem is getting the images to show up on my quiz. All I get is the filename with a red X. Which the files do show up at random when I refresh, so I know that part is working. I just don't know what I am missing to get the actual picture to show up. Please keep in mind this isn't the whole code as I have different linking files for this assignment.
<?xml version = "1.0" encoding = "utf-8"?> <!DOCTYPE html PUBLIC "-W3CDTD XHTML 1.0 StrictEN" "[URL]"> <!-- Assignment CH10 Solution --> <html xmlns = "[URL]"> <head> <title>Online Quiz</title> <script type = "text/Javascript"> <!-- var rimg = 0; var pictures = [ "logo", "logo2", "logo3", "logo1", "cover" ]; function randpics(){ var myQuiz = document.getElementById( "myQuiz" ); rimg = Math.floor( Math.random() * 5 ); myQuiz.logo.src = pictures[rimg]+'.gif'; myQuiz.logo.alt = rimg + ' : ' +pictures[rimg]; } function checkAnswers() { var myQuiz = document.getElementById( "myQuiz" ); if ( myQuiz.elements [ 0 ].checked ) alert ( "Congratulations, your answer is correct" ); else if the answer is incorrect alert ( "Your answer is incorrect. Please try again" ); } end function checkAnswers -->
I want to run a quiz competion on my website in which after logging any user play that quiz, like I will give 50 question to solve in just 3 min time, all will be objective question, now after that 3 min, quiz will automatically end and all users marked answer entered to the database, means he has not press any submit button, but after specific time all answer automatically enter in the database, and he come out from it..
Now I am using this timer: <!DOCTYPE HTML PUBLIC "-W3CDTD HTML 4.01 TransitionalEN" "[URL]"> <html><head> <title>Untitled Document</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> </head><body> <?php $dateFormat = "d F Y -- g:i a"; $targetDate = time() + (1*60);Change the 25 to however many minutes you want to countdown $actualDate = time(); ..... Where to bring changes or which new thing is to be added.
It's a simple quiz with one multiple choice question and one fill in the blank.
When the user clicks on 'submit' I tried to show some kind of response with correct/incorrect images next to the question. It works with the multiple choice question, but not with the fill in the blank. How can I get the fill in the blank question to work.
I am relatively new to Java and am going to be taking a class on it next fall. For now though, I am trying to code for a client I am currently working with and am hopelessly lost. The client I am working with has an ecommerce site with Network Solutions which uses aspx. It allows you to code html and link to css, java (pretty much anything except php). The problem I am having is that they currently have their product descriptions coded in div tags:
What they want to happen is for the sections that have 'Not Available' as the answer to not show up on the live page. I have tried to use <ns:if condition="..."> but do not know how to call for it to see if the div says 'Not Available'.