473,782 Members | 2,623 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Problems reloading same page with new parameters

2 New Member
I have a web page and lots of XML files. When a link is clicked on the page, it calls a function via onclick with the XML file as a parameter:

[HTML]<body onload="InitCon tent();">
<a name="fileName" class="blah" href="javascrip t: void(0)" onclick="OpenCo lumnInfo('fileN ame')">Whatever </a>
</body>[/HTML]
OpenColumnInfo( ) takes the filename and reads in the relevant XML then squirts the contents into various tags on the current page, so there is no reload. This works fine, but the browser navigation buttons obviously don't change.

In an effort to get the back button working I thought I could just change OpenColumnInfo( ) to reload the page by calling one of:

Expand|Select|Wrap|Line Numbers
  1. window.open(http://www/etc/page.htm?fileName, "_self")
  2. window.location.href = "http://www/etc/page.htm?fileName"
I also changed the link to set href="".

However, when InitContent() is called by the reload, I notice that window.location .href = http://www/etc/ so it loses the htm filename and the parameter. I found it did sort of work with:

Expand|Select|Wrap|Line Numbers
  1. window.open(http://www/etc/page.htm?fileName)
In the sense that the new window was correct, but the old window also reloaded only with no parameters, so it lost what had been there. Anyway, I need it to stay in a single window.

Curiously, I note that if I remove the attribute href="" completely, then it does work, but the pointer no longer changes to a hand when over a link.

I'm currently working on IE7.0, though it will need to work on IE6.0 also.

Can anyone explain where I'm going wrong?
May 18 '07 #1
7 14015
dmjpro
2,476 Top Contributor
I have a web page and lots of XML files. When a link is clicked on the page, it calls a function via onclick with the XML file as a parameter:

[HTML]<body onload="InitCon tent();">
<a name="fileName" class="blah" href="javascrip t: void(0)" onclick="OpenCo lumnInfo('fileN ame')">Whatever </a>
</body>[/HTML]
OpenColumnInfo( ) takes the filename and reads in the relevant XML then squirts the contents into various tags on the current page, so there is no reload. This works fine, but the browser navigation buttons obviously don't change.

In an effort to get the back button working I thought I could just change OpenColumnInfo( ) to reload the page by calling one of:

Expand|Select|Wrap|Line Numbers
  1. window.open(http://www/etc/page.htm?fileName, "_self")
  2. window.location.href = "http://www/etc/page.htm?fileName"
I also changed the link to set href="".

However, when InitContent() is called by the reload, I notice that window.location .href = http://www/etc/ so it loses the htm filename and the parameter. I found it did sort of work with:

Expand|Select|Wrap|Line Numbers
  1. window.open(http://www/etc/page.htm?fileName)
In the sense that the new window was correct, but the old window also reloaded only with no parameters, so it lost what had been there. Anyway, I need it to stay in a single window.

Curiously, I note that if I remove the attribute href="" completely, then it does work, but the pointer no longer changes to a hand when over a link.

I'm currently working on IE7.0, though it will need to work on IE6.0 also.

Can anyone explain where I'm going wrong?

i don't understand http://www/etc/page.htm?fileNa me....
May 18 '07 #2
TomDestry
2 New Member
That's just my simplified description of the url. Is it my forgetting to add the quotes that's confusing?

The actual line is:

Expand|Select|Wrap|Line Numbers
  1. window.open("http://localhost:50847/ColumnHelp/default.htm?Column=MVGrossDelta", "_self");
May 18 '07 #3
acoder
16,027 Recognized Expert Moderator MVP
What does InitContent do?
May 21 '07 #4
dmjpro
2,476 Top Contributor
Does HTML can generate a dynamic web-page????
May 21 '07 #5
acoder
16,027 Recognized Expert Moderator MVP
Does HTML can generate a dynamic web-page????
Using javascript, yes.
May 21 '07 #6
dmjpro
2,476 Top Contributor
ACODER i think u misunderstood me.....

i mean to say .... is it a valid URL ....
localhost:50847/ColumnHelp/default.htm?Col umn=MVGrossDelt a

soryy ......
plz forgive me if anything wrong with my attitude.

kind regards.
dmjpro.
May 22 '07 #7
acoder
16,027 Recognized Expert Moderator MVP
Using the search property, it is possible to work with the query strings.
May 22 '07 #8

Sign in to post your reply or Sign up for a free account.

Similar topics

0
1488
by: lewi | last post by:
I am using the win32 versions of Apache 1.3.24 and PHP 4.2.1 on Win2k Pro... Now I have Apache all setup and install PHP to use the php4apache.dll to use PHP as a sapi module and I am php.ini-dist as the php-ini I add the next few line to apache's httpd.conf file... LoadModule php4_module c:/php/sapi/php4apache.dll AddModule mod_php4.c AddType application/x-httpd-php .php AddType application/x-httpd-php-source .phps
8
4014
by: Aspersion | last post by:
I'm building an ASP page that has a lot of text and graphics. There is a calculation facility on the page. The user enters several numbers in a form and presses a button to see the calculated answer. The problem is this: when the user presses the Calculate button, the whole page is reloaded and, on a large page, this is very noticeable. Is there any way that I can get the calculation done and the result displayed without reloading...
2
5100
by: Snolly | last post by:
Hi all, Here is my issue. I have a web page (lets call it page1) with an iframe in it that then opens a pop-up window (page2). The pop-up window is used to edit some data that was loaded into page1 so I want to use onunload to reload page1 to keep the data synchronized. At first I was using just window.opener.parent.location = window.opener.parent.location;
16
2961
by: jaialai technology | last post by:
I want to reload a url in a browser window so I do something like this: open(window.location.href= "www.yahoo.com"); ok, so now I want to do something when that page is done loading completely. how do I do this? What I have tried is this: a=open(window.location.href= "www.yahoo.com"); a.onload=b(); function b(){
0
2483
by: Claire | last post by:
Hi Ive been using Mattias Sjögren's example at http://www.msjogren.net/dotnet/eng/samples/dotnet_dynpinvoke.asp to load an unmanaged 3rd party dll dynamically when my object is created. Calling the "CreateDllAssembly" function below does this. When my wrapper is disposed of, I want the dll to be unloaded from memory. See the "dispose" function below. All seems to work ok on the first instance of my wrapper class. (I only
3
2156
by: Richard | last post by:
Hey there, I have a textbox and a listbox. When a user types a number in the textbox, I want to get all the records from a MS Access DB but without reloading the page. I now have something manual and a user first must press a button to get the listbox filled with records but I want to have it done automaticly without pressing a sumbit button. I know its prolly done with javascript but thats one thing
0
1209
by: K B | last post by:
Hi, I could be approaching this all wrong...so please let me know what you think. I have a 2 page frame (WIleft.aspx and WIright.aspx) in asp.net 2.0. I create an html page by transforming xml with xsl file into WIright and there are buttons created with dynamic parameters to pass when the function is run. I have the following script that runs when any given button is clicked in WIright:
1
1309
by: David | last post by:
Hi, Further to my earlier post about using dynamic usercontrols (which I have still yet to solve), I have another problem. I am creating the UC in the page by LoadControl. The page itself has a submit button that is inside an AJAX UpdatePanel. When I submit the page, the contents of the text boxes of the UC don't
0
9639
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9474
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10143
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10076
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9939
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8964
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7486
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5507
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3633
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.