Dynamic Form Not Refreshing On Browser Back

Aug 6, 2010

I'm writing php based website that queries a database and writes the html with the results. On the home page, I am querying one database and receiving data to connect to other databases (i.e., database hostname, username, and password). Depending on the link selected, the homepage creates a dynamic form and sends the data via method=post. The next dynamic webpage receives the data via $_POST and connects to a different database for the rest of the website content.

I can successfully select a link on the home page and load the data for the second page the first time, but I have a problem when I hit back on the browser. The browser takes me back to the home page but if I select another link for another database, it does not "post" the new database info and the second page looks the same as the first time it loaded.

Here is my code
Code:
function database(project, hostname, username, password) {document.body.innerHTML += '
<form id="databaseform" action="project.php" method="post"><input type="hidden" name="project" value="' + project + '">
<input type="hidden" name="dbhostname" value="' + hostname + '">
<input type="hidden" name="dbusername" value="' + username + '">
<input type="hidden" name="dbpassword" value="' + password + '">
<input type="hidden" name="dbpassword" value="' + password + '"></form>';document.getElementById("databaseform").submit();}

View 5 Replies


ADVERTISEMENT

JQuery :: Not Refreshing Page - Form That A User Selects Item From Dynamic List

Mar 26, 2011

I have a search form that a user selects item from dynamic list hits the submit button and it returns each matchingresulton same page in an update form, i have 2 checkboxes in update form that updates the DB when 1 is checked, this all works fine until i check the checkbox the data updates ok but allremainingupdate forms are removed because the page refreshes.

So i need to update formstwith out page refreshing but i cant get it to work with multiple forms on same page.

View 2 Replies View Related

Dynamic Form Dissapear When Using Back Button

Sep 27, 2004

I create a dynamic form which appear when user click on + button. The problem is, if the user make a mistake and they want to go back using back button after the form is submitted, the dynamic for dissapear.

Is there a way to make the dynamic form stay, even after you submit, then you use back button to the original page.

View 1 Replies View Related

Using History.back And Refreshing

Nov 22, 2006

I have an input button that i have assign to. Is there a way to use this but force the previous page to be refreshed?

View 3 Replies View Related

Having A Lightbox Pop Up When A User Clicks The Back Button In Their Browser Rather Than Just Navigating Back

Jul 1, 2011

I'm looking to have a lightbox pop up when a user clicks the Back button in their browser rather than just navigating back. The purpose is to ask a question with a Yes/No answer, and if they click No, I allow them to go back. The only thing I've found anything like this is the onUnload event, but that doesn't prevent them from going back. How should this be handled?

View 1 Replies View Related

JQuery :: Stopping Back Button From Refreshing The Page And Undoing All The User Actions?

Aug 25, 2010

I have a number of pages that organize book data by category and then by unit, chapter, section, etc... Since there is a ton of data I display the headings and hide the rest of the content for the category. When a user clicks the heading then the content for the heading is shown underneath it. This works great and the users don't have to scroll (at least not much in comparison to if everything on the page was visible) unless for some reason they expand tons of stuff.

The problem:My company wants it so that if they expand a bunch of stuff and then browse to another page, that when they click the back button, everything should still be expanded as they left it. The issue is, this content is only available to logged in users and is based on their current location (which they can change at any point), so if their session expires or they logout, using the back button to get to these pages needs to redirect them to the login screen, if they change pages and change their location, going back to this page needs to display the correct content for their location. It is kind of a catch-22. Of course in the eyes of my company "shouldn't it just work that way?"

View 2 Replies View Related

Div's Not Loading Without Refreshing Browser?

Dec 26, 2008

I have a page with various divs containing SWF's and some HTML and JavaScript. The problem is that, when the page is first visited using IE7, half of the content doesn't appear. So, I have created a loadDivs(); function that looks like this::

Code:

function loadDivs()
{
var mardi2= $('mardiGras');
mardi2.show();

[Code].....

View 6 Replies View Related

Disable Browser From Refreshing?

Feb 18, 2009

Is it possible to disable the browser from refreshing when settings document.location.href

for example here's what i would like to do

if you're at mysite.com you'll click on a link. that link will fire a func that will make the location mysite.com/about however i don't want the browser to refresh. instead i want to write some javascript that will do someother stuff. i know it seems pointless but for the project i am working on it actually make pretty good sense (to me at least LOL).

i don't care about clicking the refresh button or F5 right now. just not having the browser refresh when i change the document.location.

View 1 Replies View Related

Dynamic Fields And Refreshing Throught InnerHTML

Apr 26, 2007

I've got simple script which adds to pointed DIV another DIV which contains
1 combobox (select) and textbox (input) - it's a AddNewRow() function. Every
field has got unique ID (acording with script below). There is also
getNewDig(int) function, which change value of appropriate input field
(checks value of select field and put it to input e.g. if in Pr_1 value has
changed than that value is set to the Number_1 input).

Problem is, values of existing fields are refreshing when new row is added
(to check it: click Add New Row, set value in select field, click Add New
Row).

Problem does not occur with IE. I suppose it's caused by innerHTML which
refresh whole document.getElementById( 'Tutaj' ). Code:

View 3 Replies View Related

Closing Browser Versus Refreshing

May 8, 2006

Is there a way to tell when the user closes the browser that doesn't
also happen when a page is merely being refreshed?

View 8 Replies View Related

Refreshing A Browser With OnClick Event

Jul 20, 2005

Is there a method in onClick event to refresh the browser. I'd like to
have users click on a link to listen to a streaming audio feed, but at
the same time as the click, refresh the browser so that my animated
gifs will still animate.

View 2 Replies View Related

Auto Browser Re-sized On The Site Loading / Refreshing - Safari?

Jun 29, 2010

Not what i would like but the client wants the browser re-sized on the site loading/refreshing... Been using the following and it works fine.... apart from in Safari. how i can get it working in Safari, or no chance?

Code JavaScript:
$(document).ready(function() {
window.resizeTo(1152, 866);
});

View 6 Replies View Related

Back - Forward Browser Button For Iframe - Bring Back/forward Iframe Or Top Window?

Jan 24, 2011

I am wondering how Back, Forward browser button works for iframes. Does it bring back/forward iframe or top window? I remember I had before a problem because I wanted to bring back iframe and not top window as it did. But today I tested my Facebook app and was surprised to see it works as I need which means it brings back/forward iframe window and not top. Is it possible that Facebook has some javascript code which does that or is this normall behaviour?

View 4 Replies View Related

Browser Back

Jun 16, 2007

i need to make a link called "back" to get the browser back 1 page

View 8 Replies View Related

Dynamic Style Changes Not Surviving Back Button

Jul 8, 2006

I have two radio buttons with two options,YES and NO. When the user click on YES, I use some JavaScript to display some text, as below:

obj.style.visibility='visible'

Or if they click No I collapse it again with a style change:

obj.style.visibility='hidden'

So, there has two scenarios:

1.) By default value is YES so the text is 'Visible', when user click on NO (the text will be hided) and submit by proceed to another page and When they then click the browser Back Button to return to the first page, the text is "visible'.

2.) By default, the text is "hide" and it will be reflected when user click on "YES", but when user proceed to another page and When they then click the browser Back Button to return to the first page, the text is "hide".

