Oh no! Where's the JavaScript?
Your Web browser does not have JavaScript enabled or does not support JavaScript. Please enable JavaScript on your Web browser to properly view this Web site, or upgrade to a Web browser that does support JavaScript.
Not a member yet? Click here to register.
Forgot Password?

\includes\jscript.js bug

Asked Modified Viewed 1,990 times
W
WEC
W
WEC 10
  • Veteran Member, joined since
  • Contributed 946 posts on the community forums.
  • Started 5 threads in the forums
  • Started this discussions
asked
Veteran Member

I have been trying to use the function show_hide() included in \includes\jscript.js without success.

First off, no core 6.01.6 files make use of the function show_hide(), so that's probably why it hasn't been noted that the function is not working.

The code for present function show_hide() that is not working and throws a FF "Error: msg_id.style has no properties":

function show_hide(msg_id) {
   msg_id.style.display = msg_id.style.display == 'none' ? 'block' : 'none';
}


To get it working it can be changed to:

function show_hide(msg_id) {
var el = document.getElementById(msg_id);
   el.style.display = el.style.display == 'none' ? 'block' : 'none';
}


Suggestion:

Either remove the function show_hide() or update the jscript.js to a working version of the function.

Since the function was probably working at some point back in time, best solution in my mind would be to update the jscript.js to the working version.
0 replies
There are no post found.

Category Forum

Bugs and Errors - 6

Labels

None yet

Statistics

  • Views 0 views
  • Posts 0 posts
  • Votes 0 votes
  • Topic users 1 member

0 participants

Notifications

Track thread

You are not receiving notifications from this thread.

Related Questions

Not yet