-
AuthorPosts
-
September 14, 2015 at 9:10 am #388204
Hello,
I have a link with JavaScript window open method. I’d like to make the link act like a button and keep the JavaScript. I’ve tried the x button code, but I struggle with embedding the JavaScript. How should I integrate the JS to the code?
Page: http://legendland.hu/wp/egyedi-baba/
Link: MegrendelemThanks,
LorianaSeptember 14, 2015 at 9:46 am #388241Hey There,
Thanks for writing in! Regretfully, at this time I am not entirely certain what it is you would like to accomplish based on the information given in your post. If you wouldn’t mind providing us with a little more clarification on what it is you’re wanting to do (a link to a similar example site would be very helpful, or perhaps some screenshots), we’ll be happy to provide you with a response once we have a better understanding of the situation.
September 14, 2015 at 10:02 am #388259Thanks for fast response, I just want to make a simple button like here:
http://legendland.hu/wp/nekik-tetszett/ (További vélemények button)I see that my code appeared as a link, so I hope now you will see:
///a href=”http://legendland.hu/wp/Egyedi-baba-rendeles/” onclick=”window.open(this.href, ‘mywin’,’left=50, top=50,position=absolute,width=400,height=500,toolbar=1,resizable=0′); return false;”>Megrendelem</a///September 14, 2015 at 10:42 am #388314Hi Loriana,
Thanks for writing in!
You cannot add other attributes to X button shortcode. Though, you can change your link to look like an X button by using
x-btn x-btn-regular
CSS classes. So your HTML code would become:<a class="x-btn x-btn-regular" href="http://legendland.hu/wp/Egyedi-baba-rendeles/" onclick="window.open(this.href, 'mywin','left=50, top=50,position=absolute,width=400,height=500,toolbar=1,resizable=0'); return false;">Megrendelem</a>
Thanks!
September 14, 2015 at 11:45 am #388373Perfect! Thank you very much 🙂
September 14, 2015 at 12:24 pm #388419You’re most welcome 🙂
-
AuthorPosts