Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to make the css work with external Javascript link 1

Status
Not open for further replies.

geneboss

Technical User
Jul 28, 2010
21
US
Hi all,
I'm a newbie in programing and have an issue here that hope someone can help me resolve.
I have an external link which will post a logo that opens a chat window into my website:

<div id="externallink">
<script type="text/javascript" src="</div>

I want this logo to be positioned in the location with the following css properties in my web page:

.chat {

border:none;

padding:0;

margin:0;

text-indent:-9999em;

overflow:hidden;

height:164px;

width:51px;

position:fixed;

left:0;

top:190px;

z-index:1000;

display:block;

}

I tried several approaches, but could not get it to work. Your help is greatly appreciated.

Regards
 
What approaches? and this appears to be strictly a CSS, and not really Javascript.


Still did you try giving your div a class of .chat?

Code:
<div id="externallink" [red]class="chat"[/red]>
<script type="text/javascript" src="[URL unfurl="true"]http://..."></script>[/URL]
</div>



----------------------------------
Phil AKA Vacunita
----------------------------------
Ignorance is not necessarily Bliss, case in point:
Unknown has caused an Unknown Error on Unknown and must be shutdown to prevent damage to Unknown.

Behind the Web, Tips and Tricks for Web Development.
 
Hi Vacunita,
Thank you for your reply.
Yes I did that. It only shows the button and no action when I click to open the window :(


 
Perhaps I missed the problem originally, are you saying its not opening the chat box?

What ever does the included script do then? The part with the <script></script> tags. What is in there?

Basically all I see is you styling a box that's loading a script maybe.

But you have not shown us what your script does.






----------------------------------
Phil AKA Vacunita
----------------------------------
Ignorance is not necessarily Bliss, case in point:
Unknown has caused an Unknown Error on Unknown and must be shutdown to prevent damage to Unknown.

Behind the Web, Tips and Tricks for Web Development.
 
Yes, It doesn't open the chat box. Here's the script:

<script type="text/javascript" src="

I know the link works because when I load the page, the automatic help window scrolls down and from there I can open the chat box. But when I want to manually open the window by clicking on the corresponding button, the chat window won't open. As you said before, this must be a css issue.
 
You are attempting to loading a PHP page through <script> JS tags. That will not work.

Unless there's Js in that page too, that runs something, the PHP page would not get run at all through there.

----------------------------------
Phil AKA Vacunita
----------------------------------
Ignorance is not necessarily Bliss, case in point:
Unknown has caused an Unknown Error on Unknown and must be shutdown to prevent damage to Unknown.

Behind the Web, Tips and Tricks for Web Development.
 
OK here's the javascript:

<div id="craftysyntax">
<script type="text/javascript" src="
</div>

if you try this and put anywhere into your website, it works.
What I want is for the button to appear as described in the css file.
The button loads remotely.

I hope this clarifies the situation.
 
O.k. I get, after a delay, a small Live-Chat box with a red Start Chat button. When I click it, a window opens up with the chat.

hire-safe.png

This only happens in Internet Explorer.

In Firefox I get nothing.

The red border on the side of the screen shows the true location of the div.

The CSS moves the div to the side of the screen, and the text-indent pushes the image out of view so it can't be clicked. Though this has no effect on the other green and white box with the Hire-Safe Live-chat red button.

----------------------------------
Phil AKA Vacunita
----------------------------------
Ignorance is not necessarily Bliss, case in point:
Unknown has caused an Unknown Error on Unknown and must be shutdown to prevent damage to Unknown.

Behind the Web, Tips and Tricks for Web Development.
 
Thank you Vaunita,
You are awesome. It works now. I eliminated the text-indent.
It things are O.K.
Again thank you very much for your efforts.
Regards
geneboss
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top