Hi, I have a website I want to add a modal box to.
I want the modal box to appear when the user clicks on the contact tab
so that it loads a contact form.
I have referenced the javascript files in my html file and I have
included the link:
<a onclick="Modalbox.show($('fouter'), {title: this.title, width:
650}); return false;" title="Contact us" href="#">Contact</a>
Fouter is the main wrapper div which holds my contact form. the code
for this page is:
<div id="fouter" style="display:none;">
<div id="floating_contact_box" >
<div id="floatingbox_header">
<h1>Get a Quote</h1>
<br />
<p>For help an assitance or to simply get a quote</p>
<img src="img/contact_mail_envelope.png" alt="Con tact us - Mail
envelope" />
<div id="close">X</div>
</div>
<div id="floatingbox_content">
<p>Some text is in here</p>
<form enctype="multipart/form-data" action="#" method="post">
<label>Your Name</label>
<input type="text" name="firstname" value=""/>
<span>(required)</span> <br />
<label><span>Your Email</span></label>
<input type="text" name="email" value=""/>
<span>(valid email required)</span> <br />
<label><span>Company Name</span></label>
<input type="text" name="company" value=""/>
<span>(required)</span> <br />
<label><span>Phone Number</span></label>
<input type="text" name="phone" value=""/>
<br />
<label><span>Product ref</span></label>
<input type="text" name="product" value=""/>
<br />
<label><span>Message</span></label>
<textarea cols="30" rows="8" name="comment"></textarea>
<br />
</form>
</div><!-- END OF FLOATINGBOX_CONTENT-->
<div id="floatingbox_footer">
<p>Some text</p>
<input type="submit" name="sendbutton2" value="Submit"
onclick="return contactforms_validate('2', false)"/>
</div>
I have set the main wrapper div "fouter" to display none, is this
correct?
my understanding is this div holding the contact form will then .show
when the user clicks the link and sets off the modal box holding the
contact form?
I have run it with firebug and I get 2 errors:
1st error: object.extend is not a function (modalbox.js)
2nd error: modalbox.show is not a function.
As far as I can see I have referenced the files correctly.. yet there
still seems to be some problems..
The site is on a test site at:
www.swaray.co.uk/Casenote/index.html
I have only set up the modal box on the index.html page...