Sorry, I'm no programmer so I have no clue where it should go.

Here's what's calling the clickDot function

<!--BEGIN LEFT NAV AREA-->
<!IoRangeRedDotEditOnly><div class=reddot style="background-color: white"><
!IoRedDot_Left_Nav>Create a New Left Nav
<br><span style="display: none"><!IoRedDot_Left_Nav></span><a 
href="javascript:void(0);" onclick="*clickDot*(this,'ReferenceParentNav')"><img 
src="/CMS/Icons/RedDotAdd.gif" align=absmiddle border=0></a>Use Left Nav 
from the parent page</div><!/IoRangeRedDotEditOnly>
<%Left_Nav%>
<!--END LEFT NAV AREA-->

Here's the clickDot function.  I think I did this right.

function *clickDot* (dot, actionString) {
    var RedDotGuid = $('#customreddot').html().match(/GUID=(.{32})/i)[1];
    window.open("/CMS/Plugins/Torrance_Interface.asp?action=" + 
actionString + "&linkguid=" + RedDotGuid + 
"&sessionkey=B9D9229C66484B7684A24440562E6A80&loginguid=B9D9229C66484B7684A24440562E6A80&pageguid=3C979F80F86844D395A737621407044C","","toolbar=0,location=0,directories=0,status=1,menubar=0,scrollbars=1,resizable=1,width=10,height=10,screenX=10,screenY=10,left=10,top=10");


On Thursday, March 13, 2014 9:32:02 AM UTC-7, Mark Iinuma wrote:
>
> Thank you so much Jian.  I'll give it a try.
>
>
> On Thursday, March 13, 2014 8:05:24 AM UTC-7, Jian Huang wrote:
>>
>> Hi,
>>
>> This is how I get the guid from a reddot.  Works in 7.x to 11.x.
>>
>> <div id="customreddot">
>>       <!reddot_reddothere>
>> </div>
>>
>> <script>
>>        var RedDotGuid = 
>> $('#customreddot').html().match(/GUID=(.{32})/i)[1];
>> </script>
>>
>> In version 10.x, there was a bug that session variables, in SmartEdit, 
>> like PageGuid and LinkGuid don't change despite the user changing pages, so 
>> it is actually a good idea not to trust any sessions variables other than 
>> loginguid and sessionguid when accessing from SmartEdit.
>>
>> Like Gerlando said, AJAX is also a good way to get a section of another 
>> page in, like this
>>
>> <script>
>>      $.get('<%inf_calling_page%>', function(data){
>>             var LeftNavHtml = $(data).find('#leftnav').html();
>>      });
>> </script>
>>
>> Best,
>>
>> -Jian
>>
>> On Wednesday, March 12, 2014 2:21:31 PM UTC-4, Gerlando Caldara wrote:
>>>
>>> Hi Mark,
>>>
>>> possible ideas when I saw your code:
>>> Maybe the perviousSibling not working because of some comments on code.
>>> That happen to me, seems to be different handling between browser 
>>> engines.
>>> So please check the nodes on dom in inspector.
>>>
>>> Alert the variable guid to verify the content or write it out to console 
>>> with console.log().
>>>
>>> I had a lot issues with dynamic code on js because some other js code 
>>> manipulating the reddots on rendering. Make sure the site is fulled loaded 
>>> before make any js action.
>>> JQuery onReady solve this very easy.
>>>
>>> Some Ideas outside of your code:
>>> Use the Javascript Debugger to step over your code and watch over the 
>>> variables.
>>>
>>> Can you use Rendertags on the Projekt and the Navigation Manager is in 
>>> use?
>>> Try to get the navigation over this way.
>>>
>>> The variables SessionKey, LoginGuid, PageGuid already on ASP Session you 
>>> don't need to add them. Maybe you receive the linkguid over this way too, 
>>> I'm not sure on this point. Best way to check to print all session 
>>> variables on your ASP File.
>>>
>>> If you want only the HTML Content of Navigation you can place these 
>>> snippets on seperate instance/template and then import over Ajax call. 
>>>
>>> Hope any of these lines are helping you. If yes print some info witch 
>>> solution helps.
>>>
>>> Best Regards
>>>
>>>
>>>
>>> 2014-03-12 18:22 GMT+01:00 Mark Iinuma <marki...@gmail.com>:
>>>
>>>> Hi everyone,
>>>>
>>>> I'm running into a weird problem on v11.2.  (Win Server 2008R2)
>>>> I have a red dot that is supposed to call a plug-in to get the left nav 
>>>> from the parent page however nothing happens.
>>>> I used Firefox with the Fiddler add-on to see what's happening.  Turns 
>>>> out that I'm getting an error with an undefined variable before calling 
>>>> the 
>>>> plug-in.
>>>>
>>>> TypeError: guid is undefined
>>>>
>>>> In the template on the line it's complaining about, I put a var.  Same 
>>>> error.
>>>>
>>>> function clickDot (dot, actionString) {
>>>>     guid=dot.previousSibling.firstChild.getAttribute.innerHTML;
>>>>     var guid=guid.substr(guid.indexOf("GUID=")+5,32);
>>>>     window.open("/CMS/Plugins/Torrance_Interface.asp?action=" + 
>>>> actionString + "&linkguid=" + guid + 
>>>> "&sessionkey=B9D9229C66484B7684A24440562E6A80&loginguid=B9D9229C66484B7684A24440562E6A80&pageguid=3C979F80F86844D395A737621407044C","","toolbar=0,location=0,directories=0,status=1,menubar=0,scrollbars=1,resizable=1,width=10,height=10,screenX=10,screenY=10,left=10,top=10");
>>>>
>>>> Thanks in advance,
>>>> Mark
>>>>
>>>> -- 
>>>> 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 reddot-cms-use...@googlegroups.com.
>>>> To post to this group, send email to reddot-c...@googlegroups.com.
>>>> Visit this group at http://groups.google.com/group/reddot-cms-users.
>>>> For more options, visit https://groups.google.com/d/optout.
>>>>
>>>
>>>

-- 
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 reddot-cms-users+unsubscr...@googlegroups.com.
To post to this group, send email to reddot-cms-users@googlegroups.com.
Visit this group at http://groups.google.com/group/reddot-cms-users.
For more options, visit https://groups.google.com/d/optout.

Reply via email to