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>

96 Like 8 Dislike
Previous php-forum Next php-forum
Other php-forum

PHP Code reffering to database, doing something wrong.. pls help
Well i am quite new with PHP
and for school we have to make a PHP script which reffers to a Data

Help? Need help on project with templates involving mysql and php.
I'm having a hard time explaining what I want but basically here is what I have in place:

-Da

how to timeout $doc = new DOMDocument()->load($url)
I am currently using this $doc->load($url) to fetch an rss feed.
If a feed takes long than

Must-Know Topics of PHP
Can you guys list the must-know topics of PHP. I am still a learner and I am trying to cover most of

jquery validation in codeIgniter
hai i need to add client side validation to my fiels which are selected in a forloop.the fields are

Displaying pictures
i have worked my way through storing images in directory and storing the location in mySQL db.Now i

shoping cart issues
i´ve wrote this and works when i add an item to, my cart, but when i want to add othrer item just

path to include folder
Hi everyone,

When I'm testing locally, I have to add the name of the site folder as part of t

add to sql result
ok see rite now my sites hit counter is counted from the mysql visitor log i need to clear it aft

Multiple Pages
Hi. Im very new to php. I'm trying to create a basic login/registration page.

So I have a bas

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