Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Newbie Q - Getting forms to work!

Status
Not open for further replies.

JNeave

Programmer
Jan 28, 2002
125
GB
Got a database, SQL Server and running Visual Inter Dev 6.
Got an ASP page containing a form containing <INPUT> tags and a submit button.

Got an ASP page that will recieve that data and process it (works).

How do I get the submit button to send that data from the form to the next page?

I tried onClick=&quot;frmCaseSearch.submit;&quot;, that doesn't do anything.

cheers,

Jim.
 
<form> tag should contain &quot;action&quot; property with specified page that performs data processing:

<form name=&quot;frmCaseSearch&quot; action=&quot;process.asp&quot;>

and <input type=&quot;submit&quot;> button should not have any &quot;onclick&quot; - you don't need it.
 
This is what I have in my page

Code:
<FORM action=&quot;SearchNew.asp&quot; method=POST id=frmCaseSearch name=frmCaseSearch>
<DIV ID=&quot;divMainDetails&quot; STYLE=&quot;position:absolute; width:100%; filter: alpha(opacity=80);&quot;> 
****** TABLE WITH <INPUT>s ********
</DIV>

<INPUT type=&quot;submit&quot; value=&quot;Search&quot; id=submit1 name=submit1> 

</FORM>

It neither works as is or with &quot;onclick=&quot;document.all.frmCaseSearch.submit;&quot;&quot; added.

It does go back to the server when you click the submit button, but it doesn't go to the search results page, just comes straight back to this page with no results.

any idea?

cheers,

Jim.
 
OK, got a quick little form to send a string to a recieving asp page.

But my one still does not work.

I do use Interdev Design-Time controls (un-bound, thisPage_OnEnter populates them from a DTC recordset) whithin the form as input for the form. Could this have anything to do with it?

The <DIV>s within the <FORM> don't have anything to do with it do they?

cheers,

Jim.
 
I'd recommend to test a form separately, without placing it inside absolutely positioned block. Does it work as it should?
If yes, the reason is the div (I personally never place forms in such a way, this helps to aviod many possible problems). If not - a problem should be somewhere else, possibly in your asp page.
 
I got rid of the controls, I got rid of the divs, I put another form at the bottom of the page, that works fine....

Looks like I'm going to have to rebuild the page from scratch. Again....

Grrr....

cheers,

Jim.
 
Another update, I found the problem, but no solution presents itself.

Removing ALL design tim controls and switching the Visual Interdev scripting model OFF fixes the problem.

This does no explain why the second test form I added still works, but it did.

The VIDSM enclosed the whole of the asp page in a FORM called thisForm.

Does anybody knwo what the heck is going on??

cheers,

Jim.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top