0

I have a "wizard" that calls a java-script external file. This wizard changes around different measurements for a wheelchair depending on numbers inputted into text box's. It calls the java-script, the java-script picks out the right wheelchair and then displays it back into a description box in the html.

A small part of my html code:

<script src="mywebsite/PPwizardA.js" type="text/javascript"> 
<input id="os5" name="os5" onChange="javascript: wizard()" onKeyDown="if(event.keyCode==13) event.keyCode=9" size="3" tabindex="2" type="text" />

This works in Joomla and works outside of a website (as in sitting on my desktop as just html and js files) But it doesn't work in WordPress.

Does WordPress have a whole other way of calling functions like this?

1
  • No. JS is JS. Open your browser's debugger, open the NETWORK/RESOURCE tab and reload the page. look for 404 errors. Commented Jun 19, 2013 at 17:37

1 Answer 1

1

Its likely due to the relative path you've used to get the script.

If you're building a theme or plugin you should consider using this method to include your scripts: http://codex.wordpress.org/Using_Javascript and http://codex.wordpress.org/Function_Reference/wp_enqueue_script

-Ken

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.