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 8
Other forums
PHP Session Issue
I'm having an issue with one section on my website dealing with sessions. Now I know that myself and
Accept only alpha characters
I've got this bit of code ready for accepting a phrase:
Code: if (!eregi ("", $_POS
mod_rewrite.c on windows ??
why it's not working on windows while it's working on other hosts???
this is the code i got
Place specific image in html page when specific name is typed.
Hello,
Fairly new to PHP and was curious if someone might know how to solve a fairly simple r
Random Number Generation And Probability
Hello, I am working on a function which has to insert data into a SQL table.
we have to suppl
Internal class functions don't seem to get executed.
Hi. Can someone please put me out of my misery on this. I don't write much PHP and this has me baffl
Sessions Value Not Saved
Hi,
Im making a login form and im using this code:
Code: if($login=="true"){
Text Not Displaying Correctly With PHP:GD
I recently moved servers and since then I have noticed that one line of text is showing weirdly.
Keeping data in form
How can I keep whatever I write in the form?
Form submissing with PHP and JQuery/Ajax
I have searched everywhere, but cannot find a solution for this... I have worked all day trying to g