How to close current tab in a browser window?

You will need Javascript to do this. Use window.close(): close(); Note: the current tab is implied. This is equivalent: window.close(); or you can specify a different window. So: function close_window() { if (confirm(“Close Window?”)) { close(); } } with HTML: <a href=”https://stackoverflow.com/questions/2076299/javascript:close_window();”>close</a> or: <a href=”#” onclick=”close_window();return false;”>close</a> You return false here to prevent the default … Read more

Android: how to make text (String type, method addCellText) as a hyperlink?

The method addCellText(LinearLayout row, float weight, String text) return TextView. Therefore, I can to make TextView as a hyperlink: TextView someData = addCellText(row, 2, someStringValue); someData.setMovementMethod(LinkMovementMethod.getInstance()); String text = “<a href=”http://www.google.com”>” + someStringValue + “</a>”; someData.setText(Html.fromHtml(text));

php variable changes when clicked on html link [closed]

Try this, is PHP: <?php if (isset($_GET[‘money’])) { $money = rob_shop($_GET[‘money’]); echo ‘You now have: ‘.$money.'<br>’; } else { $money = 100; echo ‘You now have: ‘.$money.'<br>’; } echo ‘<a href=”https://stackoverflow.com/questions/27303586/?money=”.$money .'”>rob a shop</a>’; function rob_shop($money){ $money = $money + 75; return $money; } ?> But the best way to do it is with ajax … Read more