text box hyperlink?

C

Crystal T

I original asked: I would like to set up a box that someone can type an ID
into and and click submit and it will take them to the page linked to that
ID. I would like to do this with mutiple ID's and subpages. Is this
possible?

And I received this response: Yes.

You first need to come up with a page naming schema that incorporates the
ID then use the following for the submit of the form
<input type="text" name="id" value="" >
<input type="submit" onclick="this.action = this.id.value + '.htm'; return
true;" value="submit" >

The above assumes that the ID will be the page name suffix by .htm. The form
should be created using the GET method (right click
inside the form dashed boundary | Form Properties | click Options | change
the method to GET and add a default page.

So, I tried this. Couple of questions? What kind of default page do I add?
Do I make it the original page or something else. Also, the GET method. I
hope this is right, but I put it GET.htm, and it wrote in their my
webdirectory address and GET.htm.
Does anyone know how to do this, can I get more detailed instruction on the
second part of the comands?
 
R

Ronx

The form would be similar to this: (in code view)

<form action="default.htm" method="get">
<input type="text" name="id" value="" >

add some more fields to fill in - limited due to get method

<input type="submit" onclick="this.action = this.id.value + '.htm'; return
true;" value="submit" >
</form>

The default page (named default.htm above) should be the page the form goes
to if the user has JavaScript turned off (and thus the onclick event on the
submit button would fail)

You also need to validate the id field to ensure the id given is valid, and
you have a page associated with it.
 
C

Crystal T

Thank You, A few more questions though...
How do I validate the id field?
And what will happen if the user has javascript turned off? (This is a
photogrphy site. I'm trying to make people's proof available on my site with
a password(I know this is not a password, but if you don't know the id what
is the difference you can't get to the site!)
 
B

Bob Lehmann

If you use javascript, then all anyone has to do is look at your code for
the "password" / id.

Bob Lehmann
 
R

Ronx

For a JavaScript "password" see
http://www.rxs-enterprises.org/tests/jspass/
This validates the fields as part of the script.

If JavaScript is turned off, in the example below, the default.htm page
will open. What is on this page is your choice - it will be a warning that
JavaScript is required.
In the link above, if JavaScript is turned off, you stay on the form page -
add a warning regarding JavaScript.
 
C

Crystal T

If I use this JavaScript "password" link you provided will the person be able
to look at the script and know what the id and password are? Should I use
something else?
 
R

Ronx

No - since the userid/password is not included in the script, or anywhere
on the page in a real situation.
However, I will not make any claims to security, since when the "secure"
page is open it's URL is displayed in the browser address box for all to
see.

Ideally, you would use a robust system utilising a database and server-side
scripting, this depends on what your host will support.
 
T

Tom Willett

....and, if the user disables javascript?

--
===
Tom Willett
Microsoft MVP - FrontPage
---
FrontPage Support:
http://www.frontpagemvps.com/
===
| No - since the userid/password is not included in the script, or anywhere
| on the page in a real situation.
| However, I will not make any claims to security, since when the "secure"
| page is open it's URL is displayed in the browser address box for all to
| see.
|
| Ideally, you would use a robust system utilising a database and
server-side
| scripting, this depends on what your host will support.
| --
| Ron Symonds - Microsoft MVP (FrontPage)
| Reply only to group - emails will be deleted unread.
| FrontPage Support: http://www.frontpagemvps.com/
|
| | > If I use this JavaScript "password" link you provided will the person be
| > able
| > to look at the script and know what the id and password are? Should I
| > use
| > something else?
| >
| > "Ronx" wrote:
| >
| >> For a JavaScript "password" see
| >> http://www.rxs-enterprises.org/tests/jspass/
| >> This validates the fields as part of the script.
| >>
| >> If JavaScript is turned off, in the example below, the default.htm page
| >> will open. What is on this page is your choice - it will be a warning
| >> that
| >> JavaScript is required.
| >> In the link above, if JavaScript is turned off, you stay on the form
| >> page -
| >> add a warning regarding JavaScript.
| >> --
| >> Ron Symonds - Microsoft MVP (FrontPage)
| >> Reply only to group - emails will be deleted unread.
| >> FrontPage Support: http://www.frontpagemvps.com/
| >>
| >> | >> > Thank You, A few more questions though...
| >> > How do I validate the id field?
| >> > And what will happen if the user has javascript turned off? (This is
a
| >> > photogrphy site. I'm trying to make people's proof available on my
| >> > site
| >> > with
| >> > a password(I know this is not a password, but if you don't know the
id
| >> > what
| >> > is the difference you can't get to the site!)
| >> >
| >> > "Ronx" wrote:
| >> >
| >> >> The form would be similar to this: (in code view)
| >> >>
| >> >> <form action="default.htm" method="get">
| >> >> <input type="text" name="id" value="" >
| >> >>
| >> >> add some more fields to fill in - limited due to get method
| >> >>
| >> >> <input type="submit" onclick="this.action = this.id.value + '.htm';
| >> >> return
| >> >> true;" value="submit" >
| >> >> </form>
| >> >>
| >> >> The default page (named default.htm above) should be the page the
| >> >> form
| >> >> goes
| >> >> to if the user has JavaScript turned off (and thus the onclick event
| >> >> on
| >> >> the
| >> >> submit button would fail)
| >> >>
| >> >> You also need to validate the id field to ensure the id given is
| >> >> valid,
| >> >> and
| >> >> you have a page associated with it.
| >> >> --
| >> >> Ron Symonds - Microsoft MVP (FrontPage)
| >> >> Reply only to group - emails will be deleted unread.
| >> >> FrontPage Support: http://www.frontpagemvps.com/
| >> >>
| >> >> | >> >> >I original asked: I would like to set up a box that someone can
type
| >> >> >an
| >> >> >ID
| >> >> > into and and click submit and it will take them to the page linked
| >> >> > to
| >> >> > that
| >> >> > ID. I would like to do this with mutiple ID's and subpages. Is
| >> >> > this
| >> >> > possible?
| >> >> >
| >> >> > And I received this response: Yes.
| >> >> >
| >> >> > You first need to come up with a page naming schema that
| >> >> > incorporates
| >> >> > the
| >> >> > ID then use the following for the submit of the form
| >> >> > <input type="text" name="id" value="" >
| >> >> > <input type="submit" onclick="this.action = this.id.value +
'.htm';
| >> >> > return
| >> >> > true;" value="submit" >
| >> >> >
| >> >> > The above assumes that the ID will be the page name suffix by
..htm.
| >> >> > The
| >> >> > form
| >> >> > should be created using the GET method (right click
| >> >> > inside the form dashed boundary | Form Properties | click Options
|
| >> >> > change
| >> >> > the method to GET and add a default page.
| >> >> >
| >> >> > So, I tried this. Couple of questions? What kind of default page
| >> >> > do
| >> >> > I
| >> >> > add?
| >> >> > Do I make it the original page or something else. Also, the GET
| >> >> > method.
| >> >> > I
| >> >> > hope this is right, but I put it GET.htm, and it wrote in their my
| >> >> > webdirectory address and GET.htm.
| >> >> > Does anyone know how to do this, can I get more detailed
| >> >> > instruction
| >> >> > on
| >> >> > the
| >> >> > second part of the comands?
| >> >>
| >> >>
| >> >>
| >>
| >>
| >>
|
|
 
C

Crystal T

I'm not to worried about making the pages top secret!! I just want some
privacy for my clients. You mentioned the phrase for all to see pertaining
to the openend URL. What exactly does that mean?
 
R

Ronx

It means that when the page is opened, the URL is displayed on screen and
any passer-by can see it.
Go to http://www.rxs-enterprises.org/tests/jspass/
Type in the UserId and Password (which are clearly displayed on this page,
and are CaSe sensitive) and see how the "secret" page is displayed in the
browser.

Copy the address bar to the clipboard (highlight and press Ctrl+C) close
and re-open the browser and paste in the URL.
This demonstrates how to get to the page by typing in the URL without going
through the login screen.

There is NO security when using JavaScript. In fact, you as well give your
users the URL for their page without bothering with a login screen at all.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top