Thanks for the replies.
Jian - You are correct it is JScript.
Support has sent us an example of the method that you allude to using the 
element in a hidden div.
So am I correct that because of this idiotic change to the anchor element 
to use Javascript psuedo protocol to put an alert in an unlinked anchor 
that an unlinked  anchor can no longer be accessed with server side script?
This is Insane.
Has anyone else had their legacy projects blow up because of this?
They have crippled this element.
 I asked if they could change the method they are using to cause this alert 
box but they have no been receptive to changing it.
 
As far as what happens in  [*Do Something Here*].. well we do a couple of 
things.. 
We have a right column (*content class that lives in a container if the 
foundation page*) that contains links either offsite or to another reddot 
page (referenced).
We use dynamic anchors that the user can expand to add another link.
These links also serve to connect another content class type (document 
connector) in order to have the link point to a PDF document.
A newly created page will be created with one unused anchor that can then 
be expanded to make more links in the column.
(So this section blows up when the open page reddot is clicked for that 
section or if the user expands an existing link on an existing page)
We check if the anchor is not linked and hide that title and section of 
links or dispaly the section if it is linked.
If a PDF is attached we used code like this to swap the URL...
  <ul><!IoRangeDynLink>
    <% relatedLinkCounter += 1 %>
  <li id="relatedLink<%info_pageID%><%=relatedLinkCounter%>"><
!IoRangeRedDotEditOnly><span class="reddot"><!IoRedDot_anc_RelatedLink>[Edit 
this link or add more links:]</span><!/IoRangeRedDotEditOnly><
!/IoRangeConditional>
      <%
        Anchor='<%anc_RelatedLink%>';
        if ('<%flag_pageType%>'=='media'<!IoRangeRedDotMode> && false<
!/IoRangeRedDotMode>) {
            //replace href with media value
            URL=Anchor.substring(Anchor.indexOf('="') + 2, 
Anchor.indexOf('">'));
            Anchor = Anchor.replace(URL, '<%med_Document%>');
        }
      %>
 
<!IoRangeConditional>    
    <% if((Anchor!='')){ %>
      <%=Anchor %> </li> 
    <%}%>  
<!/IoRangeDynLink>
This code was written before my time by RedDot services (I think Micheal 
Madden). Maybe you remember him Jian? He is long gone.
 
 
On Thursday, November 21, 2013 3:31:20 PM UTC-5, Jian Huang wrote:

