Welcome, Guest
Username: Password: Remember me
1. The "search..." box above searches the Docs & Forum Posts. The "Search" tab above just searches the Forum Posts. :side:
Please use these to search for your issue *before* creating a new message topic, as your issue may have been previously solved.
2. Please put your Club # and Club Web Address in your Forum Signature (best) OR in each post to get faster support from us.
Click here to edit your signature at the bottom of the Profile Information tab.
3. Our user and admin docs are available at: support.toastmastersclubs.org/doc "There's a doc for that!" ;)
4. There is an "Opt In" Feature for newly added members. The Opt In document explains the strikethrough member information. Click Here to View the Post
5. When posting a New Topic , please include all relevant details and be specific. When did your issue 1st occur? What operating system, browser, & browser version are you using? Did you refresh your browser cache? Are your cookies enabled? Lastly, a screen shot is often helpful.
6. Please abide by the Terms of Use . We are volunteers contributing our spare time. We are happy to assist you, so long as you are respectful and courteous.
7. We are always looking for new FreeToastHost Ambassadors to join our team and support fellow Toastmasters in their use of the FreeToastHost website system. If you are familiar with the system and have some interest, send a Send Us a Private Message.
  • Page:
  • 1

TOPIC:

Another Javascript Mishap 11 years 2 months ago #33143

  • DavidBrown
  • DavidBrown's Avatar Topic Author
  • Offline
  • New Member
  • New Member
  • Posts: 5
  • Thank you received: 0
Club #4545
heightstoastmasters.com

I had a similar mishap on Friday. I tried to add the following snippet of Javascript:

<script type="text/javascript>
var q=document.getElementById("accordion2").getElementsByTagName("span");
var loggedIn=false;
for (var i = 0; i<q.length;i++){
if (q.classname="unlocked") loggedIn=true;
}
if (loggedIn) alert("Hi Dave");
</script>

Trying to get something different to happen if the user is logged on. (I now see I left out the closing quotes in the "type" tag, and I wouldn't be surprised of the "loggedIn" variable collided with something. Also, no <span> EVER has a class name "unlocked".)

Anyway, the main page loads, but the login links don't work. I can log in as administrator from other pages on the site, but the admin console won't launch, so I can't remove the snippet. Once again, I ask that you remove the offending Javascript snippet from the editable "home page" box.

With apologies,
David Brown
Heights Toastmasters, Club #4545
The topic has been locked.

Another Javascript Mishap 11 years 2 months ago #33144

  • Brian
  • Brian's Avatar
  • Away
  • Administrator
  • Administrator
  • Posts: 10441
  • Thank you received: 3862
David:

I suggest you test your java scripts before posting them on your site.

I have removed the offending code.
The topic has been locked.

Another Javascript Mishap 11 years 2 months ago #33145

  • DavidBrown
  • DavidBrown's Avatar Topic Author
  • Offline
  • New Member
  • New Member
  • Posts: 5
  • Thank you received: 0
Good idea. Thanks again.

David Brown
Heights Toastmasters, Club #4545
The topic has been locked.

Another Javascript Mishap 11 years 2 months ago #33146

  • SteveTheTechie
  • SteveTheTechie's Avatar
  • Offline
  • Administrator
  • Administrator
  • Posts: 11526
  • Thank you received: 3795
Dave,

What you are doing will likely get broken in a few months anyway. I intend to change some of the references you making use of. (e.g., accordion2)
The following user(s) said Thank You: DavidBrown
Last edit: by SteveTheTechie.
The topic has been locked.
  • Page:
  • 1
Moderators: Pamjliumarc33NotLiabledeedubbleyooNSBPhyllis Kirouacjgavin
Time to create page: 0.093 seconds
Powered by Kunena Forum