Jump to content

creating actions in dropdown menus to show on end of php script?


pooker

Recommended Posts

Basically this is how my script is coming , when I user clicks on an item from the dropdown menu it invokes this javascript

 

function changeSeries(to) {

    if (to == "") return false;

    document.location = "/"  + ".php" + "?=" + to;

}

 

The to is the value of the select option in html, which in this case would be the names of the manga, naruto , bleach etc,  is there any way to modify my php drowndown menu were it updates the end of the php , I have it referencing through a function currently.  If I could figure out how to do this, It would make updating my files super easy. 

 

Thanks :D , love the site, am learning alot.

 

Like when the above function is used to return a series for bleach, the url would be like www.animeaddicted.com/mangareader.php?=naruto

 

 

Hi sorry that might of been written confusingly,  Since this is my first time coding, I am trying to code a basic onlin manga reader , really basic yes. 

 

it goes like this

 

select manga from dropdown

 

select chapter from dropdown

 

select page number from dropdown

 

Right now, when a dropdown menu item is selection it saves the variable from the title, like if they choose naruto it saves it there, and with the javascript I have it setup to encorporate that into the name. I would  Like once that is chosen, it will go to url.php?xxxManganame

 

That way I dont have to have lik 10000000 scripts because right now the only way i can think of to do it, is once the manga is chosen, the redirect it to its name, like lets say you chose naruto then use javascript for to + "php

 

which redirects to naruto.php, but I do not want to do it like that because if I have over 100 mangas that can mean alot of scripts, I would rather it redirect to something like chapters.php where they then can choose the chapters from there, and i can use php to compare the variable $manga to the database and find out how many chapters, etc is in there instead of having like 100000 scripts with each of the mangas different names.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.