HTML box is visible when I publish my...

User 2641708 Photo


Registered User
8 posts

Hi! I'm trying to popup a twitter window when the user clicks on the twitter logo (and then do same for all social media when I get this working), and have code that is now working, except that the HTML box doesn't disappear when I publish. Current code in head is:
<!-- POP UP WINDOW Name: PopUp Function ---- put once in Body to call in multiple places-->
<script type="text/javascript">
function newPopup(url) {
popupWindow = window.open(url,'popUpWindow', 'height=700,width=800,left=10,top=10,resizable=yes,scrollbars=yes,toolbar=yes,menubar=no,location=no,directories=no,status=yes')
}
</script>
<!-- END OF POP UP WINDOW Name: PopUp Function -->

and then an HTML box on top of Twitter bird contains:
<button onclick="nojavascript...newPopup('https://twitter.com/CELblog')"></button>

why doesn't this HTML box disappear when I publish?
Thanks mucho,
Cindy

Website Url: http://bre-systems.coffeecup.com/
User 187934 Photo


Senior Advisor
20,238 posts

I don't see a html box showing on that page.:)
I can't hear what I'm looking at.
It's easy to overlook something you're not looking for.

This is a site I built for my work.(RSD)
http://esmansgreenhouse.com
This is a site I built for use in my job.(HTML Editor)
https://pestlogbook.com
This is my personal site used for testing and as an easy way to share photos.(RLM imported to RSD)
https://ericrohloff.com
User 2641708 Photo


Registered User
8 posts

Look at the very top, on top of the Twitter bird. Also, that is the only place that clicking does create a Twitter popup window. The original HTML box covered the entire Twitter bird, but only that small piece is left after publishing. Obviously, I don't want any of the HTML box to remain, and I want to be able to click anywhere on the Twitter bird to popup the Twitter popup window.
Thanks for any help you can give me!
Cindy
User 187934 Photo


Senior Advisor
20,238 posts

That's not a html box that's a button.
Try this.
Header HTML of the html box

#twitter{
background-image:url('http://bre-systems.coffeecup.com/files/Twitter Button blue square.png');
width:40px;
height:35px;
border:none;
cursor: pointer;
}

Body html of html box
<button id="twitter" onclick="nojavascript...newPopup('https://twitter.com/CELblog')"></button>

I can't hear what I'm looking at.
It's easy to overlook something you're not looking for.

This is a site I built for my work.(RSD)
http://esmansgreenhouse.com
This is a site I built for use in my job.(HTML Editor)
https://pestlogbook.com
This is my personal site used for testing and as an easy way to share photos.(RLM imported to RSD)
https://ericrohloff.com
User 2641708 Photo


Registered User
8 posts

Works exactly the same! Except that I notice now (don't know if it did this before) if I go to some other page and then come back to the Home page, I can't make it popup a Twitter window at all.
Just to make sure I understood your suggestions, I put the first batch of code into the index.html header with the VSD Edit/Edit Header and I put the second batch of code into the html box that I created over the Twitter bird logo that I added to my webpage with the Add an Image feature. Is that correct?
BTW, like your picture. We are Chesapeake Bay Retriever fans and have 2 presently.
Cindy
User 187934 Photo


Senior Advisor
20,238 posts

You still have the html box that has the original twitter button in it. Delete that html box.
Add an html box to your page.
In the header html paste this
#twitter{
background-image:url('http://bre-systems.coffeecup.com/files/Twitter Button blue square.png');
width:40px;
height:35px;
border:none;
cursor: pointer;
}

In that same html box paste this to the body html.
<button id="twitter" onclick="avaScript:newPopup('https://twitter.com/CELblog')"></button>


I forgot that your not allowed to paste scripts.:lol:
I removed the J from javascript in the code.;) Copy the code and replace the J
I can't hear what I'm looking at.
It's easy to overlook something you're not looking for.

This is a site I built for my work.(RSD)
http://esmansgreenhouse.com
This is a site I built for use in my job.(HTML Editor)
https://pestlogbook.com
This is my personal site used for testing and as an easy way to share photos.(RLM imported to RSD)
https://ericrohloff.com
User 2641708 Photo


Registered User
8 posts

That html box has the new twitter button code in it, not the old code. Are you saying that the new Twitter bird code goes elsewhere? If so, how does the code get tied to the Twitter bird? Sorry, but I'm confused.
Cindy
User 2641708 Photo


Registered User
8 posts

Oh wait - re-reading your penultimate post, I see that I completely blanked on your "Add an html box to your page" and the 2 boxes then go into the header and body parts as usual. That seems philosophically the same as what I did, assuming the html box is created over the Twitter bird. If not, how does it get tied to that part of the screen? I'm trying it regardless.
Thanks for so much help,
Cindy
User 187934 Photo


Senior Advisor
20,238 posts

You have an html box with a twitter button. If your going to leave that one then add the id="twitter" to the code so it matches mine above and add the other code I posted to the header html of that html box.
I can't hear what I'm looking at.
It's easy to overlook something you're not looking for.

This is a site I built for my work.(RSD)
http://esmansgreenhouse.com
This is a site I built for use in my job.(HTML Editor)
https://pestlogbook.com
This is my personal site used for testing and as an easy way to share photos.(RLM imported to RSD)
https://ericrohloff.com
User 187934 Photo


Senior Advisor
20,238 posts

Make sure you readjust the button code because were not allowed to post javascript.

<button id="twitter" onclick="avaScript:newPopup('https://twitter.com/CELblog')"></button>


I removed the J from javascript in the code.;) Copy the code and replace the J.
I can't hear what I'm looking at.
It's easy to overlook something you're not looking for.

This is a site I built for my work.(RSD)
http://esmansgreenhouse.com
This is a site I built for use in my job.(HTML Editor)
https://pestlogbook.com
This is my personal site used for testing and as an easy way to share photos.(RLM imported to RSD)
https://ericrohloff.com

Have something to add? We’d love to hear it!
You must have an account to participate. Please Sign In Here, then join the conversation.