Window status (to show relative URL)
Posted: Fri Feb 11, 2005 4:08 am
Hi,
See this example code....
If this was in http://mysite/myfile.php then the user could click the loink to go to http://mysite/myfile.php?mode=newmode OR he/she could click the div itself to get the same result.
Only problem is that the window status bar will not show the URL the DIV is pointing to. Is there some quicky way of making it do this which is portable across domains? I am aware that window.status='http://mysite/myfile.php?mode=newmode' does it but that would not work if I moved the http://anothersite - see what I*'m trying to do?
Thanks very much
See this example code....
Code: Select all
<div style="width:150px; height:90px; border:1px solid black; cursor:pointer" onClick="window.location='?mode=newmode'"><a href="?mode=newmode">Switch to a new mode</a></div>Only problem is that the window status bar will not show the URL the DIV is pointing to. Is there some quicky way of making it do this which is portable across domains? I am aware that window.status='http://mysite/myfile.php?mode=newmode' does it but that would not work if I moved the http://anothersite - see what I*'m trying to do?
Thanks very much