File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes HTML, CSS and JavaScript and the fly likes Changing Url of a frame from onChange of Select tag? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "Changing Url of a frame from onChange of Select tag?" Watch "Changing Url of a frame from onChange of Select tag?" New topic
Author

Changing Url of a frame from onChange of Select tag?

umar hathab
Ranch Hand

Joined: Aug 20, 2001
Posts: 52
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


Sun Certified Java Programmer for Java 2.0 (93%) <p>----Winners always make the learning a habit
David O'Meara
Rancher

Joined: Mar 06, 2001
Posts: 13459

Can we see some sample code? I can't understand what the difference between the code is
umar hathab
Ranch Hand

Joined: Aug 20, 2001
Posts: 52
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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Changing Url of a frame from onChange of Select tag?