timstring Posted November 27, 2012 Share Posted November 27, 2012 This may be an HTML or PHP problem, or Java as well. I am trying to write an alphabetical index from inside a php file. Here's what I'm trying to accomplish: PHP script searches the My SQL table A link is generated out of each itemOn clicking on the link, a php variable is setand the script moves on. I need information for a function that the onClick refers to. I've only found rudimentary examples, and none are any help. So, I'm sending the problem to you. tim Link to comment Share on other sites More sharing options...
niche Posted November 27, 2012 Share Posted November 27, 2012 You'd need a ajax call if you used JS. Unless there's a strong reason to use JS, I'd just submit an input from a form. Link to comment Share on other sites More sharing options...
DarkxPunk Posted November 27, 2012 Share Posted November 27, 2012 (edited) In my experience I have had the href take over and ignore the onclick. Idk if that is your problem, but my solution was call the onclick, then use js to change the location.href. Pull the href from the link or your SQL, and run it after the change you wanna make to php using Ajax. Just a idea. Edited November 27, 2012 by DarkxPunk Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now