473,386 Members | 1,699 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,386 software developers and data experts.

getting a path of the file in Javascript

1
Hi,

I have a combo box with some values and 3 links. I am taking a combination of selected value of combo box and the link selected and redirecting to a certain page. I am using a querstring to pass the values.
It works fine as I am passing like this.

[HTML]<a href="javascript:testtest(pname);">link1</a>;
<a href="javascript:testtest(pname);">link2</a>;
<a href="javascript:testtest(pname);">link3</a>;
[/HTML]
If i am in link 2 page then if i select a value in combo box and click link1 it redirects to the proper page but my problem is if I have a submit button then how do i get the path of the file. I am not able to get the file name it says undefined.

Can some onel please help on this.
Oct 11 '07 #1
1 1205
dmjpro
2,476 2GB
Hi,

I have a combo box with some values and 3 links. I am taking a combination of selected value of combo box and the link selected and redirecting to a certain page. I am using a querstring to pass the values.
It works fine as I am passing like this.
<a href="javascript:testtest(pname);">link1</a>;
<a href="javascript:testtest(pname);">link2</a>;
<a href="javascript:testtest(pname);">link3</a>;

If i am in link 2 page then if i select a value in combo box and click link1 it redirects to the proper page but my problem is if I have a submit button then how do i get the path of the file. I am not able to get the file name it says undefined.

Can some onel please help on this.
Are you talking about the URL?
If it is ....
Then try ............

Expand|Select|Wrap|Line Numbers
  1. alert(window.location.href);
  2.  
Debasis Jana
Oct 12 '07 #2

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

Similar topics

2
by: mhadi | last post by:
Hi All, I am developing a solutions for clients to run some webpages. Since there is no webserver the ASP route is a No Go. So I am using Javascript to connect to my database. The Problem is that...
32
by: paul | last post by:
HI! I keep on getting this error and I have tried different things but I am not sure how to send the expiring date. The error that I am getting in Firefox 1.5 is "Error: expires.toGMTString is...
4
by: bushi | last post by:
hi! i'm designing a web application,basically it have two pages,"client_browser.apsx" & "adserver.aspx"."client_browser.aspx" contains an iframe,and in the iframe i have displayed my...
3
by: drewdall | last post by:
Hello All, I've read a lot of stuff which says it's impossible to hide Javascript, so if I get my PHP script to return some Javascript inside some XML using AJAX, how can it be viewed in the...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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...
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
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...

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.