Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Community Forums
 Code Support: ASP (Non-Forum Related)
 Form posts to file then refresh original page
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

StephenD
Senior Member

Australia
1044 Posts

Posted - 12 April 2007 :  02:27:41  Show Profile  Send StephenD a Yahoo! Message
I've got a form on a page that has an action that goes to another page which opens up as an XML file for download. The target file also updates an audit trail in the db so I want the original page with the form to refresh showing that the file has been exported. Is there any javascript for onclick or onsubmit that will do this and submit the form?

Shaggy
Support Moderator

Ireland
6780 Posts

Posted - 12 April 2007 :  04:32:23  Show Profile
Do you just need a bit of text or something to appear with that information? If you let me know the exact changes you want to make to the page once the form is submitted, I'll throw together a JS function for you.


Search is your friend
“I was having a mildly paranoid day, mostly due to the
fact that the mad priest lady from over the river had
taken to nailing weasels to my front door again.”
Go to Top of Page

StephenD
Senior Member

Australia
1044 Posts

Posted - 12 April 2007 :  05:57:27  Show Profile  Send StephenD a Yahoo! Message
Thanks Shaggy, once the page refreshes it will show the new audit information (who, what, when) so I don't think I need any additional text to appear....although I'm always happy to learn how you would do that :).
Go to Top of Page

Shaggy
Support Moderator

Ireland
6780 Posts

Posted - 12 April 2007 :  06:59:10  Show Profile
Hmm, not sure I understand 100%, Stephen (blame my recent insomnia ). Do you want to grab information from the database and use it to update the form values or do you want to take the values entered in the form and display them elsewhere on the page? Maybe if you went into a bit more detail on the whole process, it might clear things up a bit in my mind.


Search is your friend
“I was having a mildly paranoid day, mostly due to the
fact that the mad priest lady from over the river had
taken to nailing weasels to my front door again.”
Go to Top of Page

StephenD
Senior Member

Australia
1044 Posts

Posted - 12 April 2007 :  07:24:54  Show Profile  Send StephenD a Yahoo! Message
This is my form:

            <form method="post" action="admin_crimtrac_xml.asp" name="form6" style="display:inline">
            <input type="hidden" name="TOPIC_ID"  id="TOPIC_ID"  value="<%=TOPIC_ID%>">
             <input type="hidden" name="action"  id="action"  value="expcrimtrac">
            <input type="submit" name="submit7" id="submit7" value="Export CrimTrac">
             </form>


The page it calls has header information like so:
<%
Response.AddHeader "content-disposition","attachment; filename=crimtrac_"&Request.Form("TOPIC_ID")&".xml"
Response.ContentType ="application/xml"
%>

At the bottom of the same page I have some INSERT and DELETE statements that run ok updating information that is displayed on the originating page which stays in the background as the xml download dialog box appears in your screen. Refreshing the originating page shows the updated stats which are an audit trail of who exported the file (amongst other things). Hope that helps.
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Topic Locked
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.21 seconds. Powered By: Snitz Forums 2000 Version 3.4.07