Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Languages / JScript / June 2005

Tip: Looking for answers? Try searching our database.

How to get the querystring  value by using javascript ?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Kylin - 06 Jun 2005 09:15 GMT
as you see that there is a URL like http://localhost/web/index.aspx?tab=1
how can I get the tab's value by using javascript ?
any function in javascript ?
or I must write a function by myself ?

Signature

FireCrow Studio
Kylin Garden
QQ:462042991
MSN:GaoTianpu@hotmail.com
ICQ:156134382

Steve Fulton - 06 Jun 2005 13:43 GMT
> as you see that there is a URL like http://localhost/web/index.aspx?tab=1
> how can I get the tab's value by using javascript ?
> any function in javascript ?
> or I must write a function by myself ?

search Property
http://msdn.microsoft.com/workshop/author/dhtml/reference/properties/search.asp

You'll have to do your own parsing to extract information from the string.

Signature

Steve

In questions of science, the authority of a thousand is not worth the
humble reasoning of a single individual. -Galileo Galilei

kishor - 08 Jun 2005 07:44 GMT
Hi,

Use this following Function to get value of tab

var tabvalue = getQueryVariable("tab");

--------------------------------------------------------------------------

function getQueryVariable(variable)
{
 var query = window.location.search.substring(1);
 var vars = query.split("&");
 for (var i=0;i<vars.length;i++)
 {
   var pair = vars[i].split("=");
   if (pair[0] == variable)
   {
     return pair[1];
   }
 }  
}

> as you see that there is a URL like http://localhost/web/index.aspx?tab=1
> how can I get the tab's value by using javascript ?
> any function in javascript ?
> or I must write a function by myself ?

Rate this thread:







Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.