Quiz using Java Script and XML file

Hi,
I am student from Liverpool in the UK. I am currently making a "quiz" website that links to an xml document, and brings back results of how the user has done.
I have made the website, and linked it to the xml document, but I can't get javascript to tell the user how many answers they got correct. Can you help me?
A friend told me to use a function, and then link that function to a box that, when clicked, brings up an alert box telling the user how many they got correct.
I know this is probably very simple, but I would be very grateful for help in which exact commands to write that will bring up an alert box when the user clicks on a "Submit" button. This alert box should bring up how many correct answers (out of 10) the user obtained.
Thanks for your time,
Matthew Tickle.

Java and Javascript are completely different. You probobally wont get much here... maybe u should try to find a javascript forum or look at some tutorials: http://tutorials.findtutorials.com/index/category/20

Similar Messages

  • How to generate reportdesign dynamically using java with out xml file

    hi
    how can i generate a reportdesign dynamically using java with out passing xml file to jasperDesign , i want to create my reportdesign with out xml file
    how can i ,please help
    thanks

    LiveCycle does provide a Java API to forms; LiveCycle is in fact a suite of programs, mostly enterprise level for running on server (next to which the cost of the master suite is a drop in the ocean). LiveCycle Designer is perhaps the only end user tool, and it is not for server use and doesn't have an API.
    Are you looking for a server solution? If so, nothing in the master suite can help, it isn't for server use.

  • Java script and css files are not loaded

    I am using 9iAS 1.0.2.2.2a on Windows Server Family 2000. My web application is using bc4j and developed in JDeveloper 3.2. I am also using Apache and web cache and caching js and css files.
    Problem is some times it does not load js files but load css files.
    Some times loads css files but does not load js files.
    Some times does not load js and css files.
    & some times loads both types of files.
    How to control this problem.
    Tahir Pervaiz.

    I'm fairly certain this issue represents a bug in IE 11. The same problem(s) do not occur in IE 9 or IE 10. The same problems occur on unrelated websites accessed from separate machines. Doing a force-refresh (Ctrl+F5) always fixes the issue.
    I took your advice about opening the console to look for error messages during page load. When loading normally (i.e. not doing a force-refresh), the console shows the following:
    HTML1300: Navigation occurred.
    File: TimeEntry
    DOM7011: The code on this page disabled back and forward caching. For more information, see: http://go.microsoft.com/fwlink/?LinkID=291337
    File: Dashboard
    SCRIPT70: Permission denied
    File: modernizr-2.5.3.js, Line: 468, Column: 9
    SCRIPT70: Permission denied
    File: jquery-ui-1.10.0.js, Line: 252, Column: 1
    SCRIPT70: Permission denied
    File: knockout-2.2.1.js, Line: 48, Column: 5
    SCRIPT5007: Unable to get property 'extend' of undefined or null reference
    File: knockout.validation.js, Line: 30, Column: 5
    When loading the page via a force-refresh, only the 'Navigation occurred.' message is displayed. It does not make sense that IE would apply a more restrictive security policy to scripts loaded from cache vs. scripts loaded directly from their original location,
    yet that appears to be what is happening.
    Post questions about html, css and scripting for website development to the IE Web Development forum.....WITH A LINK TO YOUR WEBSITE OR A MASHUP THAT SHOWS THE ISSUE...
    looks like you have a sandboxed iframe on your page.
    the first step in troubleshooting IE issues is to test in noAddons mode.
    Rob^_^

  • Updating using java script and jQuery

    Is it possible using javascript and jQuery to update the two forms of this page, in tandem as the fields change? http://www.milesmemorials.com/product-GH54.html  As you can see there are two forms, the first holds all the element choices and has an 'add to basket' button, the other after clicking 'proceed to proof' shows and gathers name, tel, email and all other fields from first form (which will be 'hidden' once this problem is resolved) all that will show will be name, tel and email. Currently what happens is choices are made, the proof button is clicked but if a selection is then changed the duplicate elements in form2 are not updated unless the proof button is clicked back and then clicked again. This can result in incorrect information being submitted. So going back to my original question, Is it possible using javascript and jQuery to update the two forms in tandem as the fields change?
    Any help really appreciated!!

    Thank you for your post. I think thats just what im looking for. So this is one of my form elements -
    <select name="colour" class="productButton"id="colour">
            <option selected value="0">-- Select colour --</option>
            <option value="2442">Galaxy black granite (&pound;2442)</option>
            <option value="2134">Black granite (&pound;2134)</option>
          </select>
    and i need to make this form field update when the element above is changed -
    <input name="colour2" id="colour2" type="text" />
    What do i need to change on this javascript to make this function work?
    <script> $( "select" )
      .change(function () {
        var str = "";
        $( "select option:selected" ).each(function() {
          str += $( this ).text() + " ";
        $( "div" ).text( str );
      .change();
    </script>

  • Using Java Script and Zebra TLP 2824- Z

    Hi Friends,
    I have a label printer TLP 2844-Z.
    And i want to give the details of label through javascript.
    and if i press the print button the printout should come is there any possibilities friends.
    The code for label is .
    "^XA"
    "^PW406"
    "^FT320,96^XG000.GRF,1,1^FS" );
    "^FT119,595^A0B,39,38^FH\^FDRajasulochana Nagasubramaniam^FS" );
    "^FT63,592^A0B,45,45^FH\^FD062345^FS" );
    "^FT163,595^A0B,31,31^FH\^FDThiruvenkataswamy Road West^FS" );
    "^FT206,595^A0B,31,31^FH\^FDNarasimhanickanpalayam^FS" );
    "^FT249,595^A0B,31,31^FH\^FDAddress Field Number 3^FS" );
    "^FT292,595^A0B,31,31^FH\^FDAddress Field Number 4^FS" );
    "^FT24,440^AAB,18,10^FH\^FDAllergies:^FS" );
    "^FO31,29^GB34,411,34^FS" );
    "^FT58,440^A0B,28,28^FR^FH\^FDAllergies go here, otherwise blank^FS");
    "^FO335,51^GB48,42,48^FS");
    "^FT373,93^A0B,39,38^FR^FH\^FDAB^FS");
    "^FO335,14^GB48,35,48^FS");
    "^FT373,49^A0B,39,38^FR^FH\^FD+^FS");
    "^FT371,593^A0B,28,28^FH\^FDDOB:^FS");
    "^FT371,522^AAB,27,15^FH\^FD09/09/2006^FS"
    "^PQ1,0,1,Y"
    "^XZ"
    Tell me the solutions as soon as possible.
    Regards,
    ruban

    Sorry bare with me I'm still confused.  Are you saying that you are using a LabVIEW application that outputs ZPL data to a Zebra Printer (TLP 3844-Z).  And you want the commands to write out a smaller font than what you are currently getting?  As a quick recommendation I would call back and reword your problem to Zebra Tech support.  It never hurts to ask twice. 
    Can you please post your code?
    -SS
    Message Edited by ShotSimon on 08-12-2008 04:24 PM

  • Using java scripts for pdf

    I am trying to find a sort of tutorial on how to use java scripts for pdf files, particularly in setting up repetitive links between several pdf files.

    Here is a very nice website that has tons and tons of stuff for pdf using java script. Enjoy!
    http://www.planetpdf.com/forumarchive/forum34.htm

  • Using Java scripting in WAD

    Hi All,
    Is it possible to make changes in Java Scripts used in WAD report?
    Can anyone tell me what are the changes possible using Java scripting and from where can I get the documentation for the same?
    Thanks.

    Hi Suchitra,
    With NW2004s, most of the javascript options can be entered directly through the Script object into the Web template. The suggestion is to use the command wizard to modify/control the behaviour of the objects...
    Check this links for details regarding Javascript.
    http://www.w3schools.com/jsref/jsref_onload.asp
    Hope this helps.
    ****Assign points if helpful****
    Regards,
    Ravikanth.

  • Read, Modify and Apply Report XML using Java Script

    Hi Guys,
    Is there any way that we can Pragmatically Read, Modify and Apply Report XML using Java Script or some other way.
    Thanks
    Kaushik
    Edited by: Kaushik K on Jun 20, 2012 8:36 PM

    Requirement ::
    Users should be able to add Column to the Report Dynamically at Runtime.
    (There are around 1000+ Users, Answers Approach is not acceptable)
    So we are planning to provide a Multi Select / Shuttle Box Option for Users to add Columns dynamically. (Only for Table View)
    What we planned to DO ::
    Create a Presentation Variable Prompt, Which reads the Metadata Table (Presentation Table.Column Name, populated using the Metadata Dictionary)
    And Create a report with One Column and the Column Fx like @{var_dynamic_columns}{'"Time"."Year","Time"."Month"'}
    With this, OBIEE is rewriting the Logical SQL Currently as "Select "Time"."Year","Time"."Month" from "A - Sample Sales" "
    But getting an error
    The number of columns returned in retrieving column metadata was invalid (expected: 1; received: 2)
    So we want to see, if we can rewrite the Advanced XML of the Report to have dynamic columns based on the Values from the Presentation Variable.
    Please help me if this is a viable solution or any other better solution.

  • How to disable print and download button of pdf file when i am opening mozila firefox using java script

    i am opening pdf file in firefox browser in right side i am seeing print and download option
    i want to disable it by program like javascript, by manualy i can disable it ,
    actually i am opening pdf file in my website by using firefox browser so i do not want to any can download or print the pdf file

    If it's that critical, you could explore this partial workaround:
    Use a script or configuration file on your server that changes the disposition based on the user agent. In other words, for Firefox, send an attachment disposition that forces a download outside the browser instead of the default (inline) disposition that allows Firefox to display the PDF in a tab.
    Now... that won't stop the user from dragging and dropping the downloaded file on a Firefox tab to use the built-in PDF viewer, but most users would tend to open the file in their default viewer (e.g., stand-alone Adobe Reader).

  • Read Text file using Java Script

    Hi,
    I am trying to read a text file using Java Script within the webroot of MII as .HTML file. I have provided the path as below but where I am not able to open the file. Any clue to provide the relative path or any changes required on the below path ?
    var FileOpener = new ActiveXObject("Scripting.FileSystemObject");
    var FilePointer = FileOpener.OpenTextFile("E:\\usr\\sap\\MID\\J00\\j2ee\\cluster\\apps\\sap.com\\xapps~xmii~ear\\servlet_jsp\\XMII\\root\\CM\\OCTAL\\TestTV\\Test.txt", 1, true);
    FileContents = FilePointer.ReadAll(); // we can use FilePointer.ReadAll() to read all the lines
    The Error Log shows as :
    Path not found
    Regards,
    Mohamed

    Hi Mohamed,
    I tried above code after importing JQuery Library through script Tag. It worked for me . Pls check.
    Note : You can place Jquery1.xx.xx.js file in the same folder where you saved this IRPT/HTML file.
    <HTML>
    <HEAD>
        <TITLE>Your Title Here</TITLE>
        <SCRIPT type="text/javascript" src="jquery-1.9.1.js"></SCRIPT>
        <script language="javascript">
    function Read()
    $.get( "http://ldcimfb.wdf.sap.corp:50100/XMII/CM/Regression_15.0/CrossTab.txt", function( data ) {
      $(".result").html(data);
      alert(data);
    // The file content is available in this variable "data"
    </script>
    </HEAD>
    <BODY onLoad="Read()">
    </BODY>
    </HTML>

  • How to  build a  Calculator in WAB Template  by using  Java Script......

    Hi ,
    I am  trying   to build a dynamic  calculator in WAD which is as  similar to one in Executive view in Cognos. The  problem i am  facing  is,  i can  able to build a normal  calculator  by using  java script  but  i am  unable  to read the  key figure  values from  the  analysis  item  on from the  data  provider  in to  by  calculator  by using  on click  function. I wanted  to get the all  the  values in to a internal excel , so  that  my calculator can read the  values from  that. can  any  one  help  me  on getting  values in to internal excel by using   java before the  executing the  web template ?...
    Thanks in advance....
    Jhon.
    Edited by: sap bw on Jul 31, 2008 5:51 PM
    Edited by: sap bw on Jul 31, 2008 5:52 PM

    I might not be understanding your question completely since you mention WAD and then Excel, but if you are asking how to get the key figure values using Javascript in WAD, you can go to the Dataprovider properties and enable 'Output Result Data'.  This will embed an XML element into the HTML output that you can then parse using standard Javascript DOM navigation.
    Hope this helps.

  • Acrobat standard 9.0 error while enabling commets option using Java script object

    I'm using the below java script code in my VB 6.0 application for enabling commets options in the PDF file
    Dim oJSO As Object
    Set oJSO = mPDDoc.GetJSObject
    oJSO.Collab.showAnnotToolsWhenNoCollab = True
    It is working fine till Acrobat 8.0. Now I'm trying with Acrobat 9.0 standard edition, it is throwing scripting error 'An unhandled Win32 exception occured in Acrobat.exe[308].
    Can anyone suggest the way to enable 'comment' options in Acrobat Standard 9.0 using Java Script Object?
    Thanks

    I get much the same problem with VB6, Acrobat 9 Pro and WinXP SP3. When I single step the line:
    oJSO.Collab.showAnnotToolsWhenNoCollab = True
    in debug I go to the error handler for my Sub. Inspecting the VB Err object has Number = -2147417851 and Description = "Automation error
    The server threw an exception." I get a Microsoft crash notice about Acrobat a short while later.
    I've experimented with the JavaScript debugger in Acrobat and you can execute Collab.showAnnotToolsWhenNoCollab = True and reference the value of Collab.showAnnotToolsWhenNoCollab in the console. The problem appears only when accessing Acrobat Javascript through the Interapplication Communication API.
    If anyone can help it would be appreciated. I tried Adobe's Acrobat support and they were no help at all.

  • Question about Java,XSLT and XML

    I am new to Java and XML. I'm not quite clear the relationship between Java,XSLT and XML.
    To exercise, I am going to write a Java program that makes embedded calls to an XSLT processor(XALAN), to produce results for several constrained transformations from a given XML document(x.xml) such as:
    1.Transform the x.xml (which satisfies d1.dtd) in such a way that it now conforms to the DTD d2.dtd. Output the resulting xx.xml document.
    2.query some information from the x.xml and then form an Html output.
    3.summary some information, do some statistics from the x.xml and then form an Html output.
    I don't konw which java classes and XSLT functions might be used.(Actually I don't know how/where to start).
    Can anyone give me some clue ?
    thanks a lot!

    You must provide XSLT stylesheeds to specify transformations (1), (2),
    and (3); let's call those stylesheets task1.xsl and so on.
    The following code will transform x.xml into xx.xml according to task1.xsl. It gives you an idea which packages and classes to use, but it doesn't teach you proper Java programming technics :)
    import java.io.File;
    import javax.xml.transform.*;
    import javax.xml.transform.stream.*;
    public class Test
        public static void main(String[] args) throws Exception
            TransformerFactory factory = TransformerFactory.newInstance();
            Source config = new StreamSource(new File("task1.xsl"));
            Transformer transformer = factory.newTransformer(config);
            Source source = new StreamSource(new File("x.xml"));
            Result result = new StreamResult(new File("xx.xml"));
            transformer.transform(source, result);
    }To read about XSLT, see:
    http://www.w3.org/TR/xslt
    there is a tutorial on using XSLT with Java:
    http://java.sun.com/xml/jaxp/dist/1.1/docs/tutorial/xslt/index.html.

  • Using HAL to generate XML files

    Greetings,<BR>I'd like to use HAL to build XML files and feeding certain variables while these files are generated. When the XML file is done being created, it will contain the variables passed. There are over 500 XML required to be build and for each of these files, only 2 or 3 variables must be passed to them. A template of the xml file was created using the Batch scheduler from Hyperion Reports, and this is the file I'd like to use as a template and build a HAL adapter based on that file.<BR><BR>Does any one have a sample of the XML adapter (via screen shot) that I can use a starting guide?<BR><BR>Many thanks in advance for your time.

    Hi,
    I'm running into the same problem deploying the classes generated by the class generator. Code works fine from JDeveloper, but had to put my DTD in the directory where my classes are. Deploying the classes with Apache's JServ gives me a NullPointer exception on the first addNode method. I guess it can't find the DTD. I tried to put the DTD in many locations but this didn't fix the problem. Any suggestions?
    Steve,
    Did you fix this problem? Thanx!
    null

  • How to create a class using java script..

    Hi all,
    Iam new to java script and I tried out the following program but its not working..I basically created a class just like a java prog' but Iam not getting any output or error.Iam attaching the code below.
    If I created one function inside the script and create one object its working fine but what should I do when I have a lot of function??so I created a class and put all the function and created an object but its not working..
    Do let me know what changes should I do..Iam attaching the code which I had written. or give me an example of how to create a class with couple of functions using JAVASCRIPT
    Thanks
    Avis_su
    <html>
    <head><title>JSP Page</title></head>
    <body>
    <SCRIPT language = "JavaScript">
    <!--
    //Created classes
    class book
    var title: String;
    var author:String;
    function author()
    doucument.write("Author is " +this.author);
    function tile()
    doucument.write("Title is " +this.title);
    function printall()
    var counter = 0;
    function author();
    function title();
    var chapters = Array[String];
    for(chapter in this chapters)
    counter++;
    document.write("Chapter" counter" :"+this.chapters[chapter]+"<br>");
    var thisbook = new book()
    thisbook.author = "Sivagami";
    thisbook.title = "MS in CS giude";
    thisbook.chapters = new Array[10];
    thisbook[0] = "Prepare to Excell in all ";
    thisbook[1] = "Learn to be happy";
    thisbook[2] = "Learn to be healthy mentally emotionally physically";
    thisbook[3] = "Siva and Subbu along with kidssssss will be successful in future";
    thisbook.printall();
    //-->
    </script>
    </body>
    </html>

    Run this program to get your answer:
    public class AnswerToYourPost {
    public static void main(String args[]) {
    System.out.println("TRUE/FALSE: This question
    ion belongs on a Java forum.\n"
    + "ANSWER: " + ("Javascript" == "Java"));
    }Since when do we compare objects for equality using operator == ?

Maybe you are looking for

  • Selected App cannot be used because the original file cannot be found and must be re-downlaoded from the iTunes

    1- on the beginning i used to  purchase any App from iTunes and will be downloaded  to my MBAir with out any problems . 2- But, after 2 or 3 days i will get Apps icon as inactive icon in the itunes Aplication  and cannot copy them to my iPhone neithe

  • OracleXML with OPS$ Account

    Can anyone help with the following: A script is running code which makes a call to OracleXML's putXML method. It used to supply a hardcoded username and password and functioned correctly. However, security policy changes meant that using hardcoded us

  • Hardware requirement for a RAC

    Hi, I want to create a 11.2 RAC with only one node. I will add a new node in the future. I've available a netapp for the shared storage (ASM). So I need to buy only the server. The requirement is that the server has 4 network devices (2 for public an

  • My IPad Apple ID is disabled. How do I enable it

    I have tried to get my Apple ID enabled, with no luck.  Can you help me.  My email is [email protected] PLEASE HELP....I am unable to update my apps or purchase anything on my I Pad Thank you

  • Can Java evaluate code at runtime ?

    Hi all ! Can Java evaluate (compile and run on the fly) runtime defined code (as text) ? Like JavaScript does : eval("Object1.DoSomething(0);") or eval("a = a +1; b = a;") How complex statements are allowed to be evaluated at runtime if so ? Thanks !