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
Different actions for different parts of a string
<?php
function dosomething($string, $else = '') {
if (empty($else))
$string
registration form
first time posting. did some searches but didnt find exactly what i am looking for. dont flame cause
Help pulling in 'id' with "read more" link
I'm trying to create snippets of my articles in the cms I'm creating, and then have them redirect to
updating a single value to multiple non consecutive rows
I need to update the same value to multiple non consecutive rows. I need to add an experation date t
Need help urgant
why down my code ony return one item instead of all the items selected.
$arr = array($date,$
Help Import Animoto and Youtube
CAn someone help me urgently want to allow users on my website to import youtube/revver/dailymotion
Doubles are giving me problems
Ok so, first of all i made a double = 0.05, but when running the debugger it shows up as 0.04999. I
Logging and nologging bulk insert
Hi,
oracle version: 10g Enterprise Edition Release 10.2.0.4.0 - 64bit Production
using a loop help
Hi guys , i need some help. I have this loop :
while ($row = mysql_fetch_assoc($Result)) { ?&
Export hangs
Hi all, please help
I have a Oracle 10.2.0.3.0 database. When I want to query the dba_segmen