navigation
a webmaster learning community
     Home    Register     Search      Help      Login    
Sponsors

Shopping Cart Software
Ecommerce software integrated into Frontpage, Dreamweaver and Golive templates. No monthly fees and available in ASP and PHP versions.

Website Templates
We also have a wide selection of Dreamweaver, Expression Web and Frontpage templates as well as webmaster tools and CSS layouts.

Frontpage website templates
Creative Website Templates for FrontPage, Dreamweaver, Flash, SwishMax

Search Forums
 

Advanced search
Recent Posts

 Todays Posts
 Most Active posts
 Posts since last visit
 My Recent Posts
 Mark posts read

 

Can divs submit forms?

 
View related threads: (in this forum | in all forums)

Logged in as: Guest
Users viewing this topic: none
Printable Version 

All Forums >> Web Development >> Cascading Style Sheets >> Can divs submit forms?
Page: [1]
 
carrie

 

Posts: 251
From: Port Orange, FL Volusia
Status: offline

 
Can divs submit forms? - 8/19/2008 16:28:51   
Hi all,

I've got code like this:

<div class="linkblock">
<form method="POST" action="searchres.asp" name="propsearch">
<input type="hidden" name="listings" value="Our_Listings" >
<input type="hidden" name="sectype" value="Single Family Detached" >
<input type="hidden" name="Proptype" value="Homes" >
<input type="image" src="../images/listings/home.jpg">
</form>
<div class="linkblockheader"> Homes</div>
<div style="clear:left;"></div>
</div>


Where a user would click on the image and submit a form. The linkblock div is actually a bit wider than just the image, and I'd like for the whole 'linkblock' div to be clickable (and change backgrounds on hover while I'm at it), which I can do in .css, by enclosing the div inside a hyperlink, and setting the various styles, but what I can't do, is make the whole div clickable and then still submit the form.

Is there a way to do what I describe without using javascript to submit the form? Can you make entire forms clickable?

Thanks,
Carrie
Tailslide

 

Posts: 6265
Joined: 5/10/2005
From: Out here on the raggedy edge
Status: offline

 
RE: Can divs submit forms? - 8/20/2008 2:44:07   
Not sure why you'd want it to... Is the form just basically searching for all houses (for instance)? If so, why have the form there? Why not just have the clickable div linking to a page that displays all the houses?

_____________________________

"My strategy is so simple an idiot could have devised it"
Little Blue Plane Web Design | Blood, Sweat & Rust - A Land Rover restoration project

(in reply to carrie)
carrie

 

Posts: 251
From: Port Orange, FL Volusia
Status: offline

 
RE: Can divs submit forms? - 8/20/2008 8:49:04   
Thanks Tailslide,

This form submits 3 or 4 form fields to the following page. It displays all homes for the brokerage (as opposed to all homes for the entire county), so there are a few fields I need to pass, and I just prefer not to send them in the URL.
Looks like I'll have to find a workaround, huh?

Maybe on the 'homes' page, the code could retrieve the referring URL, and if it matches the page this div is on, then I could set the value of the fields that way, and just eliminate the need for forms altogether.

Carrie

(in reply to Tailslide)
Page:   [1]

All Forums >> Web Development >> Cascading Style Sheets >> Can divs submit forms?
Page: [1]
Jump to: 1





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts