473,386 Members | 1,712 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.

Javascript to go to directory

Hi,

This is probally a total noob question, and may not even be possible BUT,

Can you make javascript complete a url according to a user's input for example

If a user inputs "keyboard" into a text box, the webpage would bounce to a new directory called "keyboard" so you would go to http://www.myurl/keyboard/

"keyboard" could be anything that a user cold put in, and they would be directed to that directory (provided the directory exists).

The reason behind this is because I am trying to create a site that a user could login to (with a username and password) and once logged in they would have access to everything that a regualr member would have access to as well as a profile type page.

The only problem is that I dont know how to create this with a database or PHP so i am using .htaccess to protect these folders. When in the generic protected area, you would enter in your user id (to access the profile page) and if you entered the correct id (corresponding with your current login) you would be taken to that profile page. If you entered in another user's id, you would then be asked for a username and password (again).

This is probally really confusing, i understand. But if anyone could help (either with the javascript, or help to design a proper database etc) i would be very greatful.

Please Reply!

Ryan
Nov 30 '06 #1
1 1355
r035198x
13,262 8TB
Hi,

This is probally a total noob question, and may not even be possible BUT,

Can you make javascript complete a url according to a user's input for example

If a user inputs "keyboard" into a text box, the webpage would bounce to a new directory called "keyboard" so you would go to http://www.myurl/keyboard/

"keyboard" could be anything that a user cold put in, and they would be directed to that directory (provided the directory exists).

The reason behind this is because I am trying to create a site that a user could login to (with a username and password) and once logged in they would have access to everything that a regualr member would have access to as well as a profile type page.

The only problem is that I dont know how to create this with a database or PHP so i am using .htaccess to protect these folders. When in the generic protected area, you would enter in your user id (to access the profile page) and if you entered the correct id (corresponding with your current login) you would be taken to that profile page. If you entered in another user's id, you would then be asked for a username and password (again).

This is probally really confusing, i understand. But if anyone could help (either with the javascript, or help to design a proper database etc) i would be very greatful.

Please Reply!

Ryan
Moved this to this javascript.
Nov 30 '06 #2

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

Similar topics

6
by: Web Spinner | last post by:
I am running Windows 2000 and I can't seem to get my JavaScript working with ASP. I placed my HTML code in a file called x.asp under c:\Inetpub\wwwroot, and I placed my JavaScript code in a file...
15
by: Sue Barth | last post by:
Hi all, I hope I'm in the right ng for this... I made an .asp page that allows users to toggle thru a directory of photos. The page accomplishes the following: selects a directory of photos...
2
by: Dean | last post by:
Hi I've got a question relating to using Javascript on an Intranet. I have a directory with a list of files in the format week36.xls, week37.xls and I want to write a script that will scan...
7
by: Bert | last post by:
I have been reading the post and the FAQ and have been unable to find anything that will help with my problem. First let me say that I am not a web developer, designer and no next to nothing...
23
by: Han | last post by:
Our app runs on end-users machines (apache2.x + php5). At this moment it is quite easy for someone (who has access to the console) to insert a couple lines of php code to steal sensitive info. ...
2
by: Tim::.. | last post by:
Hi I'm trying to create a little application that shows an image of a user when you mouseover there details in a datagrid. The datagrid is populated from an Active Directory Database and I...
11
by: ahammad | last post by:
Hello, I have a perl file that generates an html file to use on a webpage. I have to add some javascript to the html part of the perl file. I already have some code to do that, but here is the...
1
by: SGilch | last post by:
I am new to javascript, and wondering if it is capable of implementing a browsing mechanism for the browser to upload the names of files in a client side directory to the server. The client would...
8
by: Mateusz Viste | last post by:
Hi, I'm not sure if my question is really related to JavaScript, so please excuse me if that's not the case (and maybe you guys would have an idea what's the cause is and where could I ask)... ...
10
by: happyse27 | last post by:
Hi all, I have enabled Javascripting in internet explorer 7, and I have been writing script in perl. The thing I cant do now is to pop up image in small html frame from main html page.......
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: 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: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
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,...

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.