Page 2 of 2
Posted: Sun Oct 01, 2006 4:49 am
by volka
please elaborate.
Someone picks an option from the select element and then ...
Posted: Sun Oct 01, 2006 4:51 am
by akimm
well its for my purposes. Thus far I have only two .php files in admin/ That is approve and another file. All of the files that will be in admin/ included the two so far need to be passed into the <option value=, we've achieved that. Now I'd like for when one particular option is chosen, say approve.php it allows me to click submit button and then go to that page.
Posted: Sun Oct 01, 2006 5:40 am
by miro_igov
akimm wrote:
I am trying to make the select menu allow the different selections to be different links. It is the begining of a admin panel.
lol use onchange="window.location.href=document.selectName.value"
Posted: Sun Oct 01, 2006 7:26 am
by akimm
Javascript worries me, if ever this is used in public and someone disables js then i'm crap out of luck.
thanks though.
Posted: Sun Oct 01, 2006 1:12 pm
by miro_igov
There is no other way.
But you can deny the service for users with no javascript.
Posted: Sun Oct 01, 2006 1:33 pm
by akimm
There has to be a way. I modified this script from something I wrote earlier.
it basically globbed images and printed them into the option value. I know I can do this cuz, when I made a mistake in the code, I wrote the submit button in the foreach loop. and it printed the second value of the loop outside of the select box(which is why it went wrong) but it did link both to seperate pages.
Posted: Sun Oct 01, 2006 1:58 pm
by miro_igov
You have seen the links because they were printed out of the select element. In select element you cannot see and use any links.
instead of using select element you can print the links in separate rows by adding <br> after the </a> and you will see all possible options.
Posted: Sun Oct 01, 2006 2:09 pm
by akimm
hmm.. before I knew how to program (which i still don't know it all so well) i had a perl program i d/l'ed from the internet, it used a select menu with links. I will have to look at how they do the html of it, and maybe try to examine the perl.