problem with refreshing


Posted on 16th Feb 2014 07:03 pm by admin

in my site, i have an index page, it has a main div. this main div's content is changing according to the menu click as home, products etc. div is populating itz contents with html pages for these home, products n projects etc.
header part remains still. when user clicks on products, div is filled with product page. bt problem is , while refreshing the page, i am not getting the products page refrshed. it is going to the index page. what should i do for avoiding that.
m posting my code here
Line number On/Off | Expand/Contract<head> <script> function loadNewPage(temp) {var req = new XMLHttpRequest();req.open("GET", temp, false);req.send(null);var page = req.responseText;document.getElementById("main").innerHTML = page; }</script></head><body><div style="position:absolute; left: 119px; top: 129px; width: 782px; height: 39px;"> <ul class="menu"><li class="top"><a href="" onclick="loadNewPa :( ge('home.php'); return false;" class="top_link"> Home </a></li><li class="top"><a href="" onclick="loadNewPage('makeuser1.php'); return false;" target="_self" class="top_link"><span>Registration </span></a></li><li class="top"><a href="" onclick="loadNewPage('news.php'); return false;" target="_self" class="top_link"> <span>News</span> </a></li><li class="top"><a href="" onclick="loadNewPage('complaints.php'); return false;" target="_self" class="top_link"> <span>Complaints </span></a></li><li class="top"><a href="" onclick="loadNewPage('videos.php'); return false;" target="_self" class="top_link"> <span>Videos</span> </a></li><li class="top"><a href="" onclick="loadNewPage('downloads.php'); return false;" target="_self" class="top_link"><span>Downloads</span> </a></li><li class="top"><a href="" onclick="loadNewPage('about us.php'); return false;" target="_self" class="top_link"><span> About us </span></a></li><li class="top"><a href="" onclick="loadNewPage('contacts.php'); return false;" target="_self" class="top_link"> Contact us </a></li></ul></div><div style="position:absolute; left: -1px; top: 164px; height: 1031px; width: 1020px; background-color:#F5F5F5; " id="main"> </div></body>

No comments posted yet

Your Answer:

Login to answer
96 Like 8 Dislike
Previous forums Next forums
Other forums

php redirecting
i wont open a new thread but i have a question about redirecting....
i wonder why my code doesnt

Create multiple (n) arrays
Hi there,

I have the following need:

I have 2 arrays (coming from a databases)

Printer configuration
Hi All,
Suppose one of the user deleted the printer settings unfortunatly ,then what is the pro

System copy error in RUN ABAP REPORT PHASE
Hi,
I am performing system copy on my test server. I have previously taken export of JAVA + A

getting weird error..
okay, I'm getting an error on this particular function, something about the syntax in the mysql LIMI

Prevention Help
How can I use PHP or any other language (feel free to move this thread) to prevent users doing scree

How to update this array?
I am saving a string that looks this: username1, username2, username3...
into a single cell in a

Display error above the login forum help!
Hi guys. just so you know im not asking for someone to do this for me I just need to be pointed in t

Join Query Help
Hi all,

I am having problems with the below code, which we shall call 'my first join query'!

Session is not saving
I am not trying to do anything too fancy, I am just trying to get some $_SESSION data to save and us

Sign up to write
Sign up now if you have flare of writing..
Login   |   Register
Follow Us
Indyaspeak @ Facebook Indyaspeak @ Twitter Indyaspeak @ Pinterest RSS



Play Free Quiz and Win Cash