> Hi Pierre, 
>
> Yes, in SmartEdit opened mode, the conditional placeholder will always 
> evaluate to true, so the code *[Do something here]* will always run, 
> which may cause problem because it can be empty.
>
> The question is, what does *[Do something here] *do?
>
> -Jian
>
> On Thursday, November 21, 2013 12:54:53 PM UTC-5, Pierre Kruppik wrote: 
>>
>> Hi Jian, 
>>
>> this is correct. But i think this not a special property of the link. In 
>> SmartEdit opened mode, the conditional placeholder will be ignored.
>> The question is: is it necessary to check the anchor in SmartEdit opened 
>> mode.
>>
>>
>> Regards,
>> Pierre
>>
>> Am Donnerstag, 21. November 2013 15:42:05 UTC+1 schrieb Jian Huang: 
>>>
>>> Hi Pierre, 
>>>
>>> In SmartEdit page opened mode, <%anc_RelatedLink%> will always be true 
>>> because it returns *href="javascript:alert('No page has been connected 
>>> to this link.')"* even when it is empty.
>>>
>>> Hence the only way to determine the true value is to parse and check the 
>>> string within.
>>>
>>> -Jian
>>>
>>> On Thursday, November 21, 2013 8:41:42 AM UTC-5, Pierre Kruppik wrote: 
>>>>
>>>> Hi Chris, 
>>>>
>>>> you can do something like this:
>>>>
>>>>  myAnchor=FALSE
>>>> <!IoRangeConditional>
>>>> myAnchor=TRUE
>>>> <!--<%anc_RelatedLink%>-->
>>>> <!/IoRangeConditional>
>>>>
>>>> If myAnchor Then
>>>> *[Do something here]*
>>>> End If
>>>>
>>>> Regards
>>>> Pierre
>>>>
>>>> Am Dienstag, 19. November 2013 17:07:03 UTC+1 schrieb Jian Huang: 
>>>>>
>>>>> Hi Chris, 
>>>>>
>>>>> JavaScript don't cause ASP error because it is not a server side 
>>>>> language.
>>>>>
>>>>> I think what you are seeing is JScript.
>>>>>
>>>>> There is no way to <a href="javascript:alert('No page has been 
>>>>> connected to this link.')">test</a> because it has both " (double quote) 
>>>>> and ' (single quote).
>>>>>
>>>>> However, if you are using C#, you can throw that into a literal tag 
>>>>> and grab text from literal tag (examples are available via search in this 
>>>>> forum).
>>>>>
>>>>> In the same way, if you are using JavaScript, you can throw that into 
>>>>> a div and use JavaScript to check the content.
>>>>>
>>>>> -Jian
>>>>>
>>>>> On Tuesday, November 19, 2013 9:16:48 AM UTC-5, cjh wrote: 
>>>>>>
>>>>>>  Thanks for your reply Marco,
>>>>>>  
>>>>>> Any ideas on how to do that so that the preexecute script does not 
>>>>>> break? 
>>>>>> Please keep in mind that we can not return the anchor as "path and 
>>>>>> filename only" and use double quotes instead of single quotes.
>>>>>> We actually use the returned name of the anchor and users change it.
>>>>>> Tens of thousands of page rely on this existing structure.
>>>>>>  
>>>>>> Thanks for the help.
>>>>>> Chris H.
>>>>>>
>>>>>> On Saturday, November 16, 2013 1:36:12 PM UTC-5, mreddot wrote:
>>>>>>
>>>>>>> Hi Chris,
>>>>>>>
>>>>>>> perhaps you need to escape the returning string because of the value 
>>>>>>> containing apostrophes inside the alert function.
>>>>>>>   
>>>>>>>
>>>>>>> Greetings
>>>>>>> Marco
>>>>>>>
>>>>>>>
>>>>>>> On Wednesday, November 13, 2013 10:27:08 PM UTC+1, cjh wrote: 
>>>>>>>>
>>>>>>>>  We need a method to test an anchor element in javascript to see 
>>>>>>>> if it has been connected to a page or assigned a URL
>>>>>>>> In Version 9 We would just assign the anchor element to a 
>>>>>>>> javascript variable.
>>>>>>>> Something like....
>>>>>>>>  
>>>>>>>> myAnchor='<%anc_RelatedLink%>';
>>>>>>>> if (myAnchor != ' '){
>>>>>>>> *[Do something here]*
>>>>>>>> }
>>>>>>>>  
>>>>>>>> This now will cause an ASP error when the page is opened and the 
>>>>>>>> anchor is* not* connected to a page.
>>>>>>>> It will work if the Achor is referenced to a page or assigend a URL.
>>>>>>>> We believe this is possibly due to a change in this element 
>>>>>>>> behavior in Version 11 that inserts...
>>>>>>>> *href="javascript:alert('No page has been connected to this 
>>>>>>>> link.')"* into the anchor tag if it is not connected.
>>>>>>>>  
>>>>>>>> Does anyone know of a workaround?
>>>>>>>> We have unsuccesfully tried a render tag.
>>>>>>>>  
>>>>>>>> <!! Context:CurrentPage.Elements.GetElement(anc_myAnchor).GetHtml() 
>>>>>>>> !!>
>>>>>>>>  
>>>>>>>>  It either does not return any value or if it does seems to have a 
>>>>>>>> caching behavior that maintains an older value.
>>>>>>>>  
>>>>>>>> Thanks for any advice you can provide,
>>>>>>>>  
>>>>>>>> Chris
>>>>>>>>  
>>>>>>>>
>>>>>>>

-- 
You received this message because you are subscribed to the Google Groups 
"RedDot CMS Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/reddot-cms-users.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to