View 7 Replies View Related

Disable Back Button In The Browser Using Php?

Mar 13, 2009

I am writing a prgram in php.when i click "log out "button ,it redirects to my first page "index.php".(username & password)and then by clicking back button in the browser ,it showing all my previous pages that i visited.I want to disable back button in the browser (javascript should support in all browser) using javascript or php

View 3 Replies View Related

JQuery :: Detecting Browser's Back Button

Apr 12, 2011

I have a jquery-powered "start page" that checks your log in and if successfull it slides in a "menu" of new places to go. The problem is, if you click back from one of the new places, the original "start page" looks as if you never logged in. You have to reload the page. Not very intuitive and this website is for kids. Now I've tried setting form field values with server session variables, javascript variables, etc etc but they all get reset when you click back. I've tried the "onunload hack" which I don't fully understand, and then read a bit about the onhashchange event which is from what I gather only compatible with HTML5 browsers...is there no way to detect if the user is already logged in when they click the back button or am I not doing enough homework?

View 2 Replies View Related

JQuery :: Capture The Browser Back Button ?

Nov 14, 2011

I need to capture the browser back button to execute ajax function

View 1 Replies View Related

JQuery :: Append() And The Browser Back Button?

May 8, 2009

I use append() to add html fragments to a page dynamically. This works fine until the user navigates to another page and then clicks on the browser back button. The dynamically added html fragments are no longer visible. I read somewhere that dynamically added elements are not remembered by the browser and therefore the back button will only render the original page (without the dynamically added elements).

