Script URL:
Version of script:
Hosting company:
URL of phpinfo.php:
URL of session_test.php:
What terms did you try when SEARCHING for a solution:
Write your message below:
anyone know how to get the link "back to site homepage" on the guestbook to open in a separate window
thanks
opening website in separate window
Open gbook.php in a plain text editor and on line 987 change
to
Code: Select all
<a href="'.$settings['website_url'].'">
Code: Select all
<a href="'.$settings['website_url'].'" target="_blank">
Klemen, creator of HESK and PHPJunkyardWas this helpful? You can buy me a drink here 
You should follow me on Twitter here
Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...
Also browse for php hosting companies, read php books, find php resources and use webmaster tools


Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...
Also browse for php hosting companies, read php books, find php resources and use webmaster tools
Unfortunately the code Klemen gave does not validate as valid xhtml.
In xhtml the target attribute is not allowed anymore.
Proper xhtml coding dictates that the user should have a choice if the link is opened in a new window or in the current window.
In modern browsers use shift+click to open a link in a new window, user ctrl+click to open in a new tab.
Code that validates is this:
Change line 989 (this is the line number i have in PSPad, not 987)to
A problem with this code is that the cursor does not change to a hand on mouseover. To fix this there are two solutions:
Solution 1 (which i would prefer, but unfortunately Firefox still does not show the hand cursor).
Solution 2 (which has as a setback that the current page is reloaded in the current window, but otherwise works perfectly and does show the hand cursor in all browsers)
Greetings,
Henrie
In xhtml the target attribute is not allowed anymore.
Proper xhtml coding dictates that the user should have a choice if the link is opened in a new window or in the current window.
In modern browsers use shift+click to open a link in a new window, user ctrl+click to open in a new tab.
Code that validates is this:
Change line 989 (this is the line number i have in PSPad, not 987)
Code: Select all
<p style="text-align:center"><a href="'.$settings['website_url'].'">Back to '.$settings['website_title'].'</a>
Code: Select all
<p style="text-align:center"><a onclick="javascript:window.open(\''.$settings['website_url'].'\');">Back to '.$settings['website_title'].'</a>
Solution 1 (which i would prefer, but unfortunately Firefox still does not show the hand cursor).
Code: Select all
<p style="text-align:center"><a onclick="javascript:window.open(\''.$settings['website_url'].'\');" style="cursor: hand;">Back to '.$settings['website_title'].'</a>
Code: Select all
<p style="text-align:center"><a href="" onclick="javascript:window.open(\''.$settings['website_url'].'\');">Back to '.$settings['website_title'].'</a>
Henrie
-
- Posts: 38
- Joined: Thu Jul 21, 2005 6:25 pm
Hi there,
In reference to Henrie's solution 1 and the cursor not changing in Firefox browser.
to
change style="cursor: pointer;">
this works in all browsers.
Fruity
In reference to Henrie's solution 1 and the cursor not changing in Firefox browser.
change style="cursor: hand;"><p style="text-align:center"><a onclick="javascript:window.open(\''.$settings['website_url'].'\');" style="cursor: hand;">Back to '.$settings['website_title'].'</a>
to
change style="cursor: pointer;">
this works in all browsers.
Fruity
FruitFully yours
http://www.fgps.com/keith/
http://www.fgps.com/keith/