[thelist] javascript/frame problem

Jay Turley jay at weberrific.org
Fri Oct 27 13:26:12 CDT 2000


Hi all-

One of my current projects is fixing an existing website. I have an 
*interesting* problem...

The site is a frameset with two frames: frame_left and frame_right. 
frame_left contains navigation and frame_right contains content.

Initially, the site displays a set of news articles in frame_right. 
frame_left has a search form which is submitted by means of javascript:

<a 
href="javascript:parent.frame_left.document.frmSearch.hAction.value=2;parent
.frame_left.document.frmSearch.submit();" target="frame_right"  
onMouseOver='javascript:fontOn(this);' onMouseOut='javascript:fontOff
(this);'>Symbol</a>

The form in question is:

<form name="frmSearch" action="/News/news.asp" target="frame_right" 
method="post">

The news articles are located on a different server than the inital 
frameset and frame pages (newsiis.xxx.com vs. wwwbeta.xxx.com). The search 
function works as long as the user is not viewing an actual article. As 
soon as an article is loaded into frame_right from the other server, the 
search stops working, and instead, the browser attempts to load the file 
named:

javascript:parent.frame_left.document.frmSearch.hAction.value=2;parent.frame
_left.document.frmSearch.submit();

which of course leads to a freaky error.

Can any of you all suggest why the javascript: protocol stops working when 
an article is loaded into the content frame?

Since the application is written all horky anyway, I may have to just 
recode it properly, but if I can just get this going the client will be 
happy for now.

Thanks,

- Jay Turley ---------------------------------------------------------
  http://www.weberrific.org
 "Any sufficiently advanced magic is indistinguishable from technology"




More information about the thelist mailing list