[Urgent] Help needed with "onClick=" Java script.

Discussion in 'JavaScript' started by Shubham_Villa, Mar 5, 2010.

  1. #1
    hi,
    I have an image hosting site, and like pixhost i have too developed "Continue to the Image Option"

    it went all fine, but i have bit problems.

    I want that when User click on "Continue to the Image Option" along with the image a pop up window opens.

    The main part of the script i have used is:
                                jQuery("div#js").html("<a style=\"color:blue;text-decoration:underline;cursor:pointer\" >Continue to your image</a>");
                                jQuery("div#js").show();
                                jQuery("div#web").hide();
    
    
                                jQuery("div#js a").click(function(){jQuery("div#js").hide();jQuery("div#web").show();});
    Code (markup):
    I wish to add :-
    onClick='parent.bottom.location.href="a site address.com"
    Code (markup):
    Please help me, where to add this thing so that it works fine for me.

    Thanks
     
    Shubham_Villa, Mar 5, 2010 IP
  2. canadianguy_001

    canadianguy_001 Peon

    Messages:
    97
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    0
    #2
    
                                jQuery("div#js").html("<a style=\"color:blue;text-decoration:underline;cursor:pointer\" >Continue to your image</a>");
                                jQuery("div#js").show();
                                jQuery("div#web").hide();
    
    
                                jQuery("div#js a").click(function(){
                               
                               //this is your onclick function
                               parent.bottom.location.href="a site address.com"
    
                                jQuery("div#js").hide();jQuery("div#web").show();
                                });
    
    Code (markup):
     
    canadianguy_001, Mar 8, 2010 IP