Jump to content

Multiple HtmlFrames on one Form, Each Frame contains unique JS Code, Calling UniSession.AddJS gets confused between Frames ?


andyhill

Recommended Posts

TopHtmlFrame contains <img id='01'
TopHtmlFrame contains script markTop

LeftHtmlFrame contains <img id='01'
LeftHtmlFrame contains script markLeft

 

UniSession.AddJS(markTop("01"); works as expected 

UniSession.AddJS(markLeft("01"); ACCESSES TopHtmlFrame <img id='01'

 

I have tried
UniSession.AddJS('markLeft("01")');

I have tried
UniSession.AddJS('fMain.LeftHTMLFrame.JSName.markLeft("01")');

I have tried
LeftHTMLFrame.JSInterface.JSCode('markLeft("01")');

 

I have tried
                '      function markLeft(id) '+
                '      { '+
                '        var img = document.getElementById(id); '+
                '        if (!img) {return null} '+
                '        img.style.border = "3px solid red"; '+
                '      } '+

I have tried
                '      function markLeft(id) '+
                '      { '+
                '        var img = sender.document.getElementById(id); '+
                '        if (!img) {return null} '+
                '        img.style.border = "3px solid red"; '+
                '      } '+

I have tried
                '      function markLeft(id) '+
                '      { '+
                '        var img = fMain.LeftHTMLFrame.JSName.document.getElementById(id); '+
                '        if (!img) {return null} '+
                '        img.style.border = "3px solid red"; '+
                '      } '+

Please advise - thanks in advance

 

Link to comment
Share on other sites

Hello, 

this topics maybe will help to You: 

 

And try this:

 

  '      function markLeft(id) '+
'      { '+
'        var img = document.getElementById(' + YouFrame.JSid + '); '+
'        if (!img) {return null} '+
'        img.style.border = "3px solid red"; '+
'      } '+

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...