Currently, I'm working a project using webview android on inserting quiz question to database. I insert the data to database on page #add. But on the other page #retrieve it doesnt show the result from the database because I havent reload it. The only method that I know is
window.location.reload()
but it only reload for current page. Are there any method to reload other page?
Related
I tried to implement a tree view similar with this( https://iamrohit.in/javascript-css-horizontal-employee-treeview/ ) but the script only work just after first refresh of the page, I'm using angular, is there an option to load the page before so the user doesn't need to refresh the page every time because that's not my intention on this project.
I'm working on a website, and I want the post to stay there when I reload the page. And I don't want it to disappear when I reload it.
How do I do that?
You need to use localStorage or connect to a database in the backend.
If you're a beginner, just do some research on
localStorage.
I was trying to make an application in SharePoint and wanted to make it so that if you click on a button, it redirects you to a page and when that page loads I wanted it to instantly redirect the user to another page. ( I couldn't get the button to just redirect to the page I wanted on click, so that's why I tried doing it this way. ) I did this using a jQuery / JavaScript script. I'm new to making scripts so I was just testing and I ended up making this script:
<script type="text/javascript">
$(document).ready(function(){
Redirect();
});
function Redirect(){
$(document).load("url");
}
</script>
My problem is now that whenever that page loads, it just loads a blank page. But I can't get to the edit screen because it instantly redirects me to a blank page. I tried turning off JavaScript in Google Chrome but even though I was able to load the page without redirecting, I wasn't able to get to the edit page because it's in a jQuery AJAX drop down menu which obviously also doesn't work if JavaScript is turned off.
I would appreciate any help
EDIT: When I say edit screen I mean the place where I can edit the script. To do that I have to press a button on the page, but I can't do that since the page instantly redirects to a blank page.
Use the webpart maintenance page which allows you to remove and manage web parts without visiting the page, the instructions are as below.
Lets say your page is example.com/sites/default.aspx add the query string ?contents=1 to the page it will take you to the manage web parts page you can remove the script editor web part from there.
The other way is to use SharePoint designer to remove the web part this will also help you achieve the same result.
On an alert how to fire sql query and load the same page again, as well as how to navigate from one view page to another view page in php following MVC, without using session.
I am developing an app using jquery mobile 1.4. I have this problem that when I edit an item using an edit form, the changes is saved in the localStorage but when I visit the list view page it does not reflect unless I manually refresh the page.
My save event of the form is like this
//After the selected employees has been edited
localStorage.setItem("employees", JSON.stringify(employees)); //set the update values to localstorage
alert('Employee Updated Successfully');
$('#employees_list').listview('refresh');
$.mobile.changePage("#home_page");
So I don't refresh it manually I added
history.go(0);
The problem with history.go(0); is that after compiling with phonegap it shows a blank screen and takes quit a while when it reloads which makes it seem as if the app has crashed.
So any suggestion on how to refresh the listview page without having to reload the entire html file?
It is a single html5 page with the listview page
id = '#employee_list_view_page'.
Or alternatively set it to stop (or timeout) after some seconds so the user dont think the app has crashed.
Thanks
I noticed you are saving to the new data to the local storage, but it seems like you are not reloading the list with the new data before the refresh, thats probably why the page doesn't get updated. On top of refreshing the listview you also need to manually call the function you would normally use to load data into the listview. Make sure you call this function before calling refresh. Hope it helps!