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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

yaromat and stored procedure

Status
Not open for further replies.

mother911

Technical User
Jul 28, 2003
15
0
0
US
I have a page to isnert new user information. I originally used and insert, and yaromat's check form behaviour, and it worked perfectly (yaromat fires from an onclick on the submit button).

I changed the insert to a stored procedure, and the problems began.
first problem, the page automatically runs the stored procedure when the page loads. I added <% If Request(&quot;Submit&quot;) <> &quot;&quot; Then %> to stop it from submitting on load, and instead waiting for the submit button.

second problem, the solution to the first problem created the second problem. Now it submits fine from the submit button, but it also will subimt with blank fields, because the check form behaviour no longer works.

All I need is a way to trigger the stored procedure after yaromat runs. The insert thru dreamweaver loaded the hidden field with MM_insert as a name, and the form name as a value and then used <% If (CStr(Request(&quot;MM_insert&quot;)) = &quot;formname&quot;) Then %> to trigger the insert. I have tried similar with no luck, but then again im really new to all of this.

thanks for any help
Ralph
 
Yaromat=JS=ClientSide
ClientSide will ALwaays get executed before ServerSide
Is your stored procedure called on the same page? or is it Add.asp-->StoredProc.asp
vs.
Add.asp(with storedProc.) <-->
<% If Request(&quot;Submit&quot;) <> &quot;&quot; Then %>
u could try:

IF Request.Form(&quot;field_that_has_to_be_populated&quot;) <> &quot;&quot; THEN
....

I would suggest using two paged....
1.asp with nothing but the form and a YY_validation stuff on it (form action=2.asp)
and
2.asp with the stored procedure being called (with the condition of the IF statement above to make sure user is not just executing the StoredProcedure with no info) and then user being redirected to eg. AddConfirmed.asp


this way u have 2 levles of &quot;entry_validation&quot; the JS from Yaromat and VBscript Request.Form thing

makes sense?
All the best!

> need more info?
:: don't click HERE ::
 
>Yaromat=JS=ClientSide
>ClientSide will ALwaays get executed before ServerSide
>Is your stored procedure called on the same page? or is it >Add.asp-->StoredProc.asp
>vs.
>Add.asp(with storedProc.) <-->
><% If Request(&quot;Submit&quot;) <> &quot;&quot; Then %>

It is definitely this way, stored procedure, and asp form same page.
> u could try:

>IF Request.Form(&quot;field_that_has_to_be_populated&quot;) <> &quot;&quot; >THEN
>....
Tried this as well, it still yields the same bad outcome. The page submits without running the yaromat check form.

>I would suggest using two paged....
>1.asp with nothing but the form and a YY_validation stuff >on it (form action=2.asp)
>and
>2.asp with the stored procedure being called (with the >condition of the IF statement above to make sure user is >not just executing the StoredProcedure with no info) and >then user being redirected to eg. AddConfirmed.asp
I am pushing for this right now, however my bosses like the idea of using one page.

>this way u have 2 levles of &quot;entry_validation&quot; the JS from >Yaromat and VBscript Request.Form thing

thank you for replying, you rule!
Rslph
 
HI Ralph!
&quot;I am pushing for this right now, however my bosses like the idea of using one page&quot;
welll tell you boss to do it himself then ...LOL J.K
the second page would not be even visible to the user...and yes ok a little more load on server to do the response.redirect....but we talking about milliseconds :)
here is 3 page set the does not use stored procedures but the same concept(YY_stuff as well)
hit me up on lebisol2(at)hotmail.com with your page...it's all workable!
Up to you!
All the best!

> need more info?
:: don't click HERE ::
 
Odd ending to this story, someone at another forum went to the site, looked over the code, dl'ed it and saved it locally, inspected the yaromat behavior and clicked ok, and it worked...he mentioned it to me and I did the same. Perhaps somewhere during all this testing, I deleted something from the yaromat check form behavior. The page works perfectly now using the check request.form(field) <> &quot;&quot; to trigger the stored procedure, I'd like to thank you all for helping.

Specifically, you Lebisol. I can't describe the hours of head to desk contact i've had with this.

Thanks so much!
 
:)
&quot;...hours of head to desk contact...&quot; LOL
it means u have a good desk :)
&quot;all is well that ends well&quot;
good luck!

> need more info?
:: don't click HERE ::
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top