I use jQuery very often, but am not a javascript expert and have trouble wrapping my head around it sometimes when I have to make alterations.
In my current project I am using ColorBox (
http://colorpowered.com/colorbox/ - one of the plugins that makes a new page pop up in a pretty way). So when I click on an image, the new page pops up and the browser window behind it goes dark, you know the drill.
But I also need to use this image as the submit button in a form. So when the user presses the submit button, the form action page comes up, and the form is submitted to this new page.
I'm having trouble making both of these things work.
The ColorBox line of code in question looks like this:
Code:
<a href="quote_life.html" class='example5'><img src="images/btn_getquote.png" /></a>
That works. I'm having no problem with ColorBox.
But how to turn that into a submit button? It's the "class='example5'" that triggers ColorBox. So I've tried adding that to a line of input:
Code:
<input type="image" src="images/btn_getquote.png" class='example5'>
And I've tried adding an "OnClick='SubmitForm();'" line to the first example above, etc. I'm just not sure what combinations I should be using to make this work. Always, when I try to turn the first "a href" line of code into a submit function, the form works, but the ColorBox breaks.
Hints? This doesn't seem like it should be difficult. Thank you!