Empirisoft Support

    Welcome to Empirisoft Support
Results 1 to 7 of 7

Thread: Can key presses be used to control image presentation?

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Aug 2007
    Posts
    12

    Tracking final answer in image viewer

    Yes, that's it! I would just like to be able to track the final answer. Thanks very much.

  2. #2
    Join Date
    Nov 2005
    Posts
    3,328
    OK, that's where my knowledge ends. You need to ask someone who knows something about javascript. The gist is that you want to include the java variable in your form post. I think the variable you want to post here is called "which" in the code you sent. Do you have someone who could help you with that? If not, let me know and I'll try googling around for the answer.

  3. #3
    Join Date
    Aug 2007
    Posts
    12
    I think this works:
    <table border="0" cellpadding="0">
    <tr>
    <td width="100%"><img src="mullerlyer1.gif" name="photoslider"></td>
    </tr>
    <tr>
    <td width="100%"><form method="POST" name="rotater" onsubmit=updatewhichpic()>
    <div align="center"><center><p><script language="JavaScript1.1">
    var photos=new Array()
    var which=0
    /*Change the below variables to reference your own images. You may have as many images in the slider as you wish*/
    photos[0]="mullerlyer1.gif"
    photos[1]="mullerlyer2.gif"
    photos[2]="mullerlyer3.gif"
    photos[3]="mullerlyer4.gif"
    photos[4]="mullerlyer5.gif"
    function backward(){
    if (which>0){
    window.status=''
    which--
    document.images.photoslider.src=photos[which]
    //submitform.whichpic.value = which
    }
    }
    function forward(){
    if (which<photos.length-1){
    which++
    document.images.photoslider.src=photos[which]
    //submitform.whichpic.value = which
    }
    else window.status='End of gallery'
    }
    function updatewhichpic(){
    rotater.whichpic.value=which
    }
    </script>
    <input type="button" value="&lt;&lt;Back" name="B2"
    onClick="backward()"> <input type="button" value="Next&gt;&gt;" name="B1"
    onClick="forward()"> <br>
    <!--form name="submitform" method="post" -->
    <input name="whichpic" type="hidden">
    <input type="submit" value="OK">
    <!--/form-->
    <!--<a href="#" onClick="which=1;backward();return false"><small>Start Over</small></a></p>-->
    </center></div>
    </form>
    </td>
    </tr>
    </table>

Similar Threads

  1. Fixation point and image presentation
    By ejonathan in forum DirectRT Older Versions: Troubleshooting
    Replies: 1
    Last Post: 03-05-2007, 05:07 PM
  2. Ranking presentation
    By JBeaudry in forum MediaLab Older Versions: How Do I...
    Replies: 1
    Last Post: 12-15-2006, 02:36 PM
  3. Name of image appears instead of actual image
    By jarvis24 in forum DirectRT Older Versions: Troubleshooting
    Replies: 1
    Last Post: 10-10-2006, 02:42 AM
  4. monitoring button presses over a specified period of time
    By mixelflik in forum DirectRT Older Versions: How Do I...
    Replies: 1
    Last Post: 10-02-2006, 08:02 PM
  5. Collecting Single OR Double Key Presses
    By Jordan in forum DirectRT Older Versions: How Do I...
    Replies: 2
    Last Post: 07-06-2006, 01:53 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •