Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Web Programming > JavaScript > Javascript How-To
Password Reminder
Register
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
Javascript How-To Ask your "How do I do this with Javascript?" questions here.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Javascript How-To section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #21 (permalink)  
Old October 7th, 2008, 02:50 PM
Friend of Wrox
 
Join Date: Jun 2008
Location: Snohomish, WA, USA
Posts: 1,649
Thanks: 3
Thanked 141 Times in 140 Posts
Default

There's a not-too-hard way to do this, I think.

This is ASP.NET, yes? So you have one <FORM> that is always the main <FORM> on the page.

But there's no rule that says you can't create another one, by hand.

So *AFTER* the </FORM> of the main form, plunk in this code:
Code:
<FORM name="HiddenForm" method="Post">
<%
Dim fld As String
For Each fld In Request.Form
%>
    <INPUT Type=Hidden Name="<%=fld%>" Value="<%=Request.Form(fld)%>">
<%
Next
%>
</FORM>
And now you can invoke
    window.opener.document.HiddenForm.submit( );
to effectively refresh the page!

I haven't tried this with ASP.NET, only with ASP, but I keep thinking about what has to be happening under the covers, and I believe it would work.

Understand, all that fancy stuff that ASP.NET uses--viewstate and the rest--has to be sent to the browser and then sent *back* from browser to server using standard HTTP Request protocol and standard browser methodology. And browsers *ignore* IDs when it come to deciding what to send from a <FORM> posting. Only the form field *names* are utilized and sent in the POST data in the same manner as a query string:
Code:
name1=value1&name2=value2&name3=this+is+value+with+space+and+question+mark%3F
(that is, with appropriate URL encoding as needed).

So if you copy *ALL* the form fields that *GOT* you to the current page display in the browser into this hidden form, then submitting the hidden form should produce a refreshed version of this same page.

Make sense?
Reply With Quote
  #22 (permalink)  
Old October 8th, 2008, 07:45 AM
Friend of Wrox
Points: 2,876, Level: 22
Points: 2,876, Level: 22 Points: 2,876, Level: 22 Points: 2,876, Level: 22
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Denver, CO, USA.
Posts: 428
Thanks: 57
Thanked 2 Times in 2 Posts
Default

Never tried working with multiple forms, but this sounds plausible. Thanks!
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Crystal report Freeze detail section. dpkbahuguna Beginning VB 6 0 August 23rd, 2007 05:29 AM
Change size of the Detail section of Forms/Report sinajs Access 1 February 13th, 2007 01:05 PM
Shrink Detail section on a report TimLB Access 2 January 23rd, 2007 08:45 AM
Access Report Detail lgpatterson Access 2 January 31st, 2005 08:19 PM
Formatting Report Detail Section rickf Access 3 February 3rd, 2004 07:15 PM



All times are GMT -4. The time now is 10:32 AM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.