html problems

  • 1
  • Problem
  • Updated 9 years ago
  • Solved
For some reason "drop down menus" do not work on my Yola site. I've tried them in a different website and they worked just fine, I was initially using IE6 and then switched to IE8 and then finally used Firefox and the menus still don't work. Can someone PLEASE help? Here's the URL in case you'd like to have a look: http://www.freerecipesforkids.com/
Photo of Nader

Nader

  • 8 Posts
  • 1 Reply Like
  • anxious

Posted 9 years ago

  • 1
Photo of Sanja

Sanja, Official Rep

  • 10698 Posts
  • 495 Reply Likes
Hi Nader

Go into your HTML and locate the script code:
<script type="text/javascript">var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl.&quot; : "http://www.&quot;);document.write(une... src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));</script><script type="text/javascript">try {var pageTracker = _gat._getTracker("UA-9811263-1");pageTracker._trackPageview();} catch(err) {}</script>

Put a space before the var gaJsHost.

I did this and was able to get the form to work.

Let us know how it goes! =)
Photo of Nader

Nader

  • 8 Posts
  • 1 Reply Like
Hi little,

Thanks for your reply. I’m not an html expert so sorry to be a pest. Do you think you can tell me how can I edit the codes in Yola and follow your instructions.

I know I can access the source via either the editing page in Yola or from any browser, but I don’t know how to save the changes. The other thing that I noticed when I opened the source page (which was opened in a notepad window and named “index[1]”) from Yola editor that there was already a huge space before the “var gaJsHost”. I eliminated the space so it looked like this:
Photo of Emmy

Emmy

  • 5892 Posts
  • 299 Reply Likes
Hi Nadar,
Did you add the code into an HTML widget? If so, you can edit the HTML widget from the your site builder. Click on the little Edit icon in the upper left hand corner of the widget and see the HTML to make changes to it.

Emmy
Photo of Nader

Nader

  • 8 Posts
  • 1 Reply Like
Hi Emmy,

The code that Little instructed me to change is not in the html widget I originally placed the drop down menu code in.
Photo of Emmy

Emmy

  • 5892 Posts
  • 299 Reply Likes
Did you place it in a text widget using the HTML icon? I am just trying to help you get to the code to implement the change Littleus is referring to. If you can locate the place you pasted the code, you can make that change she is speaking of "Put a space before the var gaJsHost. "

Let me know if you need more assistance.
Photo of Nader

Nader

  • 8 Posts
  • 1 Reply Like
No, I placed it in a straight html widget. When I click on "edit" I only see the codes that I have placed, I can't see the codes Little was telling me about.
Photo of Emmy

Emmy

  • 5892 Posts
  • 299 Reply Likes
Are you able to see the code that Littleus is referring to above to make the change? Possibly I am not understanding what you are trying to do. From this thread it looks to me like Littleus has given you some instructions for editing the code block above. Do you have that code block somewhere on your site?
Photo of Nader

Nader

  • 8 Posts
  • 1 Reply Like
Ok, here’s the problem in details:

- In Yola site builder, using an html widget, I placed some html codes to create a “drop down menu box”.

- The form didn’t work when tested and had the following error message in my browser:

Line: 103
Char: 1
Error: 'document.nameform.tanyasmenu.options' is null or not an object
Code: 0
URL: http://www.freerecipesforkids.com/

- At first, I thought it’s a problem with Internet Explorer 6 being a bit old, so I switched to IE8 and then to Firefox (your recommended browser) and still had the same problem and the same error.

- I placed the same codes in a totally different website, tested them in various html editors and the form worked perfectly in all of them.

Reply continues in the next post.............
Photo of Nader

Nader

  • 8 Posts
  • 1 Reply Like
- I submitted the problem to the forum and received a response from Little who kindly instructed me to find the th code block to locate and make the necessary change by putting a space before the “var gaJsHost”.

- I went back to Yola site builder and in the html widget where I placed my codes I clicked “edit” so I can locate the code block that Little wanted me to locate and did not find it, the only codes that can be seen in the widget are the “drop down menu” codes which I have placed.

- From Internet Explorer, I clicked “view” then clicked “source”, a notepad document named “Index[1]” popped up in which I was able to locate the code block. I noticed that there was already a huge space before the “var gaJsHost”, however, I reduced this space to only one space. Then I saved the document and closed it, tested the form and still didn’t work. I re-opened the document and noticed that the change that I’ve made didn’t take effect!

I guess my question now is:

Where from exactly should I locate the code block and do the necessary change? Is there any other access to html codes apart from “view source” in Internet Explorer??
Photo of Nader

Nader

  • 8 Posts
  • 1 Reply Like
Emmy & Littleus,

PROBLEM SOLVED!

Now, if I tell you what happened can you promise you won’t swear at me for wasting your time? It was actually my mistake all along, I have several drop down menu forms and apparently I have to give each form a separate name in the code, which is something I obviously didn’t do that and gave them all the same name (I did mention that I’m not a html expert, didn’t I?). That’s why none of the forms were working.

Therefore, my apologies and many thanks for your prompt help, and hopefully this thread, at least, could be used as a useful guide to other users who want to create similar forms in their websites
Photo of Sanja

Sanja, Official Rep

  • 10698 Posts
  • 495 Reply Likes
At least you got it figured out! Yay!! =)