[thelist] Brain fart html w/asp (revisited)

Chris W. Parker cparker at swatgear.com
Fri Apr 26 11:45:12 CDT 2002


hi there.

this is my first post so i hope i don't break any "rules".

what you can do instead of have two forms, or a nested form (which i
don't think works?) is to use some radio buttons to dinstinguish between
what you want to do.

for example you will have one form but allow the user to either "save
Article" or "Submit for Review" their article.

<input type="radio" name="action" value="save"> Save article<br>
<input type="radio" name="action" value="submitForReview"> Submit for
Review

that will/should look like this on your page...

( ) Save Article
( ) Submit for Review

when the form is sent it goes to a page that has an If...Else in it.

If(action="save") Then
  do this stuff....
ElseIf(action="submitForReview") Then
  do this stuff instead...
Else
  do something else...
End If


hope that helps.
chris.


-----Original Message-----
From: Rob Smith [mailto:rob.smith at thermon.com]
Sent: Friday, April 26, 2002 9:32 AM
To: 'thelist at lists.evolt.org'
Subject: RE: [thelist] Brain fart html w/asp (revisited)


This message is in MIME format. Since your mail reader does not
understand
this format, some or all of this message may not be legible.
--
[ Picked text/plain from multipart/alternative ]

That's all well and good and I understand that now. But my form does
something already. Is this possible:?

  form 1
-------------------------------------
|	form2					|
| --------------------------------- |
| |					    | |
| |					    | |
| |   ...				    | |
| |               SAVE		    | |
| |_______________________________| |
|						|
|			SUBMIT		|
-------------------------------------

Nested forms. Same fields in both but one command sends off to another
page,
while the other actually submits?

My ultimate goal: In a CMS, when you submit an article, it theoretically
goes for review. This time, I don't want that but have the option to
save
and come back to it later before I submit for review.

Other theories?

Rob

Rob


Your sub saveArticle() lives on the server.  Your
onClick="saveArticle()"
lives on the client browser.  They don't know about each other.  You get
that error because IE says, "there's no client-side JavaScript or
VBScript
function called "saveArticle()".  I don't know what you're talking
about."

You would actually have to have a form POST (or GET) to do what you're
after.

Like:

<%@LANGUAGE="VBSCRIPT"%>
<%
If Request.Form("Save") = "Save and Exit" Then
	' We got a post
	saveArticle
Else

End If

Sub saveArticle()
	Dim stuff, stuff_1, stuff_2
	'rest is commented out
	Response.Write("<p>Sub saveArticle() was called.</p>")
End Sub

%>
<HTML>
<HEAD>
<TITLE></TITLE>
</HEAD>
<BODY>
<form method="POST" name="frmSaveArticle">
   <input type="submit" name="Save" value="Save and Exit" />
</form>
</BODY>
</HTML>

-----Original Message-----
From: Rob Smith [mailto:rob.smith at thermon.com]
Sent: Friday, April 26, 2002 10:10 AM
To: Thelist (E-mail)
Subject: [thelist] Brain fart html w/asp (revisited)


This message is in MIME format. Since your mail reader does not
understand
this format, some or all of this message may not be legible.
--
[ Picked text/plain from multipart/alternative ]

Hi

This about calling ASP 2.0 functions from html forms...again.

Here's what I have

<%@LANGUAGE="VBSCRIPT"%>
<%
sub saveArticle()
	dim stuff, stuff_1, stuff_2
	'rest is commented out
end sub
%>

...

<form>
   <input type="button" name="Save" value="Save and Exit"
onClick="saveArticle()"> </form

When I try to click on the button in the web browser, IE5(? matters not)
throws an error: "Object expected"

What could possibly be wrong with this? missing anything?

Thanks in advance,

Rob


The information in this electronic mail message is sender's business
Confidential and may be legally privileged.  It is intended solely for
the
addressee(s).  Access to this Internet electronic mail message by anyone
else is unauthorized.  If you are not the intended recipient, any
disclosure, copying, distribution or any action taken or omitted to be
taken
in reliance on it is prohibited and may be unlawful.
The sender believes that this E-mail and any attachments were free of
any
virus, worm, Trojan horse, and/or malicious code when sent. This message
and
its attachments could have been infected during  transmission. By
reading
the message and opening any attachments, the recipient accepts full
responsibility for taking protective and remedial action about viruses
and
other defects. Galileo International is not liable for any loss or
damage
arising in any way from this message or its attachments.


--
For unsubscribe and other options, including
the Tip Harvester and archive of thelist go to:
http://lists.evolt.org Workers of the Web, evolt !
--
For unsubscribe and other options, including
the Tip Harvester and archive of thelist go to:
http://lists.evolt.org Workers of the Web, evolt !



More information about the thelist mailing list