Print Page | Close Window

Insert hyperlink - new window

Printed From: Web Wiz Forums
Category: Web Wiz Web App Support Forums
Forum Name: Web Wiz Rich Text Editor (RTE)
Forum Description: Support forum for the Web Wiz Rich Text Editor (RTE).
URL: https://forums.webwiz.net/forum_posts.asp?TID=27463
Printed Date: 28 March 2026 at 11:07pm
Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com


Topic: Insert hyperlink - new window
Posted By: timjanssen
Subject: Insert hyperlink - new window
Date Posted: 14 June 2009 at 6:30pm
Hi I'm having issues with the RTE v4.02.

The problem is when inserting a hyperlink, and setting the window type to new window the hyperlink doens't seem to open in a new window. The code of the link isn't made with a target=_blank statement.

Is this a known problem? Maybe someone has encountered this before?

Kind Regards

Tim - Netherlands



Replies:
Posted By: WebWiz-Bruce
Date Posted: 15 June 2009 at 10:14am
This should not be the case, so I just tested the RTE in both IE and Firefox creating a link and selecting 'New Window' from the drop down.

In both cases the was added to the link.


-------------
https://www.webwiz.net/web-wiz-forums/forum-hosting.htm" rel="nofollow - Web Wiz Forums Hosting
https://www.webwiz.net/web-hosting/windows-web-hosting.htm" rel="nofollow - ASP.NET Web Hosting


Posted By: timjanssen
Date Posted: 15 June 2009 at 1:38pm
Bruce, thnx for your reply.
 
When I insert an 'internal' link f.e. my site is: http://www.mysite.nl" rel="nofollow - www.mysite.nl and I insert a link to http://www.mysite.nl/contact.htm" rel="nofollow - www.mysite.nl/contact.htm the system doesnt insert the link with a new window.
 
I'm not making this up ;-)
 
Is there a function that looks at internal/external urls or something?


Posted By: WebWiz-Bruce
Date Posted: 15 June 2009 at 2:09pm
The Web Wiz RTE is built to be added to your own application that would handle the submission, so I wouldn't know if your application has been written to stip URL's of their target attribute.

However, I can tell you that the Web Wiz RTE will not automatically add a target attribute, in the hyperlink window you need to select the target attribute from the drop down.


-------------
https://www.webwiz.net/web-wiz-forums/forum-hosting.htm" rel="nofollow - Web Wiz Forums Hosting
https://www.webwiz.net/web-hosting/windows-web-hosting.htm" rel="nofollow - ASP.NET Web Hosting


Posted By: timjanssen
Date Posted: 15 June 2009 at 2:17pm
Bruce,

My application doesn't strip the link or whatsoever.

This is what's happening with adding a link with

css_styles/default_style.css" rel="nofollow - http://" rel="nofollow - html,body{border:0px;} td{border:1px dotted #CCCCCC;} EXTERNAL <DIV><A href="http://www.vi.nl/" target=_blank>test</A></DIV>
INTERNAL <DIV><A href="http://www.interfisc.eu/arbodienst_verzuimbegeleiding.asp?id=257">test3</A></DIV>

The url of the site is www.interfisc.eu, this link is also configured in the RTE_configuration file.
(Const strFullURLpathToRTEfiles = "http://www.interfisc.eu/cms/" 'Type in the full URL to the RTE folder eg. "http://www.myweb.com/RTE/")


Posted By: WebWiz-Bruce
Date Posted: 15 June 2009 at 2:32pm
Very sorry but can not replicate any issue like this at all.

What browser are you using and what version of that browser?

Also the links you have seem to have one of them has the target attribute within it. Web Wiz RTE doesn't have any code to strip this attribute, it simply allows you to add it and does not have any coding to decide if the link is internal or external.


-------------
https://www.webwiz.net/web-wiz-forums/forum-hosting.htm" rel="nofollow - Web Wiz Forums Hosting
https://www.webwiz.net/web-hosting/windows-web-hosting.htm" rel="nofollow - ASP.NET Web Hosting


Posted By: timjanssen
Date Posted: 15 June 2009 at 6:01pm
Hi Bruce,

What i have found out is the following.

It looks like when inserting a link with a variable in the url like this:

http://www.interfisc.eu/default.asp?lid=1&taal=nl&id=326

the script removes the _blank instruction or doesn't copy it into the rte.

You can test it with your own demo, it doesn't work with the link above.

But when you enter f.e.

http://www.interfisc.eu/default.asp?

It's working...

Can you help me with figuring this out?


Posted By: WebWiz-Bruce
Date Posted: 16 June 2009 at 9:44am
It looks like the ampersand in your URL is coursing this to fail.

Have been looking into this and trying different things now for about 4 hours but can not find a way to fix this, so unfortunately there will be no easy fix and it will have to be put on the 'todo' list to look at when there is more time.


-------------
https://www.webwiz.net/web-wiz-forums/forum-hosting.htm" rel="nofollow - Web Wiz Forums Hosting
https://www.webwiz.net/web-hosting/windows-web-hosting.htm" rel="nofollow - ASP.NET Web Hosting


Posted By: timjanssen
Date Posted: 16 June 2009 at 10:08am
Bruce,

Are you sure that the ampersand is causing this problem? I believe using the question mark also causes it.

Can you help me with al little work around that pastes the link always with a target=_blank statement?

Another question is when can you fix it in a update?

thnx
Tim


Posted By: WebWiz-Bruce
Date Posted: 16 June 2009 at 1:27pm
There is no quick update for this as have already spent 4 hours working on this without a successfully resolution so far, and probably could spend that amount of time on this again.

If there was a quick fix or a workaround, would have told you, but there is not.


-------------
https://www.webwiz.net/web-wiz-forums/forum-hosting.htm" rel="nofollow - Web Wiz Forums Hosting
https://www.webwiz.net/web-hosting/windows-web-hosting.htm" rel="nofollow - ASP.NET Web Hosting


Posted By: timjanssen
Date Posted: 16 June 2009 at 1:30pm
Ok excuse me for that.

My time spend on this issue wasn't that effective as wel.

When is the next update planned? I'd like to know that because we have bought the software specialy for this kind of functionality (rte).






Posted By: WebWiz-Bruce
Date Posted: 16 June 2009 at 3:51pm
There are no plans at present for the next update, but bug as usually fixed as them come in.

-------------
https://www.webwiz.net/web-wiz-forums/forum-hosting.htm" rel="nofollow - Web Wiz Forums Hosting
https://www.webwiz.net/web-hosting/windows-web-hosting.htm" rel="nofollow - ASP.NET Web Hosting


Posted By: timjanssen
Date Posted: 24 August 2009 at 7:50am
Approximately 6 weeks ago I've reported a bug. (as described above)

I'd like to know if this issue is been resolved (if not when this is taking place).

Thank you for your reply.



Posted By: WebWiz-Bruce
Date Posted: 24 August 2009 at 11:07am
This has not been looked at yet as it's more of an issue with how the browser works, so I would be doubtful if there is a way to ever fix this.

-------------
https://www.webwiz.net/web-wiz-forums/forum-hosting.htm" rel="nofollow - Web Wiz Forums Hosting
https://www.webwiz.net/web-hosting/windows-web-hosting.htm" rel="nofollow - ASP.NET Web Hosting


Posted By: timjanssen
Date Posted: 25 August 2009 at 1:15pm
Hi Bruce,
 
What do you mean with 'how the browser works'?
 
It doesn't work in multiple browsers so I presume that this has nothing to do with browser issues.
 
Kind regards.
Tim


Posted By: WebWiz-Bruce
Date Posted: 25 August 2009 at 2:12pm
Have been doing some further research into this issue as it is a very rare issue that only happens under certain circumstances.

It only happens if you highlight text to turn into a link and the link used contains a question mark and you also select to have extra attributes added such a new window target. Any other types of link created with it works fine, such as not highlighting text to turn into a hyperlink.

The problem occurs because when you highlight text to turn into a hyperlink the highlighted text first needs to be converted into a hyperlink and then only after can extra attributes such as window targets be added to the hyperlink using javascrpit to search for the link and add the extra attributes to it. The link then can not be found as the question mark breaks the javascript search from returning the hyperlink.

It was originally thought it was the ampersand coursing the issue in your link as this is converted from & to &amp;, however javascript searches ignore this change by the browsers API. What does break it is a question mark which needs to be escaped in some way the same as in a regular expression search.


-------------
https://www.webwiz.net/web-wiz-forums/forum-hosting.htm" rel="nofollow - Web Wiz Forums Hosting
https://www.webwiz.net/web-hosting/windows-web-hosting.htm" rel="nofollow - ASP.NET Web Hosting


Posted By: timjanssen
Date Posted: 27 August 2009 at 10:11am
Hi Bruce,

I understand what you mean. Is it an idea to add text input field into the 'insert hyperlink window'. So when you add a link, but don't select the caption text first, you can edit the caption of the link true this window.

Kind regards.

Tim


Posted By: timjanssen
Date Posted: 01 September 2009 at 3:35pm
Bruce,

Haven't got a reply since my last post. Since we have payed for your software we expect a decent sollution.

Kind regards.

Tim


Posted By: WebWiz-Bruce
Date Posted: 01 September 2009 at 4:24pm
The solution to your issue is as follows.

Open in a text editor the file RTE_popup_link.asp and change line 157 to that below:-


 vbCrLf & "        if (hyperlink[i].getAttribute('href').search('" & strHyperlinkType & Replace(strHyperlink, "?", "\\?", 1, -1, 1) & "') != -1){")


This should fix the problem with converting text to hyperlinks where the hyperlink has a question mark and you are adding extra attributes such as a target window.


-------------
https://www.webwiz.net/web-wiz-forums/forum-hosting.htm" rel="nofollow - Web Wiz Forums Hosting
https://www.webwiz.net/web-hosting/windows-web-hosting.htm" rel="nofollow - ASP.NET Web Hosting



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.08 - https://www.webwizforums.com
Copyright ©2001-2026 Web Wiz Ltd. - https://www.webwiz.net