Today's Posts Follow Us On Twitter! TFL Members on Twitter  
Forum search: Advanced Search  
Navigation
Marketplace
  Members Login:
Lost password?
  Forum Statistics:
Forum Members: 24,256
Total Threads: 106,575
Total Posts: 592,698
There are 98 users currently browsing (tf).
 
  Our Partners:
 
  TalkFreelance     Design and Development     Programming     Javascript :

Submitting form into a DIV

Thread title: Submitting form into a DIV
Reply    
    Thread tools Search this thread Display Modes  
11-24-2010, 03:38 AM
#1
Dan is offline Dan
Dan's Avatar
Status: Request a custom title
Join date: Feb 2005
Location:
Expertise:
Software:
 
Posts: 3,164
iTrader: 15 / 86%
 

Dan is an unknown quantity at this point

  Old  Submitting form into a DIV

Using: http://flowplayer.org tabs.

Code:
	<script type='text/javascript' src='http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js'></script>
	<script type="text/javascript" src="jquery.tools.min.js"></script>

		<form action="send.php" method="post" class="hook">
			<fieldset><label for="name">Your Name<b>*</b></label> <input type="text" name="name" /></fieldset>
			<fieldset><label for="email">Your Email<b>*</b></label> <input type="text" name="email" /></fieldset>
			<fieldset><label for="telephone">Phone Number</label> <input type="text" name="telephone" /></fieldset>
			<fieldset><label for="email">Website URL</label> <input type="text" name="url" /></fieldset>
			<fieldset><label for="brief">Quick overview of your project<b>*</b></label> <textarea name="brief"></textarea></fieldset>
			<input type="submit" value="Send" />
			<div id="error"></div>
		</form>

		<script>
		 $(function() {
			$("form.hook").tabs("div#error", {effect: 'ajax', history: false});
		 });
What I'm trying to achieve is when the submit is clicked it'll send the forms action into div #error.

I've seriously no idea why it's not working. Pointers would be brill.

Reply With Quote
11-24-2010, 04:34 PM
#2
Village Genius is offline Village Genius
Village Genius's Avatar
Status: Geek
Join date: Apr 2006
Location: Denver, CO
Expertise: Software
Software: Chrome, Notepad++
 
Posts: 6,892
iTrader: 18 / 100%
 

Village Genius will become famous soon enough

  Old

To display the action of a form when submitted:
Code:
$(".hook").submit(function(){ 
alert($(this).attr('action'));
return false; /*Stops the submission */ 
});

12-12-2010, 10:44 AM
#3
c69 is offline c69
c69's Avatar
Status: Junior Member
Join date: Nov 2009
Location: Kiev, Ukraine
Expertise:
Software:
 
Posts: 27
iTrader: 0 / 0%
 

c69 is on a distinguished road

  Old  people should read the specs

What you are trying to do, is just wrong.

Originally Posted by http://www.w3.org/TR/html401/interact/forms.html#h-17.3
action = uri [CT] This attribute specifies a form processing agent. User agent behavior for a value other than an HTTP URI is undefined.
p.s.: try using an iframe for this, or just google for a jQuery plugin.

Reply With Quote
Reply    


Thread Tools
Display Modes

  Posting Rules  
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump:
 
  Contains New Posts Forum Contains New Posts   Contains No New Posts Forum Contains No New Posts   A Closed Forum Forum is Closed