HTML Help

  • 1
  • Question
  • Updated 10 years ago
  • Answered
My problem is that sometimes when I paste some code in the HTML widget it takes every word and puts it on one line.

What do I do?
Photo of Adam

Adam

  • 23 Posts
  • 0 Reply Likes
  • confused

Posted 10 years ago

  • 1
Photo of Sanja

Sanja, Official Rep

  • 10698 Posts
  • 495 Reply Likes
Hi Adam

This happens to me too. It still works if it's all one line. I just simply separate each section with my enter key.
Photo of Ruth

Ruth

  • 2819 Posts
  • 135 Reply Likes
Does this answer your question Adam?
Photo of Peter

Peter

  • 2569 Posts
  • 113 Reply Likes
Adam,

You can paste your code via Notepad and this will retain the integrity of the layout.

So copy the code, Pate it into Notepad, Copy it again from Notepad and then finally Paste it into the HTML widget.

I'm fairly sure that this works all the time. What I would suggest though is to delete the whole widget content and placeholder before repasting.

Good luck Adam.
Photo of Adam

Adam

  • 23 Posts
  • 0 Reply Likes
Thanks! I'll do the notepad thing!
Photo of Adam

Adam

  • 23 Posts
  • 0 Reply Likes
Well, I tried the notepad thing and that didn't work.

I also inserted an HTML widget about ten minutes ago and tried to create a link using an image but all it would do was link me to my homepage when I went to test it out.
Photo of Peter

Peter

  • 2569 Posts
  • 113 Reply Likes
Hi Adam,

Would you like to post the code here and maybe we can work on it and see what's going on with this?

Don't give up hope on it I'm sure it can be worked out if its legit code.

If you want to post the code try using this facility to protect it from interpretation by GS:

http://forsite.synthasite.com/encoder...

You simply copy the code, paste it into the upper section, generate the protected code, copy the protected code and paste into here.
Photo of Adam

Adam

  • 23 Posts
  • 0 Reply Likes
I'm using:

<a href="www.google.com&quot;&gt;&lt;img src="resources/img.gif" width="10" height="10" border="0"></a><br>
Photo of lambofgod

lambofgod

  • 875 Posts
  • 35 Reply Likes
I do not see the problem that you are having. I tried your code and just change the image so it matches one that I have but left the rest of the code and it is working fine for me. Sorry I cannot be more of help
Photo of Adam

Adam

  • 23 Posts
  • 0 Reply Likes
Could it be because my site is not published?
Photo of lambofgod

lambofgod

  • 875 Posts
  • 35 Reply Likes
That is it! Publish your site and tell us what happen.
Photo of Adam

Adam

  • 23 Posts
  • 0 Reply Likes
I figured out that instead of typing:

"www.google.com",

I have to type:

"http://www.google.com",

and then it works perfectly.

I've also come across another problem. I use the following code:

<html>
<head>
<script type="text/javascript">
function showHideMe(id){
if(document.getElementById(id).style.display=="none"){
document.getElementById(id).style.display="block"
}
else{
document.getElementById(id).style.display="none"
}
}
</script><style type="text/css">
.expands{
width:100px;
cursor:hand;
cursor:pointer;
}
</style>
</head>
<body>
<div class="expands" onclick="showHideMe('div1')"><b><u>Two Words</u></b></div>
<div id="div1" style="display:none;border:1px solid #55AA55;background-color:#AFA;width:100px">Element One</div>

</html>

If you use it you will notice you can't have two words on one line and I don't know how to fix it. I'm still new to HTML. What do I do?
Photo of Adam

Adam

  • 23 Posts
  • 0 Reply Likes
I figured out the problem myself but I found another one. Is there any easier way to do this:

<html>
<head>
<script type="text/javascript">
function showHideMe(id){
if(document.getElementById(id).style.display=="none"){
document.getElementById(id).style.display="block"
}
else{
document.getElementById(id).style.display="none"
}
}
</script><style type="text/css">
.expands{
width:100px;
cursor:hand;
cursor:pointer;
}
</style>
</head>
<body>
<div class="expands" onclick="showHideMe('div1'); showHideMe('div2'); showHideMe('div3');"><b><u>Websites</u></b></div>
<div id="div1" style="display:none;"><a href='http://www.google.com'&gt;google.com&...;
<div id="div2" style="display:none;"><a href='http://www.yahoo.com'&gt;yahoo.com&lt...;
<div id="div3" style="display:none;"><a href='http://www.ask.com'&gt;ask.com&lt;/a&...;
</body>
</html>

It is one of those drop down link menus. I was wondering if there was an easier way to include multiple links. Any ideas?