Making this work with!?

I have this code, that i want to work on an onclick..on a submit button.

Here's the code

<script language="javascript" src="xp_progress.js"></script>

<script type="text/javascript">
var bar1= createBar(300,15,'white',1,'black','blue',85,7,3,"");

Heres the link to the progress bar (js file)

Any help would be great!
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

<input type="button" onclick="createBar(300,15,'white',1,'black','blue',85,7,3,'');" />

jmingoAuthor Commented:
thanks for the comment....

i seem to get this

'undefined' is null or not an object...

any ideas?
Hi jmingo,

Here's a working example.  The code actually needs to be in the body, to position the bar.  So, you create it and immediately hide it.  The button just displays it.

Peace and joy.  mvan

<title>mvan - Q_21809673 solution</title>

<script language="javascript" src="xp_progress.js"></script>


<input type="button" onclick="javascript:bar1.showBar()" />

<script type="text/javascript">
var bar1= createBar(300,15,'white',1,'black','blue',85,7,3,"");

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Determine the Perfect Price for Your IT Services

Do you wonder if your IT business is truly profitable or if you should raise your prices? Learn how to calculate your overhead burden with our free interactive tool and use it to determine the right price for your IT services. Download your free eBook now!

Oh yeah, that button will actually look better if you put some text on it, like this:

<input type="button" value="Show Progress" onclick="javascript:bar1.showBar()" />

Peace and joy.  mvan
jmingoAuthor Commented:
thanks.. works great
You are welcome.  Peace and joy.  mvan
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.