Results 1 to 2 of 2
  1. #1
    handy web is offline Member
    Join Date
    Feb 2012
    Posts
    1
    Rep Power
    0

    Default focusing on object when clicking an image?

    Hello everyone, I'm really new to Java and have a very small clue about it...

    I ran into this problem: I have this htm file here: Moderator edit: link removed

    As you can see it's programmed so when you click on an image at the bottom, the main video player plays a youtube embed video. I would like to make the screen focus on that main player (to center the screen on that object)

    this is the script i use currently now:

    <script language="javascript" type="text/javascript">
    function movieZoom() {
    var mytxt1 = document.getElementById('mytxt1');
    mytxt1.focus();
    mytxt1.select();
    }
    function showresult() {
    var email = document.getElementById('f_682868_text_0');
    var filter = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/;
    if (!filter.test(email.value)) {
    document.getElementById("result").style.display = '';
    document.getElementById("result").innerHTML = 'כתובת המייל אינה תקינה';
    return false;
    } else {
    document.getElementById("f_682868_text_0").value = '';
    document.getElementById("result").style.display = '';
    document.getElementById("result").innerHTML = 'אנו שולחים לך מייל...';
    return true;
    }
    }
    </script>

    and then at the image place, as an example:

    <img class="smallMovie" src="http://www.java-forums.org/images/movies/2.jpg" alt="האם אתם באמת מכירים את בני הזוג שלכם?"
    title="האם אתם באמת מכירים את בני הזוג שלכם?" onClick="movieZoom();document.getElementById('main MovieBig').src='http://www.youtube.com/embed/...?wmode=transparent;HD=1;rel=0;showinfo=0;autopl ay=1';" />




    any ideas how to make it happen?

    thanks alot
    Last edited by DarrylBurke; 02-09-2012 at 10:07 PM. Reason: Removed links

  2. #2
    DarrylBurke's Avatar
    DarrylBurke is offline Member
    Join Date
    Sep 2008
    Location
    Madgaon, Goa, India
    Posts
    11,244
    Rep Power
    19

    Default Re: focusing on object when clicking an image?

    That's a JavaScript question. This is a Java forum.

    Find a JavaScript forum for your question.

    Closing this thread and it will be removed later.

    db
    If you're forever cleaning cobwebs, it's time to get rid of the spiders.

Similar Threads

  1. changing JButton image upon clicking
    By Logical in forum AWT / Swing
    Replies: 2
    Last Post: 12-21-2010, 02:53 AM
  2. How to show the full resolution image at clicking on thumnail
    By amritpalpathak in forum New To Java
    Replies: 4
    Last Post: 12-01-2010, 04:43 PM
  3. Focusing the JTextField and so on while pressing Tab
    By britto_bicsjohn in forum AWT / Swing
    Replies: 1
    Last Post: 08-28-2009, 08:24 AM
  4. Focusing on the next JTextField
    By britto_bicsjohn in forum AWT / Swing
    Replies: 2
    Last Post: 08-26-2009, 03:53 PM
  5. algorithm to cut an object from an image
    By TamTam in forum Java 2D
    Replies: 2
    Last Post: 02-27-2009, 10:01 PM

Tags for this Thread

Posting Permissions

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