|
-
Delete me
I can't get this to work. I grabs the variable after the "?" and leaves out any "%" or "2" or "0". There are only 13 department names going to be passed through, so I don't need to wory about #'s.
It did work in FF until I tried to add browser compatability since it has to be IE and FF compliant. I am confused why this does not work. Thanks for your time.
if (document.getElementById)
{var strvar = document.getElementById("url").indexOf('?');}
else
{var strvar = document.url.indexOf('?');}
if (strvar != -1)
{
if (document.getElementById)
{strsearch = document.getElementById("url").substring(strvar+1, document.getElementById("url").length);}
else
{strsearch = document.url.substring(strvar+1, document.url.length);}
for (count = 0; count < strsearch.length; count++)
{
if (strsearch.charAt(count) == "%")
{document.write (" ");}
else if (strsearch.charAt(count) == "2")
{document.write (" ");}
else if (strsearch.charAt(count) == "0")
{document.write (" ");}
else
{document.write (strsearch.charAt(count));}
}
}
else
{document.write("No Department Selected");}
Last edited by buma; 07-05-2006 at 04:26 PM.
Similar Threads
-
By NikhilSriv in forum Java
Replies: 1
Last Post: 06-14-2006, 05:24 AM
-
By John Butler in forum ASP.NET
Replies: 0
Last Post: 11-26-2002, 03:53 PM
-
By Vicky in forum ASP.NET
Replies: 1
Last Post: 11-28-2001, 03:43 AM
-
By gvt in forum VB Classic
Replies: 0
Last Post: 02-07-2001, 08:47 AM
-
By gvt in forum VB Classic
Replies: 0
Last Post: 02-07-2001, 08:47 AM
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks