Partial Page Rendering Using Hidden Iframe
Partial Page Rendering Using Hidden IFrame
Executive Summary:
Partial-page rendering removes the need for the entire web page to be refreshed as the result of a postback. Instead, only individual regions of the page that have changed are updated. As a result, users do not watch the whole page reload with each postback, which makes user interaction with the Web page more seamless.
Developers namely absence to multiplication such behaviors to their network pages are constantly faced with a laborious determination. All of these operations can be implemented using a quite simple solution: along refreshing the whole sheet in feedback to the consumer interaction. However this solution is effortless merely no always pleasing. The full page refresh can be slow, giving the user the impression that the applying namely unresponsive. Another adoption is to appliance such movements using JavaScript (or additional client-side scripting technologies). This results in faster reaction periods, at the disbursement of more intricate, fewer portable code. JavaScript may be a agreeable choice for simple actions, such as updating an image. However, for extra perplexing actions,
Tods women shoes, such as scrolling via file in a table, book custom JavaScript code can be a very challenging enterprise.
This paper provides a solution which avoids the disadvantages of the full page refresh and custom JavaScript solutions. In this paper partly page rendering functionality provides the aptitude to re-render a limited portion of a page. As in the full page render solution, partial page rendering sends a request behind to the application on the middle-tier to fetch the new contents. However, when partial page rendering is used to update the page, merely the modified contents are sent back to the browser. This paper gives the solution using a hidden IFrame and simple JavaScript to incorporate the new contents back into the web page. The end result is that the page is updated without custom JavaScript code, and without the loss of context that typically occurs with a full page refresh.
Introduction:
Web pages typically aid a kind of actions, such as entering and submitting form data and navigating to different pages. Many web pages also support another type of action, which is to permit the user to make modifications to the contents of the web page itself without actually navigating to a different page. Some examples of such actions include.
Clicking on a interlock could update an image on the same page. For example, an automobile configuration application might update an image of a car as the user chooses different options, such as the preferred color.
Selecting an item from a choice carton might result in revisions to other fields ashore the same page. For sample, electing a automobile make might update the set of accessible automobile models that are exhibited.
Clicking a link or selecting an item from a choice could be used to scroll to a current page of data in a table. Clicking a button in a table might add a new row to the table.
All of these actions are similar in that they outcome in the same page being re-rendered in a slightly assorted state. Ideally, these changes should be implemented as seemlessly as possible,
gommino tods, so that the user does not experience a loss of environment which could divert from the mission at hand.
Partial page rendering can be implemented with very simple solution using a hidden IFrame and minimal JavaScript. Any part of the page can be partially rendered with using a div or table tags in HTML.
Page Elements That May Change During PPR:
?Re-Render Data: The same fields are redrawn but their data is updated. Examples contain the Refresh Data action button, or recalculate absolutes in a table.
?Re-render Dependent Fields: Fields may be additional, removed,
tods loafers men, or change series, and data may be updated. Examples include the Country choice menu, which may display different residence fields, and toggling between Simple and Advanced Search.
?Hide/Show Content: Both fields and data toggle in and out of view.
Page Elements That Do Not Change During PPR:
Some page ingredients are always related with a page, regardless of the content displayed on the page.
As a common rule of thumb, elements upon the page title (besides message boxes) remain constant and do not change rank, though elements in footer constant but may move up or down the page to accommodate changes to page content. The emulating elements never change when PPR is initiated:
?Branding
?Global buttons
?Tabs, Horizontal Navigation, SubTabs
?Locator elements: Breadcrumbs, Train,
tods shoes outlet, Next/Back Locator
?Quick links
?Page titles (premier class header)
?Page footer
?Separator lines among the Tabs and Page Title
In most cases the retinue elements will also not change, other than moving up or down the page to accommodate changed elements. Nevertheless, in decisive cases actions on the page may necessitate them to be redrawn:
?Side Navigation, unless it contains a Hide/Show control.
?Subtabs
?Contextual information
?Page-level action/navigation buttons
?Page-level Instruction txt
?Page-level Page tickets
?Page-level Key Notation
In all above scenarios this solution can be used to fulfill the good performance and user interaction of the web pages.
Contexts in Which PPR Should Not Be Used:
When PPR is implemented correctly, it significantly improves application representation. When performance promotion is not possible with PPR, it should not be implemented, thus averting unnecessary code bloat, PPR can��t be used when navigating to another page (with a different title).
Partial Page Rendering Solution:
Solution catered to the Partial Page Rendering using simple hidden iframe and JavaScript, this can be used as a generalized solution to all the Partial Page Rendering scenarios.
Below is the chief html (Table 1.1), which will have two buttons an is to show a simple table which will be generated by the server, and different button to remove the table.
HTML Code:
[head]
[title] Main Document [/title]
[script language="JavaScript"]
[!--
function showTable()
hiframe.location="./table.htm";
function removeTable() {
file.getElementById("tableId").innerHTML="";
}
//--]
[/script]
[/head]
[body]
[iframe id="hiframe" style="visibility:hidden;display:none"][/iframe]
[table]
[tr]
[td]Table::[/td]
[td][/td]
[/tr]
[tr]
[td colspan="2"][div id="tableId"][/div][/td]
[/tr]
[tr]
[td][input type="button" value="Show Table" onclick="showTable()"][/td]
[td][input type="button" value="Remove Table" onclick="removeTable()"][/td]
[/tr]
[/table]
[/body]
Table 1.1
[iframe id="hiframe" style="visibility:hidden;display:none"][/iframe]
This iframe tag is used as target to the Partial Page Rendering Request.
The tag [input type="button" value="Show Table" onclick="showTable()"] gives the user action to obtain the contents of a table from the server, in this solution sample html is provided to render the table,
tods collection 2010, which supposed to be generated by the server.
The tag [input type="button" value="Remove Table" onclick="removeTable()"] gives the user to remove the table from the user interface.
The JavaScript
function showTable()
hiframe.location="./table.htm";
Is used to get the contents from the server, the line hiframe.location="./table.htm"; sends the GET request to the server, and as a response iframe gets the HTML.
If the prerequisite insists to send a POST request for Partial Page rendering Response, that can be achieved by setting the html form element target property as the appoint of hidden iframe.
The code for the post request looks like
[manner method=��post�� action=��/myaction�� target=��hiframe��]
Partial Page Rendering Server Response:
Table 1.2 shows the specimen response from the server for Partial Page Rendering. This response has the JavaScript code to transfer the HTML from hidden iframe to main page.
HTML Code:
[head]
[script language="JavaScript"]
[!--
feature iframeLoad()
parent.document.getElementById("tableId").innerHTML = document.getElementById("tableId").innerHTML;
//--]
[/script]
[/head]
[body onload="iframeLoad()"]
[div id="tableId"]
[table]
[tr]
[td]1[/td]
[td]One[/td]
[/tr]
[tr]
[td]2[/td]
[td]Two[/td]
[/tr]
[/table]
[/div]
[/body]
Table 1.2
The tag [div id="tableId"] encloses the content to transfer from hidden iframe to main page.
[table]
[tr]
[td]1[/td]
[td]One[/td]
[/tr]
[tr]
[td]2[/td]
[td]Two[/td]
[/tr]
[/table]
This is the content to show the table to user.
The code [body onload="iframeLoad()"] is used for triggering the action to migrate the content.
function iframeLoad()
parent.document.getElementById("tableId").innerHTM L = document.getElementById("tableId").innerHTML;
This JavaScript function does the transferring data from the hidden iframe to main page.
parent.document.getElementById("tableId").innerHTM L This portion refers to tag div html id in main page and this chapter document.getElementById("tableId").innerHTML refers the HTML of the Partial Page Response.
Conclusion:
Improve the user experience with Web pages that are richer, that are more responsive to user actions, and that conduct favor traditional consumer applications. Reduce full-page refreshes and avoid page flicker. Partial page rendering using iframe is a very simple solution.
References:
1.http://ajax.asp.net/docs/overview/PartialPageRenderingOverview.aspx
2.http://www.w3schools.com/htmldom/dom_obj_document.asp
3.http://www.w3schools.com/tags/tag_iframe.asp
4.http://www.oracle.com/technology/tech/blaf/specs/ppr.html
5.http://download-west.oracle.com/otn_hosted_doc/jdeveloper/904preview/uixhelp/uixdevguide/partialpage.html
Tods shoes channel -Dirty Roulette Tips and Tricks _9323
tods accumulation -Instances where you ought not u
To remove the objects in it can be saved under the standard, such as: Object aaa = myList.get (0);
so we put in the first stored in the myList object taken out to the aaa friends.
five fingers.