Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Changing Url of a frame from onChange of Select tag?

 
umar hathab
Ranch Hand
Posts: 52
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I have one frameset which contains three frames.
I have a <Select> tag in first frame which contains a onChange handler calling one Javascript function.
Inside the function I am changing the URL of third frame like
parent.frames['invaction'].window.location.href="some page";
The problem is ,the code works with IE but not with NS6.x
when I call the same function directly(not from onChange),it works fine in NS.
Can any one tell me how to change the frame url using onChange of Select tag.
Thanks in Advance,
A.Umar
 
David O'Meara
Rancher
Posts: 13459
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can we see some sample code? I can't understand what the difference between the code is
 
umar hathab
Ranch Hand
Posts: 52
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi
This is the bit of codes.
This is in First Frameset:
----------------------
function filterData()
{
//alert("Hi");
parent.frames['invaction'].window.location.href="/webapp/wcs/stores/servlet/UseMAFS/blank.html";
parent.invlist.document.List.method = "post";
parent.invlist.document.List.action = "/webapp/wcs/stores/servlet/UseMAFS/list.jsp";
parent.invlist.document.List.target = "invlist";
parent.invlist.document.List.submit();
}
This is FrameSet:
------------------
<frameset rows="235,*,45" frameborder="NO" border="0" framespacing="0" >
<frame name="dealermain" src="<%=ControlConstants.URL_DEALERINFO%>" scrolling="NO">
<frame name="invlist" scrolling="YES" noresize src="<%=ControlConstants.URL_LIST%>">
<frame name="invaction" src="<%=RES_jspPath%>/blank.html" scrolling="NO">
</frameset>

This is in First Frame:
------------------------
<select name="FilterData" onChange="filterData();">
<option selected>- ALL -</option>
<option value="0">0-30</option>
<option value="1">31-60</option>
<option value="2">61-90</option>
<option value="3">91-120</option>
<option value="4">Above 120</option>
</select>

But Interstingly if I give some alert message(alert("Hi")) ,the url is getting changed.
I just wonder whats going on.
Thanks,
A.Umar
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic