Skip to main content
February 3, 2015
Question

HTML Edit Question

  • February 3, 2015
  • 9 replies
  • 1655 views
Hi, have a really specific design issue that I need to fix in the code on this landing page. When clicking on the buttons to "learn more" the user should have a new page open for the new URL but the initial landing page should not change. Somehow this was affected and now both pages are pointing to a new URL. Hoping this is a quick fix - if anyone happens to know the necessary edit I would love to know! Thanks

http://aerospace.honeywell.com/gdc
This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.

9 replies

February 3, 2015
If you mean opening the new URL in a new tab/window, add target="_blank" within the anchor tag

<a href="https://adobeformscentral.com/?f=zaqJYzdREkt5LWHDfFCnOw" class="button mktoMobileHide" target="_blank">Try it for Free <span class="icon mktoMobileHide" data-icon="^" aria-hidden="true"></span></a>
Justin_Cooperm2
Level 10
February 3, 2015
That's what she had previously and it wasn't working. Jessica, I think there is something else on your page that is not allowing it to work properly. Perhaps the template you're using has some sort of event handler? I couldn't repro on another page.
February 3, 2015
Thanks Justin. I see what you mean now. The parent page will still visit the new URL while the new tab/window will also show the new URL.

I believe the reason is this code.

            jQuery(function(){
              console.log('ready!!!!!!!!!!!!!!!!');
              jQuery('a').on('click',function(){
                var att = jQuery(this).attr('href');
                console.log('rawr');
                 window.location = att; 
                
              });
              
            });

Basically, JavaScript has set all anchor tags on this page to redirect to its set URL within the same window when clicked on.
February 4, 2015
Yeah, we were thinking it was related to the CSS...I just didn't have time to dig in too far and needed a quick fix - thanks for the advice!!
Justin_Cooperm2
Level 10
February 4, 2015

So, looks like you have some JavaScript in there that is keeping the browser from doing the default behavior on that anchor tag.  We investigated a bit more and hit it after putting a breakpoint on line 3644:

help("#menu li a").attach("tap", function(e) {

e.preventDefault();
scroller.main.animateTo(-(help(this.attribute("href")).offset().top - instance.contentOffset));
help("#menu").removeClass("active").animate({"right": -260}, 150);

});

Maybe chat with whoever built your template and ask them how you can change it to do it what you'd like.

February 4, 2015
Going off tangent here (sorry, couldnt find your work email address) but you might also want to speak to the template builder about another issue.

Your responsive page becomes "blank" when size of the browser window reaches 480px or less

I'm guessing the template the landing page is using is now Marketo Mobile Compatible and now elements not within the div class="mktoContent" will get a class of "mktoMobileHide".
 
@media only screen and (max-width: 480px), only screen and (max-device-width: 480px), only screen and (max-device-height: 480px)
 
#bodyId .mktoMobileHide {
  1. displaynone;
}
February 4, 2015
Shoot! Thanks for pointing that out...I have to make edits at this point - would you happen to know, do I need to manually update the code by removing all incidences of .mktoMobileHide - would I need to replace it with anything? TY
February 4, 2015
Can I remove the Mkto Mobile functionality on the page? This template and landing page were republished today and I think that's when the mobile marketo was added....
February 4, 2015
For a quick fix, I think you can disable it for the page itself and see how it goes.
  1. Clone the landing page just to have a backup and play safe.
  2. Go into the landing page editor in the original page
  3. Make sure that all page elements on the right side are "ticked" to show on Desktop
  4. Go to and click on landing page actions on the top left
  5. Select "Turn off mobile version"