473,396 Members | 1,766 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.

Link to a page depending your current address.

I want to make a script which will be reading the name of the file the user is viewing, then change it, and then load it again. And all these into one button

eg. when user is pressing the "Change Language" button the "Home_en.html" to become "Home_gr.html"

but i don't want to put it on the page's code I want to call it on every page i want to use it.

Is it possible for javascript to do this?
May 8 '10 #1
1 1356
YarrOfDoom
1,247 Expert 1GB
Should be possible, I don't know how much you know about Javascript, but these pages should get you on the way.
W3Schools - JS Location Object
W3Schools - JS HTML DOM Event Object

You might want to consider doing this with a server-side script language like PHP, ASP, Python,... whichever you prefer. People without Javascript enabled will be able to use the buttons as well then.
May 8 '10 #2

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

Similar topics

3
by: Michelle | last post by:
Hi all...again, I can't find a var that contains the referring page (I've looked on PHP.net and in several books)...there is one in ASP, so I am assuming there is one in PHP, too. And, I would...
1
by: Arne Ballay | last post by:
Hi, I'm using JavaScript in a JSP where build up dynamik links (<a href...). These links are shown on the current JSP page. We someone clicks the Link another page changes (load the current URL)....
14
by: Vu Pham | last post by:
In order to mark the current address at a given point of the variable block, I use the char dummy as follows : int a; long b; short int c; char dummy; By this way, I can calculate the size...
1
by: Ansari | last post by:
hi all is there anyother method for hiding page name from address bar of the browser... I dont want to show the compelete url in address bar Thanks Ansari
1
by: ABC | last post by:
How to get the previous page's url address under ASP.NET C# code?
0
by: jjalexrayer | last post by:
How do hide page name in address bar? This is my task. every programmer displaying every page name on Address bar. for example C://inetpub/wwwroot/project1/sample.aspx . instead of this url i...
0
by: David | last post by:
Hi, I am trying to open an intranet web page with a link in my access db. In a text box I have the following code: Me.DirectLink = ">TRACK DIRECT...
0
by: Ken | last post by:
Hi. I've recently organized and even color-coded many of my favorite bookmarks on WEB DEVELOPMENT (and a few other favorite subjects too) into what I call QUICK LINK PAGES. These are very...
2
by: Jeff | last post by:
ASP.NET 2.0 In my webproject I've created a page which contain a button. This page will be opened from 2 pages. This button must be invisible if the page it is placed on are opened from one of...
1
by: Rex | last post by:
Hi, I have an Address table which contains more than one addresses for a particular member. I want to write a query that would only display most current address. All addresses have a unique ID...
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:
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...
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
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...
0
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,...

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.