Printable Version of Topic

Click here to view this topic in its original format

HTMLHelp Forums _ Markup (HTML, XHTML, XML) _ Link won't work

Posted by: RowanB Feb 5 2020, 02:37 AM

I have a web page with a Log Out link on it. The link doesn't work. You click it and nothing whatever seems to happen. This is the section of HTML that creates the link (actual link shown in bold italic):

<form action='http://choir-stmaryssaffronwalden.org/change_role.php' method='POST'>
<input type='hidden' name='return_url' value='welcome.php'>
<p class='header' style='margin-bottom: 0px; margin-top: 0px;'>
Logged in as Rowan Sylvester-Bradley in role <select name='Role' class='header' onchange='submit()'>
<option value='1' selected>Member</option>
<option value='2'>Manager</option>
<option value='3'>Guest</option>
<option value='4'>Tester</option>
<option value='5'>Developer</option>
</select>
. <a class='link' href='http://choir-stmaryssaffronwalden.org/logout.php'>Log out</a>
</p>
</form>
<form action='http://choir-stmaryssaffronwalden.org/change_build.php' method='POST'>
<input type='hidden' name='return_url' value='welcome.php'>
<p class='header'>
Using build <select name='Build' class='header' onchange='submit()'>
<option value='20'>20 (obsolete)</option>
<option value='21'>21 (obsolete)</option>
<option value='22'>22 (obsolete)</option>
<option value='23'>23 (obsolete)</option>
<option value='24'>24 (obsolete)</option>
<option value='25'>25 (obsolete)</option>
<option value='26'>26 (obsolete)</option>
<option value='27'>27 (obsolete)</option>
<option value='46'>46 (obsolete)</option>
<option value='47'>47 (obsolete)</option>
<option value='48'>48 (obsolete)</option>
<option value='49'>49 (release)</option>
<option value='1000'>1000 (devtest)</option>
<option value='10000'>10000 (devtest)</option>
<option value='99999' selected>99999 (development)</option>
</select>
</p>
</form>

If I right click on the link, click Copy Link Address, paste it into the browser address bar and press Return, then it works fine. How can this be? What is the difference between clicking a link, and pasting its address into the browser address bar and pressing Return?

Thanks - Rowan

Posted by: Christian J Feb 5 2020, 07:49 AM

QUOTE(RowanB @ Feb 5 2020, 08:37 AM) *

The link doesn't work. You click it and nothing whatever seems to happen.

If logout.php doesn't appear in the address bar when clicking the link, maybe some javascript prevents the link from activating?

QUOTE
If I right click on the link, click Copy Link Address, paste it into the browser address bar and press Return, then it works fine. How can this be? What is the difference between clicking a link, and pasting its address into the browser address bar and pressing Return?

When you paste into the address bar no javascript is used, and no referer header is sent (but it seems unlikely that the PHP script checks for the latter).



Powered by Invision Power Board (http://www.invisionboard.com)
© Invision Power Services (http://www.invisionpower.com)