Is there a way to....

liunx

Guest
Hi all<br />
<br />
My site uses frames, left, top and main frame, what i would like to be able to do is within the main frame have an entry box with a submit button that if the user enters a page name, it would jump to that page in the main frame, ie:<br />
<br />
he enters - cucumber presses the submit button and the page then changes to cucumber.html<br />
<br />
If however, the page does not exist, I need it to go to a page that says, sorry page doesn't exist please go back, with a javascript back button (that part I can do)<br />
<br />
Anyone have any ideas, 1 other problem, I have to have this finished by tonight !!<br />
<br />
Thanks guys<br />
<br />
cya<br />
<br />
Mark.<!--content-->if somehow there is registered that he is cucumber then it shouldnt be to hard to do.<br />
<br />
<br />
But i dont know any other way then doing it with programming.<br />
<br />
a php script like this would do good:<br />
<br />
------------------------------------<br />
the mainpage user.html(in html)<br />
<br />
mainpage<br><br><br />
<br />
<form method="GET" action=user.php><br />
<input type=text name=user><br />
<input type="submit" value="send"><br />
</form><br />
------------------------------------<br />
<br />
------------------------------------<br />
the php script user.php(in php)<br />
<br />
<?<br />
<br />
switch($user){<br />
<br />
case("cumcumber"):<br />
echo "<script language=\"JavaScript\">window.location=\"cumcumber.html\"</script>\n";<br />
break;<br />
<br />
case("banana"):<br />
echo "<script language=\"JavaScript\">window.location=\"banana.html\"</script>\n";<br />
break;<br />
<br />
default:<br />
echo "<script language=\"JavaScript\">window.location=\"userdoesntexists.html\"</script>\n";<br />
break;<br />
<br />
}<br />
?><br />
<br />
--------------------------------------------------<br />
<br />
then if someone enters his name there, it goes in the php script and checks weither the userpage existst ( in you cases ) if it doesnt exists in the cases it uses the userdoesntexists.html were you can type for instance: <br />
<br />
Hey mofo this user doesnt exsist!<br />
<br />
if the username is not to be filled in but selected from a select menu you can also do that as long as the name var remains user.<br />
<br />
Clear?<br />
<br />
hope so..<!--content-->well wijbenga, you are on the right track as I don't think there is any other way to do it without using some form of serverside language. you will need to scan your directories for the user entered file and then if none give that error message.<!--content-->yup,<br />
<br />
and php is prolly the best language to do it with<br />
<br />
Btw scoutt i have a question:<br />
<br />
Are you in need for moderators? It seems as if your the only one replying to everything lately...<br />
<br />
If so, i would like to become one :P<br />
<br />
I know html and a good deal of php, i OWN photoshop :D and my troubleshooting is ace!<br />
<br />
So eh contact me :)<!--content-->wijbenga, <!-- m --><a class="postlink" href="http://htmlforums.com/images/icons/icon13.gif">http://htmlforums.com/images/icons/icon13.gif</a><!-- m --><!--content-->Originally posted by wijbenga <br />
yup,<br />
<br />
and php is prolly the best language to do it with<br />
<br />
Btw scoutt i have a question:<br />
<br />
Are you in need for moderators? It seems as if your the only one replying to everything lately...<br />
<br />
If so, i would like to become one :P<br />
<br />
I know html and a good deal of php, i OWN photoshop :D and my troubleshooting is ace!<br />
<br />
So eh contact me :) <br />
well it does seem like that huh?<br />
<br />
I know some of the other mod's have been real busy and maybe have a life, hmmm maybe I will look into this life thing. :)<!--content-->yup there are nother 5.000 ways to do it :)<br />
<br />
And isnt it possible to moderate and having a life?<br />
hmmm who will tell..<br />
<br />
Is goldi pushin them babys or wha` ;D<!--content-->Originally posted by scoutt <br />
I know some of the other mod's have been real busy and maybe have a life, hmmm maybe I will look into this life thing. :) lol :D I took a 2 month vacation!<!--content-->
 
Back
Top