View 2 Replies View Related

Reload/Refresh On Browser Button Back?

Jun 20, 2011

I need some script to force the browser to reload/refresh when a page is reached from the back button.

EG You're on page A -> You click a link onto page B -> You Press Browser back to go onto Page A, it has old content that requires a reload.

Now, my page is currently php so I won't bother with my code here as I am looking for any solution (I have also posted in php forum).

Any JS solution that will trigger a reload on browser back is appreciated. I have tried a few ideas, most work in Chrome, IE always works, Firefox 4 and Opera 11 wont reload, simply fetching from cache I believe.

View 3 Replies View Related

Disabling The Back Button For Opera Browser?

Sep 16, 2010

Ive tried all codes that can be found on the net bout disabling the back button on browsers... But negative with OPERA browser...

View 5 Replies View Related

Named Anchors And Browser Back Button?

Aug 3, 2009

Named anchors and browser back button? Go here and click through the nav items at the top. Now click the browser back button! See how you have to now go back through all those named anchors? Is there some way using JavaScript (I imagine) to bypass all those?

View 11 Replies View Related

How To Handle Browser Back Button Event

Nov 29, 2010

I have one requiremnt,i.e, How to handle the browser back button event, when User click on the Browser Back button, i need to redirecting the our custom page, i.e Error page.

View 1 Replies View Related

Checkbox Disable Field Browser Back

Oct 19, 2006

I have a form with some text fields that are disabled UNLESS a checkbox is checked. Initially the text fields are disabled and the checkbox is unchecked.

The code is something like this:

Code:
function disableTextbox() {
if (chk.checked) {
txt.disabled = false;
} else {
txt.disabled = true;
}
}

<form action=something.cfm>
<input type=checkbox name=chk onclick=disableTextbox();>
<input type=text name=txt disabled>
<input type=submit>
</form>
When the form is submitted, some validation is performed. If anything fails, I display an error message and show a link to go back (history.back).

The problem that I am having is that when you click on the link to go back, the checkbox on the form is checked, but the text fields are disabled.

You have to re-click the checkbox to update the text field.

View 3 Replies View Related

JQuery :: Saving Data For Browser 'back' Button?

Jun 29, 2011

I found this script for filtering data in a table:[URL]

However say I type something in the filter, I click a link on the page, and then use the back button...the form resets. Is there a way to prevent this/leave the table filtered?

View 1 Replies View Related

Browser Back Button On A Page Using Iframe Content?

Feb 1, 2011

when you have a page that contains an iframe, and then navigate inside the iframe, hitting the browsers back button will only affect the contents of the iframe and not the entire page. I've been searching all over for solutions and cant find one that works for my current implementation.


function ShowPage(frame)
{
frames[0].location = frame+'.html'
frame.contentWindow.location.replace(newUrl);
}
[Code]...

View 4 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved