0

A website that I'm working on has a lot of Javascript running on it. One is a a chat widget that allows operators to communicate with customers. The issue I'm running into is that when an operator tries to send a link to a customer, the link is unclickable. Upon further inspection it seems that something is appending "http:// " or "http://%20" to the front of whatever's in the 'href'.

So a link would be changed to "http:// http://example.com". Thus confusing the customer when it's unclickable. I've been looking around but I'm getting dead ends. Any suggestions on what to look for? None of the code I've looked at does any appending so I'm drawing blanks here.

Simon
  • 3,667
  • 1
  • 35
  • 49
DEV PSC
  • 11
  • 2

1 Answers1

0

I think your best bet is isolating your components. The obvious thing to start with would be the chat component, run it by itself and make sure it doesn't prepend the http:// part to anchor elements. Once you've confirmed that, start adding your other components and try to figure where it goes wrong. Likely it's due to some form of conflict between two or more components.

Once you are able to recreate the error in controlled environment I would suggest you use a tool such as the Chrome Debugger to set breakpoints at certain places in the code in order to follow the execution. That way you'll likely be able to narrow the issue down to a certain portion of your code. Also, searching for the string "http://" (including single or double quotes) might prove valuable.

Simon
  • 3,667
  • 1
  • 35
  • 49