Using Floatbox to open new window, need to attach form element values

Using Float box (http://randomous.com/floatbox), here is a button:

<input style="font-size: 9px;" type="button" onclick="javascript:fb.start({href: '_placebid.asp?auction=400&lot=&minbid=&bid=', rev: 'theme:black width:440px height:320px'});" value="Place Bid">

Works fine as far as opening the new window. However, I need to attach values via Javascript to the variables lot, minbid and bid. Two are in hidden form fields, the third is a text box the user can type into. Do I need to move this to a function? How can I pull in those values prior to the new window being launched? Thanks.
Brad BansnerWeb DeveloperAsked:
Who is Participating?
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.

Michel PlungjanIT ExpertCommented:
Like this


<input style="font-size: 9px;" type="button" 
onclick="javascript:fb.start({href: '_placebid.asp?auction=400&lot='+escape(this.form.lot.value)+'&minbid='+escape(this.form.minbid.value)+'&bid='+escape(this.form.bid.value), rev: 'theme:black width:440px height:320px'});" value="Place Bid">

Open in new window

0
Michel PlungjanIT ExpertCommented:
If you do not have any VBScript on the page, you can remove the javascript: from the onClick. Here is a more readable version:

<input style="font-size: 9px;" type="button" 
onclick="fb.start({href: '_placebid.asp?auction=400'+
'&lot='+escape(this.form.lot.value)+
'&minbid='+escape(this.form.minbid.value)+
'&bid='+escape(this.form.bid.value), 
rev: 'theme:black width:440px height:320px'});" value="Place Bid">

Open in new window

0

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
Brad BansnerWeb DeveloperAuthor Commented:
Thanks!
0
The Ultimate Tool Kit for Technolgy Solution Provi

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy for valuable how-to assets including sample agreements, checklists, flowcharts, and more!

Brad BansnerWeb DeveloperAuthor Commented:
Initially had a problem because I left off the <form> </form> tags. Is it really a requirement to have those when doing onclick events like this? I guess because you had this.form it needed the form elements, but possible to do it without?
0
Michel PlungjanIT ExpertCommented:
erm yes, but better to keep it in - if you do not like the space it makes, give it a display:inline style

Alternatively give each field an ID instead of the name and change
this.nameOfField to
document.getElementById('idOfField')
0
Brad BansnerWeb DeveloperAuthor Commented:
I'd love to have a way to eliminate the extra space created by forms. Do you put it right in the <form> element? Like:

<form style="display:inline;">

Is it as simple as that?
0
Michel PlungjanIT ExpertCommented:
erm try it and you will see ;)
0
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
JavaScript

From novice to tech pro — start learning today.