flemingmike Posted August 12, 2010 Share Posted August 12, 2010 hello, i was wondering if there is a way to have a link do a command, but not to goto a page. my reason being is that the music player software i use has a built in web server and if you goto a certain page, it will process that command. so right now, i have an iframe that i do a target to. its pretty mickey mouse, but its what i knew how to do. thanks Quote Link to comment Share on other sites More sharing options...
jdavidbakr Posted August 12, 2010 Share Posted August 12, 2010 You'll have to either do it the way you're doing, or use some AJAX tricks. If you don't want to take the time to learn ajax, I don't think what you're doing is necessarily a bad way to do it. Quote Link to comment Share on other sites More sharing options...
flemingmike Posted August 12, 2010 Author Share Posted August 12, 2010 here is my iframe <iframe name="control" width="1" height="1" scrolling="no" frameBorder="0" src=" "></iframe> and here is example of a button to start playing <a target="control" href="http://'.$mp[host].':'.$mp[port].'/1.0/?method=player.play"> <img border="0" src="images/Button-Play-icon.bmp" width="64" height="64"> Quote Link to comment Share on other sites More sharing options...
flemingmike Posted August 12, 2010 Author Share Posted August 12, 2010 now if i keep it the way i have it now, is there a way to make it so when i click on a button, it also refreshes the page? Quote Link to comment Share on other sites More sharing options...
jdavidbakr Posted August 12, 2010 Share Posted August 12, 2010 If you want to ping the server and load a new page at the same time, then you can actually have the link take you to the php script, then at the end of the script execute a 'header("Location: xxx.html");' command to load the page again. Quote Link to comment Share on other sites More sharing options...
flemingmike Posted August 12, 2010 Author Share Posted August 12, 2010 ok, i will give that a try. PS. if anyone wants to maybe work with me on this music conrol from web (also mobile device) i wouldnt mind the help. i have all the main code completed. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.