UnknownPlayer Posted November 25, 2010 Share Posted November 25, 2010 I have problem with # char in address and jquery, or any address with #. When i put this code in my php: <a href="#" id="dialog_link" class="ui-state-default ui-corner-all"><span class="ui-icon ui-icon-newwin"></span>Open Dialog</a> .. my link on that button is still same like link that i am on it, it do not add "#" in address, but if i, instead of href="#", put href="#some_text", that link shows nice, link.php#some_text, but without text in # it doesn't work :S Why is that happening, and how can i fix that? Quote Link to comment https://forums.phpfreaks.com/topic/219756-in-address-help/ Share on other sites More sharing options...
jim_keller Posted November 25, 2010 Share Posted November 25, 2010 if you don't put anything after the hash tag (#), the browser treats it as "current page". What are you trying to accomplish by adding just the hash tag? To go back to the top of the page? If so, use #top Quote Link to comment https://forums.phpfreaks.com/topic/219756-in-address-help/#findComment-1139251 Share on other sites More sharing options...
UnknownPlayer Posted November 25, 2010 Author Share Posted November 25, 2010 No, i tested in .html file, just put # and it works, but in my php code it does not work when i put only #, and i saw javascript is using this # or ajax, and i will need that for later, but i think that is something wrong with my php code, and cant recognize # :S Can i make somehow to # works ? Quote Link to comment https://forums.phpfreaks.com/topic/219756-in-address-help/#findComment-1139255 Share on other sites More sharing options...
Anti-Moronic Posted November 25, 2010 Share Posted November 25, 2010 EDIT: Â sorry, misunderstood. I see what you mean now. But, you need to detail what errors you are getting if any or explain how it 'doesn't work'. Â Instead of #, if you are using javascript, you can do: Â href="javascript:;" Â Â Quote Link to comment https://forums.phpfreaks.com/topic/219756-in-address-help/#findComment-1139256 Share on other sites More sharing options...
UnknownPlayer Posted November 25, 2010 Author Share Posted November 25, 2010 No no, look this code: <a href="#">Button</a> and there is a img: but if i put(in this way it works fine): <a href="##">Button</a> or <a href="#some_text">Button</a> it shows me like this: Â And now i dont know why it wont work if i put only one #, becouse i saw in jquery that they put only one # and it works to them, but it doesn't work on my php code ? Quote Link to comment https://forums.phpfreaks.com/topic/219756-in-address-help/#findComment-1139263 Share on other sites More sharing options...
UnknownPlayer Posted November 25, 2010 Author Share Posted November 25, 2010 Any help ? Quote Link to comment https://forums.phpfreaks.com/topic/219756-in-address-help/#findComment-1139527 Share on other sites More sharing options...
laffin Posted November 25, 2010 Share Posted November 25, 2010 dunno could be some internal processing of the tag try using \# Quote Link to comment https://forums.phpfreaks.com/topic/219756-in-address-help/#findComment-1139530 Share on other sites More sharing options...
UnknownPlayer Posted November 28, 2010 Author Share Posted November 28, 2010 Still doesn't working :S Quote Link to comment https://forums.phpfreaks.com/topic/219756-in-address-help/#findComment-1140493 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.