![]() |
Jump Menu
I want to create a jump menu that will display the id and name of all the records in a certain table. I figured out how to do it with my individual php file, but now Im trying to get it to work with vB and templates.
Any ideas? |
This will most likely not work, but you can try this:
In your vb php file put summit like this: PHP Code:
PHP Code:
hopefully ye get the picture. if not, then in plain words if you put .= infront of a variable you add it to the var instead of overwriting current value. Hopefully this wasnt just me talking bs ? ;) |
I originally had it set up like this and it displays all the records (http://www.thekryptonian.com/smallville.php)
PHP Code:
|
If it works in another php file then it works with vB as well, so your problem is to ave it echo in the template.
maybe summit like this: In your template: PHP Code:
PHP Code:
|
I get an error with that The , coma on this line gets me "<option value='%s?action=episodeguide&episode=%s'>---%s - %s</option> \n", $php_self, $myrow['id'], $myrow['id'], $myrow['episode_name'];
|
Hm well then just look at other hacks/vb itself and see how they do it.
Take a look at the forumjump stuff for example, this is similar to your issue in the way that its a <select>, and its <option>'s is dynamic ;) |
I am, but I'm having a time finding where forumjumpbits is...
Thanks for your help so far, maybe someone will come along with some idea. On a positive note I have got it to display, the only problem left is that it is only diplaying one record rather than all of them. |
Did you try the .= to print all the results into the variable?
This SHOULD work because its the same concept that saved my ass in the RPG convertion ;) |
you should not hardcode such things;)
here is the html: HTML Code:
<select onChange="location=options[selectedIndex].value;"> PHP Code:
HTML Code:
<option value="$variable1">$variable2</option> |
Well that worked, but its only displaying one record rather than all of them. Any suggestions?
|
All times are GMT. The time now is 05:00 PM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|