Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8409723
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T23:59:20+00:00 2026-06-09T23:59:20+00:00

I developed a .htm document with an in-built script for javascript to run a

  • 0

I developed a .htm document with an in-built script for javascript to run a program. In google chrome, the program works fine, but I got a beta test complaint that it didn’t work on firefox 14.01 or opera. On testing with firefox 14.01, I can confirm it doesn’t work (I assumed opera to be the same). I cannot insist the audience upgrade their browsers, as this is supposed to be widely compatible.

Doing a little tracing of the issue, I installed Firebug, which, on clicking the Javascript button to generate a coordinate the first time, it worked (clearly showing the function is defined and exists), but the second time, Firebug complained that:

"ReferenceError: GenerateCoord is not defined".

This wouldn’t be so ironic if it only did this after generating an (encrypted) coordinate (thus calling GenerateCoord that is supposedly ‘undefined’).

If one looks in the code, one can clearly see that the function GenerateCoord is clearly defined before it is called. I would say firefox has an ‘onclick’ issue, but then it begs the question why did it work the first time I clicked it (calling GenerateCoord via ‘onclick’) but not the second?

Reloading the file allows the button to work the first time, and the first time only. I am baffled as to how firefox can call a function one time that it then says is undefined the next. Am I missing something here?

Javascript and HTML code can be viewed here:

http://pastebin.com/4qykTfEW

–

How do I solve the problem, and is there an easier solution than re-writing the code to avoid onclick (that seems to work in certain circumstances but not others)?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-09T23:59:22+00:00Added an answer on June 9, 2026 at 11:59 pm

    The problem is that using document.write overwrites the entire HTML page, thus inadvertently removing the GenerateCoord script. I’d suggest appending the link to the document (in ShowTarget) rather than attempting to re-write it.

    For example, have a container element where the link should be:

    <div id="links_container"></div>
    

    Then to append the links, use:

    document.getElementById('links_container').innerHTML = Link;
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Specifics: VC++ 7; Program works on XP, but crashes on Win7; developed using VS2003.NET
I developed my site and it works like a charm on my local machine.
I developed a custom file manager for tinymce. But even if adding image to
I developed a module to display submenus as stand alone module, every thing works
I am trying to set an event in JavaScript but it is not really
I'm a .NET developer, but for my current project I need to use Google
Just developed a front-end almost entirely in FF 3.6. It works perfectly in IE9
I want to access/add/read etc google calender from my Android program. I have tried
I developed a website (I'm not a hard core programmer, but I can get
Good day. I have developed an application which works successfully on my local machine

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.