#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Sep 2012
    Posts
    2
    Rep Power
    0

    OnClick event question


    Thanks in advance for answering this, I don't generally involve myself in code but this is an instance where I understand there is a simple solution that I just can't find.

    This was is the module code -

    <script type="text/javascript" src="nivo-slider/jquery-1.6.1.min.js"></script>
    <script type="text/javascript" src="nivo-slider/jquery.nivo.slider.js"></script>



    <div id="wrapper">

    <div class="slider-wrapper theme-default">
    <div id="slider" class="nivoSlider">

    <a style="display:none;" onclick="window.open(this.href); return false;" href="/m/news/view/Futuristic-Dodge" ><!----Maximum---22-character-->
    <img src="slider_img/toystory.jpg" alt="" title="" /><!----Maximum---22-character-->
    <div class="txt" style="display:none;">
    <h1 style="color:#ffffff">You Will Be Unprepared</h1><!----Maximum---22-character-->
    A young girl is institutionalized by her wicked stepfather.Retreating <!----Maximum---50-character-->
    to an alternative reality as a coping strategy, she envisions a plan<!----Maximum---50-character-->
    which will help her escape from the facility. The lines between<!----Maximum---50-character-->
    reality and fantasy blur as...<!----Maximum---35-character-->

    </div>

    </a>

    All I want is for the link in the above sample to not open in a separate window.

    I can find a ton of information for how to make a link open in a new window but I haven't found much for what changes would make it just go to a specific page on the site without opening a new window.

    Please help.
  2. #2
  3. No Profile Picture
    Lost in code
    Devshed Supreme Being (6500+ posts)

    Join Date
    Dec 2004
    Posts
    8,296
    Rep Power
    7170
    Remove
    Code:
    onclick="window.open(this.href); return false;"
    PHP FAQ

    Originally Posted by Spad
    Ah USB, the only rectangular connector where you have to make 3 attempts before you get it the right way around
  4. #3
  5. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Sep 2012
    Posts
    2
    Rep Power
    0

    Thanks but I need something different.


    That makes the link appear in the same module position where the photo slider (jacvascript) is. Sort of a different page on the site in a really small iframe.

    I don't think I was clear. The code as it is above is for a photo slider module with a text link over the photo. I want the text link that is overlayed on the photo to open to the page on the site, I just don't want a whole different window to pop up to see the page it's pointing to, I want it to come up as another page like it would with a navigational button link.

    I hope this makes more sense and thanks for the help.

IMN logo majestic logo threadwatch logo seochat tools logo