Hello guys, i need to create a dual SelectBoxs that show automaticly the result link or anchor in iframe at the same page something like this [LINK], also please if possible i need to make it with JS/HTML and not PHP, if anyone can help or find any tutorials ill be thankful
The example you provided does not use an iFrame, but you maybe aware of that already. However, doing this without any server-based backend to talk to is gonna be complicated. The page you linked to, for instance, just uses an Ajax-call to a script in the background which fetches the correct issues from (what I'm assuming) is a database.
... PoPSiCLe has it right in that the examples aren't using iframes... and to be frank, I wouldn't use IFRAMES or AJAX for this; I'd use a normal form and a normal submit -- There's this noodle doodle paranoia right now of "pageloads are evil" -- they aren't... and if you keep your markup sane and minimalist, and all your scripting and style is already cached, a pageload should be a non-issue. Or at least, if I were to do the AJAX approach, I'd make the page work without scripting FIRST. The unwritten rule of writing good Javascript; if you can't make the page work without scripting, you probably have no business adding scripting to it. It's called progressive enhancement -- you make a normal pair of selects and submit work the conventional way using FORM + ACTION first, then you enhance it with an AJAX request trapping onsubmit (just add an extra GET value like "method=ajax") that omits the headers so you can plug the data into the page. (being sure to fake the URI while at it so people can hotlink to it).
Hello guys, first of all i want to thank you guys for the replys, second i have a very weak and basic knowlege in scripting, the link i provided are not using iframe but ajax, i linked to it just to show what i need to build and here is a JS based Chained Select forms [LINK] , i dont mind what method to use exept for PHP to show the result at the same page. Deathshadow, what do you mean by URI, also is there any tutorals for Form+Action to chaine both forms? and what do "method=ajax"? -Thanks
That lack of knowledge in scripting is where this is going to bite you -- especially since you are acting from a false premise; that HTML and JS can do this on their own. In EITHER case, when doing something like this that IFRAME or AJAX javascript or even conventional form has to pull the data from something on the server... and the most efficient way of doing that is with a database so those two selects can be plugged into a query... which usually the 'easy' route means PHP and mySQL since you're pretty much guaranteed those are available. there are alternatives like ASP, PERL, PYTHON and so forth, but really you're going to need a server-side language to do this. PHP is probably your best bet just because for web stuff you'll get the best support and it has the best freely available manual (aka the entire PHP.NET website). Without a server-side language it's impractical to do what you ask in anything resembling a secure, fast or easy to keep updated manner. If you're not willing to use/learn a server side language and insist on sticking with client side (HTML, JS), you've walked up to the edge of a pier, tied your hands behind your back, your feet together, connected the rope to a cinderblock, and are waiting around for someone to give a good swift kick... Oh, and a URI is the full address name. When you use AJAX to change the page contents, it helps to use "window.history.pushState" to change the URI as displayed in the browsers address bar so people can hotlink to the page if desired, and to show that yes, you're looking at a different part of the site even though you didn't reload the whole page. Basically URL : Uniform Resource Locater URN : Uniform Resource Name URI : Uniform Resource Identifier Which means URI can be a URL or URN. Which is why PHP's $_SERVER variable http://www.php.net/manual/en/reserved.variables.server.php Contains the index REQUEST_URI -- not URL. It can accept either. If you can handle javascript, PHP isn't that big a hop; most of these 'modern' languages are all just C with a slap of paint and a frilly dress... you learn one, it's not rocket science to master the others. For what you want to do, you're going to NEED a server side language.
Thank you for all the explanations and tips i apreciate every minute of your time, i know that i need a PHP database but the problem is i am using cloud storage (Dropbox) its a "noob" way to store and execute web content, looks like i realy need to work with PHP and i will thanks again.