PDA

View Full Version : Links open windows (default to unchecked)



magicsmoke
10-09-2008, 07:28 AM
1) Script Title:
Open offsite links in new window (ddwindowlinks)

2) Script URL (on DD):
http://www.dynamicdrive.com/dynamicindex8/newwindow2.htm

3) Describe problem:
More of a feature request! Is it possible to have the default for the checkbox to be unchecked? The script answers all my other needs, but I have some users who are bemused by the actions, so I prefer to let more knowledgeable users invoke the option if they choose.

rangana
10-09-2008, 07:56 AM
Find this part in ddwindowlinks.js:


//4) If mode is "manual", customize checkbox HTML to show to users (Preserve id attribute):
toggleHTML: '<form><input type="checkbox" id="targetcheckbox" checked="checked" /><label for="targetcheckbox">Open off-site links in new window?</label></form>',


...and remove highlighted.

magicsmoke
10-09-2008, 05:19 PM
Thank you [rangana] now [grin] can you explain why it worked when you told me to do it, whereas previously it didn't work when I did it myself? Maybe because this time I cleaned up my workspace before commencing. This in no way belittles your help, in fact it is intended to show how valuable it was because I had given up [blush] DD is a much appreciated resource, but is unbeatable with the support the forums offer.

rangana
10-09-2008, 11:40 PM
The script sets a cookie whose value is is yes if the togglebox is checked, otherwise sets to no.

This means, that when you test the script, ensure to clear your cookies.

It (might) work when I told you because you might have removed the cookie (unintentionally). ctrl+shift+del if FF.