473,396 Members | 2,039 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

modifying the content of the address bar without triggering apostback

Hello,

I would like to modify the content of the location bar (address bar)
using JavaScript. Suppose I am at
http://localhost/WebTests/TestEvent.aspx
The followig line:
window.location = "aaa";
changes the content of the address bar to:
http://localhost/WebTests/aaa

which is fine except that it then goes ahead and causes a full
postback to the server. How can I change the content of the location
bar without causing a postback?

I can also use
location.hash="aaa";
this does not trigger a postback but changes the content of the
address bar to:
http://localhost/WebTests#aaa

and i want
http://localhost/WebTests/aaa

Thanks!
Apr 5 '08 #1
1 1885
VK
On Apr 5, 9:55 am, nimad <nim...@gmail.comwrote:
Hello,

I would like to modify the content of the location bar (address bar)
using JavaScript. Suppose I am athttp://localhost/WebTests/TestEvent.aspx
The followig line:
window.location = "aaa";
changes the content of the address bar to:http://localhost/WebTests/aaa

which is fine except that it then goes ahead and causes a full
postback to the server. How can I change the content of the location
bar without causing a postback?

I can also use
location.hash="aaa";
this does not trigger a postback but changes the content of the
address bar to:http://localhost/WebTests#aaa

and i wanthttp://localhost/WebTests/aaa

Thanks!
So like user comes to some malicious site but the script shows
http://www.bankofamerica.com in the address bar so the user would have
full confidence to type in his online account info? I am not saying
that you are doing something like this: I am just explaining why no
one browser will allow to do anything like this for obvious security
reasons. Moreover, in IE7 and higher address bar is now enforced for
all script-generated windows. That is another frequent question here:
"how to remove address bar in window.open?" and the same answer: you
cannot do it for the security reasons.

Apr 5 '08 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: gustavo_randich | last post by:
Hello, I'm looking for a DB2 workaround on a topic already solved in Oracle: the problem of mutating tables (which states that a trigger action cannot read the triggering table's data). Yes, I...
1
by: OhFiddleSticks | last post by:
Does anyone know if there is a way to add a text value to a combo box (the text box part, not the rowsource) in VBA without triggering an update event? I've tried everything I can think of without...
0
by: ddman | last post by:
I'm writing a filtering application similar to a proxy server in vb.net. I need to intercept browser requests and modify them before throwing it back to the browser. How do I go about doing this?...
2
by: rk | last post by:
I have the following library.xml file coming from a system, this can't be modified. ____________________________________________________________________________ <?xml version="1.0"...
4
by: bp90210 | last post by:
If you have a few minutes, I would like to see if anyone can help me out. I'm trying to modify a rating script. Currently, It allows you to vote over and over. What I want to do is after you vote...
8
by: Neo Geshel | last post by:
Greetings. BACKGROUND: My sites are pure XHTML 1.1 with CSS 2.1 for markup. My pages are delivered as application/xhtml+xml for all non-MS web clients, and as text/xml for all MS web...
5
by: Jon Slaughter | last post by:
How can I take a uri passed to a interface script(a script that is called for every page request) modify it, do whatever, and then change the uri that the user see's to be whatever? Essentially...
3
bonski
by: bonski | last post by:
i've been trying to modify some lines from a text file... and i had this text file and a php script to modify it... //code.txt 101:2001 102:2002 103:2003 104:2004 //code_reader.php <?php
5
by: IUnknown | last post by:
Ok, we are all aware of the situation where modifying the folder structure (adding files, folders, deleting files, etc) will result in ASP.NET triggering a recompilation/restart of the application....
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
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...
0
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...
0
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...

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.