Can I do this in asp?

Results 1 to 4 of 4

Thread: Can I do this in asp?

  1. #1
    Join Date
    Dec 1969

    Default Can I do this in asp?

    It&#039s jscript that lets you submit a form with a link:<BR><BR>&#060;script language=javascript&#062;<BR>function newURL(frm)<BR>{<BR>/* comment the next two lines if you have specifed method<BR>and action in the &#060;form&#062; tag<BR>*/<BR>frm.method="post"<BR>frm.action="yourpage.asp" <BR>frm.submit()<BR>}<BR>&#060;/script&#062;<BR><BR>&#060;a href="javascript:newURL(document.yourformname)&#06 2;Your Link&#060;/a&#062;<BR><BR>This is where I have no clue on what to think. I&#039ve done querystrings/linked recordsets. Is this even possible? Before I test and waste my life away, I just wanted to ask.

  2. #2
    SPG Guest

    Default No.

    x.Form.Submit is a client-side call requiring action on the client side to occur and is therefore (by & large) out of bounds for ASP.<BR><BR>Rumor has it that ASP+ will allow binding of the x.Form.Submit to a link, but I&#039ve not used that.

  3. #3
    Join Date
    Dec 1969

    Default RE: Can I do this in asp?

    I&#039m not quite sure what you&#039re trying to do.<BR><BR>Javascript does have a form.submit method,<BR>and you can &#039manipulate&#039 the action <BR>property with querystrings using window.location.href.<BR><BR>But you might also be asking about interfacing with the server from the client.<BR>(that&#039s what the other guy though, i think) <BR><BR>The RDS object can create a database connection from the client to the server.<BR>Also Andrew (my flame pal) mentioned XML databinding.<BR>

  4. #4
    Join Date
    Dec 1969

    Default Do you *mean* ASP? Or HTML?

    None of the code you showed is related at all to ASP.<BR><BR>So have you tried this in your HTML code? It should work.<BR><BR>Actually, if you already have the Action= and Method= defined for the form, you can simply do<BR><BR>&#060;A HREF="javascript:document.formname.submit( );"&#062;Link&#060;/A&#062;<BR><BR>You don&#039t even have to call a user-written function. It works great. This is the *only* practical way to use an image to submit a form, for example:<BR><BR>&#060;A HREF="javascript:document.formname.submit( );"&#062;&#060;IMG Src="foobar.jpg"&#062;&#060;/A&#062;<BR><BR><BR>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts